MCPInstall

alan-review-pr

Review a GitHub pull request using Alan's GitHub MCP tools

Installs
1.8K
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/supatest-ai/alan-skills --skill alan-review-pr
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads alan-review-pr automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

MANDATORY: Use Alan MCP Tools

The Alan MCP server provides GitHub tools that are ALREADY in your tool list. They work exactly like Read, Bash, Edit — you call them as tool invocations. They are named with the prefix mcp__alan__github_.

Authentication is handled automatically by the MCP server. You do NOT need GitHub tokens, gh CLI auth, SSH keys, .netrc files, environment variables, or any credentials. The tools work immediately with zero setup.

NEVER do any of the following for GitHub API access:

  • curl or wget to api.github.com
  • gh CLI commands (gh pr, gh api, etc.)
  • env | grep or scanning for tokens/secrets
  • cat ~/.netrc, git credential, or ssh -T git@github.com
  • Any attempt to find, construct, or configure GitHub authentication
  • Installing packages or CLIs for GitHub access

If an MCP tool call fails, report the error to the user. Do NOT fall back to CLI alternatives.

Verify tools are available

Before starting, confirm you can see mcp__alan__github_* tools in your available tools. If they are NOT available, STOP and tell the user: "The GitHub MCP tools are not available. Please check the sandbox MCP configuration."

Tool parameters

All GitHub PR tools require these parameters:

  • owner (string): GitHub org or username, e.g. "supatest-ai"
  • repo (string): Repository name, e.g. "alan"
  • prNumber (integer): PR number, e.g. 42

Example tool call:

Tool: mcp__alan__github_get_pull_request
Parameters: { "owner": "supatest-ai", "repo": "alan", "prNumber": 42 }

Resolving owner/repo

If the user only provides a PR number, run git remote get-url origin to get the remote URL, then parse owner and repo from it. This is the ONLY git CLI command you should run for GitHub operations. Everything else uses MCP tools.

Available GitHub MCP tools

Tool namePurpose
mcp__alan__github_get_pull_requestGet PR details (title, state, labels, merge status)
mcp__alan__github_get_pr_diffGet unified diff of a PR
mcp__alan__github_list_pr_commentsList all comments on a PR
mcp__alan__github_list_pr_reviewsList all reviews on a PR
mcp__alan__github_list_pr_filesList changed files with additions/deletions
mcp__alan__github_get_issueGet issue details
mcp__alan__github_get_ci_statusGet CI check run status for a ref
mcp__alan__github_add_commentAdd a comment to an issue or PR
mcp__alan__github_create_pr_reviewSubmit a review (APPROVE/REQUEST_CHANGES/COMMENT)
mcp__alan__github_add_labelsAdd labels to an issue or PR
mcp__alan__github_merge_pull_requestMerge a PR
mcp__alan__github_close_issueClose an issue or PR
mcp__alan__github_request_reviewersRequest reviewers on a PR

Task: Review a Pull Request

Input

The user will provide one of:

Workflow

  1. Resolve owner/repo/prNumber from the input. If only a PR number is given, run git remote get-url origin to parse owner and repo.

  2. Fetch PR metadata — call mcp__alan__github_get_pull_request with { owner, repo, prNumber } to get title, description, state, labels, branches.

  3. Fetch the diff — call mcp__alan__github_get_pr_diff to get the unified diff.

  4. Fetch changed files — call mcp__alan__github_list_pr_files to see files modified/added/deleted with line counts.

  5. Fetch existing reviews — call mcp__alan__github_list_pr_reviews to see prior review state.

  6. Fetch existing comments — call mcp__alan__github_list_pr_comments for ongoing discussion context.

  7. Check CI status — call mcp__alan__github_get_ci_status with the head branch or SHA. If a check failed, include the html_url link so the user can view full logs (the tool does not return log output).

  8. Read source files — for complex changes, use the Read tool to read full source files (not just the diff) for context.

  9. Analyze — identify issues INTRODUCED by this PR only (not pre-existing). For each finding, determine: severity, file path, start/end line, title, description, and a concrete fix prompt for agents.

  10. Post review — call mcp__alan__github_create_pr_review with inline comments (one per finding) plus a summary body. See formats below.

Review Dimensions (priority order)

  1. Security — injection, auth bypass, secrets in code, input validation
  2. Correctness — logic errors, null handling, async issues, race conditions
  3. Performance — N+1 queries, unbounded operations, memory issues
  4. Error Handling — silent failures, empty catch blocks, swallowed errors
  5. Maintainability — functions >30 lines, deep nesting, magic numbers
  6. Test Coverage — happy path tested? edge cases? meaningful assertions?

Confidence Filter

Only include findings where:

  • You can point to exact file + line
  • You can describe a concrete scenario where it causes a real problem
  • Confidence >= 80%

Skip: linter-catchable issues, speculative risks, style preferences, pre-existing problems.

Inline Comment Format

Each finding becomes its own inline comment on the PR. Format the body of each comment like this:

<!-- alan-review-comment {"id": "alan_review_{prNumber}_{sequential_4digit}", "file_path": "{path}", "start_line": {start}, "end_line": {end}, "side": "RIGHT"} -->

{severity_icon} **{short_title}**

{detailed_description}

<details>
<summary>Prompt for agents</summary>

\`\`\`
{concrete_fix_instructions_an_AI_agent_can_execute — specify exact file, what to change, and how}
\`\`\`

</details>

<!-- alan-review-badge-begin -->
<a href="{alan_session_url}" target="_blank">
  <img src="https://app.tryalan.ai/logo.png" alt="Open in Alan" height="20">
</a>
<!-- alan-review-badge-end -->

Severity icons:

  • 🔴 = Blocking (critical bugs, security, data loss — must fix before merge)
  • 🟡 = Important (real bugs/risks — should fix before merge)
  • 🔵 = Nit (minor quality issues — fix if easy)

Summary Comment Format

The body parameter of the review (top-level summary) should be:

**Alan Review** found {N} potential issues.

| Severity | Count |
|----------|-------|
| 🔴 Blocking | {X} |
| 🟡 Important | {Y} |
| 🔵 Nit | {Z} |

<details>
<summary>View all findings</summary>

### 🔴 Blocking
- **{title}** — \`{file_path}:{line}\` — {one_line_description}

### 🟡 Important
- **{title}** — \`{file_path}:{line}\` — {one_line_description}

### 🔵 Nit
- **{title}** — \`{file_path}:{line}\` — {one_line_description}

</details>

<!-- alan-review-badge-begin -->
<a href="{alan_session_url}" target="_blank">
  <img src="https://app.tryalan.ai/logo.png" alt="Open in Alan" height="20">
</a>
<!-- alan-review-badge-end -->

---
*Was this helpful? React with 👍 or 👎 to provide feedback.*

"Open in Alan" Badge URL

Every badge links to the current Alan session. The user/trigger will provide the session URL. Replace {alan_session_url} in every badge with the actual URL.

If no session URL is provided, fall back to https://app.tryalan.ai.

Posting the Review

Call mcp__alan__github_create_pr_review with:

  • owner, repo, prNumber: from step 1
  • body: the summary comment above
  • event: "REQUEST_CHANGES" if any 🔴 blocking findings, otherwise "COMMENT"
  • comments: array of inline comments, each with:
    • path: relative file path from repo root
    • line: the end line number of the finding
    • body: the formatted inline comment body above

IMPORTANT:

  • Always post inline comments (one per finding) — do NOT bundle into one big comment
  • Always include the "Prompt for agents" section in every finding
  • Always include the "Open in Alan" badge on every comment and the summary
  • Replace {alan_session_url} with the actual session URL in every badge
  • If zero findings, post an approving review with a clean summary

FAQ

What does the alan-review-pr skill do?

Review a GitHub pull request using Alan's GitHub MCP tools

How do I install alan-review-pr?

Run npx skills add https://github.com/supatest-ai/alan-skills --skill alan-review-pr in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/alan-review-pr/ (personal) or .claude/skills/alan-review-pr/ (project).

Which AI agents can use alan-review-pr?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is alan-review-pr safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains alan-review-pr?

It is published by supatest-ai in supatest-ai/alan-skills. It has 1,796 recorded installs.

More from supatest-ai/alan-skills

View all →

alan-plan

supatest-ai/alan-skills

Create an implementation plan artifact in Alan

alan-test-feature

supatest-ai/alan-skills

Scope coverage, build a testing strategy, test the feature with agent-browser, capture screenshots/video (always mandatory), upload to S3, and create a structured test report (never skip)

Testing & QA1.8K installs

aiden-plan

supatest-ai/alan-skills

Open the skill to read its SKILL.md instructions.

aiden-test-feature

supatest-ai/alan-skills

Open the skill to read its SKILL.md instructions.

Testing & QA325 installs

aiden-review-pr

supatest-ai/alan-skills

Open the skill to read its SKILL.md instructions.

Popular code quality & workflow skills

View category →

grill-me

mattpocock/skills

A relentless interview to sharpen a plan or design.

Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.

handoff

mattpocock/skills

Compact the current conversation into a handoff document for another agent to pick up.

domain-modeling

mattpocock/skills

Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a GLOSSARY.md, or recording or editing an ADR.

codebase-design

mattpocock/skills

Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.

diagnosing-bugs

mattpocock/skills

Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.