# 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="langgraph" agent="github-review" />

<AgentPreview
  agent="github-review"
  framework="langgraph"
  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.

## Installation [#installation]

<CodeTabs>
  <TabsList>
    <TabsTrigger value="cli">
      Command
    </TabsTrigger>

    <TabsTrigger value="manual">
      Manual
    </TabsTrigger>
  </TabsList>

  <TabsContent value="cli">
    ```bash
    npx shadcn@latest add @agentcn/langgraph/github-review
    ```
  </TabsContent>

  <TabsContent value="manual">
    <Steps>
      <Step>
        Install the following dependencies:
      </Step>

      ```bash
      npm install @dawn-ai/sdk
      ```

      <Step>
        Copy and paste the following agent route files into your project.
      </Step>

      <ComponentSource src="registry/langgraph/github-review/index.ts" title="index.ts" />

      <ComponentSource src="registry/langgraph/github-review/instructions.md" title="instructions.md" />

      <ComponentSource src="registry/langgraph/github-review/tools/fetch_pr.ts" title="tools/fetch_pr.ts" />

      <ComponentSource src="registry/langgraph/github-review/tools/get_file_content.ts" title="tools/get_file_content.ts" />

      <ComponentSource src="registry/langgraph/github-review/tools/get_pr_files.ts" title="tools/get_pr_files.ts" />

      <ComponentSource src="registry/langgraph/github-review/tools/parse_github_url.ts" title="tools/parse_github_url.ts" />

      <Step>
        Run `dawn check` after copying so route and tool metadata are regenerated.
        `dawn dev`, `dawn build`, and `dawn verify` also run the same discovery path.
      </Step>
    </Steps>
  </TabsContent>
</CodeTabs>

## Composition [#composition]

```text
├── index.ts
├── instructions.md
├── tools/fetch_pr.ts
├── tools/get_file_content.ts
├── tools/get_pr_files.ts
├── tools/parse_github_url.ts
```

## Customization [#customization]

* Edit `index.ts` to change the model, description, or system prompt.
* Add route-local tools under `tools/`; tool input and output types are inferred from TypeScript.
* Run `dawn verify` before deploying generated LangGraph artifacts.
