Skip to content

Claude: PR-reviewer Agent#813

Merged
AkhileshNegi merged 1 commit intomainfrom
claude/pr-reviewer-agent
May 6, 2026
Merged

Claude: PR-reviewer Agent#813
AkhileshNegi merged 1 commit intomainfrom
claude/pr-reviewer-agent

Conversation

@AkhileshNegi
Copy link
Copy Markdown
Collaborator

@AkhileshNegi AkhileshNegi commented May 5, 2026

Summary

  • Adds .claude/agents/pr-reviewer.md, a project-scoped Claude Code subagent for reviewing PRs and branch diffs.
  • Encodes repo conventions (logging prefix, load_description, sa_column_kwargs comments, alembic rev-id rule, uv tooling) plus FastAPI / Python / SQLModel / migration / security checks distilled from the team's veteran reviewers.
  • Output is structured (Summary / Blocking / Suggestions / Nits / Tests / Migrations / Follow-ups) with severity tagging (VERY IMPORTANT:, MUST:, nit:) so reviews stay actionable.

How to use

On a branch you're working on

review my changes
or
@agent-pr-reviewer review this branch

On an open PR (yours or a teammate's)

@agent-pr-reviewer review PR 813
or just
review PR 813

Adds a project-scoped pr-reviewer agent that reviews a PR or the
current branch's diff against repo conventions, FastAPI/Python best
practices, and a personal review checklist distilled from the team's
veteran reviewers.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 5, 2026

📝 Walkthrough

Walkthrough

A new agent prompt configuration file .claude/agents/pr-reviewer.md is added to define a PR review agent with comprehensive guidance on repository conventions, code quality checks, and output formatting for reviewing PRs or branch diffs against a FastAPI/Python/PostgreSQL/SQLModel/Alembic/Celery stack.

Changes

PR Reviewer Agent Configuration

Layer / File(s) Summary
Agent Frontmatter
.claude/agents/pr-reviewer.md
Configures agent identity, description, required tools (Bash, Read, Grep, Glob), and model (sonnet).
Diff Gathering Procedure
.claude/agents/pr-reviewer.md
Instructions for fetching PR or branch diffs via gh CLI and git, with guidance on when to read full files vs. grep for signals.
Review Checklist
.claude/agents/pr-reviewer.md
Comprehensive checklist spanning conventions, layering, duplication, config/magic values, naming, error handling, concurrency, API design, FastAPI wiring, async correctness, security (SSRF, uploads), performance, idioms, edge cases, migrations, cleanup, and tests.
Comment Guidelines
.claude/agents/pr-reviewer.md
Specifies how to cite locations, name failure modes, pair criticism with fixes, use severity tags, and format feedback appropriately.
Output Format Template
.claude/agents/pr-reviewer.md
Defines required output sections (Summary, Blocking Issues, Suggestions, Nits, Tests, Migrations, Follow-ups) with instruction to omit empty sections and not modify files.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Suggested labels

enhancement

Suggested reviewers

  • kartpop
  • avirajsingh7

Poem

A new guide hops in, oh what delight,
For reviewing PRs with structured might,
Checklists and templates, all bundled tight,
No more confused commits in the night! 🐰✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'Claude: PR-reviewer Agent' is partially related to the changeset but lacks specificity and clarity about the actual change being made. Consider a more descriptive title such as 'Add pr-reviewer Claude Code agent for PR review automation' to clearly convey the main purpose and change.
✅ Passed checks (4 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/pr-reviewer-agent

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.claude/agents/pr-reviewer.md:
- Line 120: Add a language tag to the fenced code block identified as "fenced
code block at Line 120" in the .claude/agents/pr-reviewer.md content so it no
longer triggers markdownlint MD040; update the opening triple-backtick to
include a tag such as text or markdown (for example change ``` to ```text) so
the block is properly annotated.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 4c4ca61b-195b-4705-b54e-04bb316dc5fa

📥 Commits

Reviewing files that changed from the base of the PR and between a9e2ac5 and e13ed9a.

📒 Files selected for processing (1)
  • .claude/agents/pr-reviewer.md


## Output format

```
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Add a language tag to the fenced code block at Line 120.

This triggers markdownlint MD040 and is easy to fix by annotating the fence (for example text or markdown).

Suggested fix
-```
+```text
 ## Summary
 <1–3 sentences: what the PR does + verdict (approve / approve with nits / request changes). Caveats on approval are fine.>
@@

</details>

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 markdownlint-cli2 (0.22.1)</summary>

[warning] 120-120: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

</details>

</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.claude/agents/pr-reviewer.md at line 120, Add a language tag to the fenced
code block identified as "fenced code block at Line 120" in the
.claude/agents/pr-reviewer.md content so it no longer triggers markdownlint
MD040; update the opening triple-backtick to include a tag such as text or
markdown (for example change totext) so the block is properly annotated.


</details>

<!-- fingerprinting:phantom:triton:hawk -->

<!-- d98c2f50 -->

<!-- This is an auto-generated comment by CodeRabbit -->

@codecov
Copy link
Copy Markdown

codecov Bot commented May 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@AkhileshNegi AkhileshNegi changed the title chore: add pr-reviewer Claude Code agent Claude: PR-reviewer Agent May 6, 2026
@AkhileshNegi AkhileshNegi self-assigned this May 6, 2026
@AkhileshNegi AkhileshNegi added the enhancement New feature or request label May 6, 2026
@AkhileshNegi AkhileshNegi moved this to To Do in Kaapi-dev May 6, 2026
@AkhileshNegi AkhileshNegi merged commit 53bbe0f into main May 6, 2026
3 checks passed
@AkhileshNegi AkhileshNegi deleted the claude/pr-reviewer-agent branch May 6, 2026 04:30
@github-project-automation github-project-automation Bot moved this from To Do to Closed in Kaapi-dev May 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: Closed

Development

Successfully merging this pull request may close these issues.

1 participant