Skip to content

ci: add Claude PR review agent - #380

Merged
thomaspinder merged 1 commit into
mainfrom
ci/claude-pr-review
Oct 4, 2026
Merged

thomaspinder merged 1 commit into
mainfrom
ci/claude-pr-review

Conversation

@thomaspinder

Copy link
Copy Markdown
Collaborator

Summary

A PR comment that mentions @claude-pr-review runs a Claude reviewer agent on that PR. The agent follows the existing PR Review Policy in AGENTS.md and the procedure and output format in .claude/commands/pr-review.md. Text after the mention reaches the agent as extra instructions, for example @claude-pr-review focus on the identification code.

 .claude/
+├── agents/pr-reviewer.md      # points at the policy + /pr-review, with CI changes
 └── commands/pr-review.md      # unchanged, still the source of the review format
 .github/workflows/
+└── claude-pr-review.yml       # issue_comment -> anthropics/claude-code-action
on PR comment
  if the comment mentions @claude-pr-review and the author is thomaspinder
    claude-code-action --agent pr-reviewer
      gh pr view, gh pr diff            # instead of git diff origin/$BASE_REF...HEAD
      inline comment on each in-scope finding
      full In-Scope / Out-of-Scope review in the tracking comment   # instead of gh pr comment

Notes:

  • The action restores .claude/ from the PR's base branch before Claude starts. A PR cannot change the instructions of its own reviewer, and changes to the agent or to /pr-review take effect after merge.
  • The run uses a Claude subscription through the CLAUDE_CODE_OAUTH_TOKEN secret. The first run needs the Claude GitHub App on this repo and that secret.

Evidence

  • prek run --files .claude/agents/pr-reviewer.md .github/workflows/claude-pr-review.yml: all hooks pass (check yaml, end-of-file, trailing whitespace).
  • Local agent load check:
    claude -p --agent pr-reviewer "quote the sentence that begins 'You review pull requests for'"
      -> "You review pull requests for Impulso."
    
  • Not yet run end to end on GitHub: that needs the App and the secret.

Merge Danger

Door: two-way

Delete the two files to revert.

Blast Radius: isolated

The workflow runs only on PR comments that mention @claude-pr-review and come from thomaspinder. No library code, test, docs or release workflow changes. Each run uses Claude subscription quota.

🤖 Generated with Claude Code

A PR comment that mentions @claude-pr-review runs the pr-reviewer agent
(.claude/agents/pr-reviewer.md) through anthropics/claude-code-action.
Only comments from thomaspinder trigger it, because the run is billed to
a personal Claude subscription.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Oct 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@thomaspinder
thomaspinder merged commit f95d4a6 into main Oct 4, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant