# GitHub PR Code Review

Fetches a GitHub pull request and returns adaptive, file-by-file code review feedback.

> For the complete documentation index, see [llms.txt](/llms.txt). Markdown variants are available by appending `.md` to any URL or sending an `Accept: text/markdown` header. An agent skill is available at [/.well-known/agent-skills/site-skill.md](/.well-known/agent-skills/site-skill.md).



<DocsBaseSwitcher base="flue" agent="github-review" />

<AgentPreview
  agent="github-review"
  framework="flue"
  inputFields="[
  {
    name: &#x22;url&#x22;,
    label: &#x22;Pull request URL&#x22;,
    placeholder: &#x22;https://github.com/owner/repo/pull/123&#x22;,
    type: &#x22;text&#x22;,
  },
]"
/>

## Summary [#summary]

The **GitHub PR Code Review Agent** reviews a pull request and returns actionable
feedback. It fetches the PR's files and patches, adapts its depth to the diff
size, and reports bugs, security issues, and style notes grouped by file — ending
with an approve / request-changes recommendation. Reach for it to triage reviews
or give contributors fast first-pass feedback.

## Install [#install]

```bash
npx shadcn@latest add @agentcn/flue/github-review
```

## Composition [#composition]

```text
agents/
└── github-review.ts      # Chat review agent
workflows/
└── github-review.ts      # pr-review workflow → typed Review
tools/
└── fetch-pr.ts           # Fetches PR metadata + changed files
```

## Customization [#customization]

* **Reshape the review.** Edit the `Review` valibot schema (add line numbers,
  suggested patches).
* **Tune depth + skips.** Adjust the agent instructions for size thresholds and
  ignored paths.
* **Post back to GitHub.** Add a tool that creates a review via the GitHub API.
* **Swap the model.** Use Sonnet for depth or Haiku for speed.
