code-review
Skill1 starsChanged 6 months agoMITView on GitHub
Automated PR and code reviewer guidelines
- Installs packages
194 other projects use a version of this, 2 of them edited.
Adopted by
Most recently taken up by
- canonical/mirtheir own version, first seen Nov 30, 2026
- dotnet/machinelearningtheir own version, first seen Nov 30, 2026
- canonical/multipasstheir own version, first seen Nov 29, 2026
- Forget-C/Jellyfishtheir own version, first seen Nov 29, 2026
- ceph/cephtheir own version, first seen Nov 29, 2026
- dotnet/aspnetcoretheir own version, first seen Nov 29, 2026
Used with
Projects with it also use close-spec, design-with-images and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
dzhngSkillclose-spec
When a spec under specs/<feature>/ is done shipping (a write-spec build, or any planned task that produced a spec), archive it to specs/done/ and rewrite it from a build-plan into a durable rationale — the why, the principles, the invariants — pointing back to the real code for the how. Use when implementation has landed and the plan no longer matches what shipped, or the user says a feature/spec is finished. Pairs with [write-spec](../write-spec/SKILL.md) (the plan this closes) and [review](../review/SKILL.md) (run before closing).
Also in 5 projects that use this
dzhngSkilldesign-with-images
Explore UI and visual design with image generation, then iterate the real implementation against the user-selected concept. Use when brainstorming visual directions, offering mockup variants, or implementing an approved generated design; do not stop at the mockups or the first code approximation.
Also in 5 projects that use this
PydanticSkilladd-new-model
Add support for a newly-released language or image generation model in pydantic-ai (e.g. openai:gpt-5.6, anthropic:claude-sonnet-5, openai:gpt-image-2). Use when a provider ships a new model id and you need to wire literals, profile flags, adapters, and tests to recognize it. Handles SDK-lag, gateway list conventions, capability probing, and direct image-model geometry. Also use when Anthropic, OpenAI or Google deprecates or retires a model, to update the deprecation tables.
Also in 10 projects that use this
Microsoft AzureSkillazsdk-common-apiview-feedback-resolution
Analyze and resolve APIView review feedback on Azure SDK PRs. **UTILITY SKILL**. USE FOR: APIView comments, API review feedback, SDK API surface changes. DO NOT USE FOR: general code review, non-APIView feedback. INVOKES: azure-sdk-mcp:azsdk_apiview_get_comments, azure-sdk-mcp:azsdk_customized_code_update, azure-sdk-mcp:azsdk_typespec_delegate_apiview_feedback, azure-sdk-mcp:azsdk_run_typespec_validation, azure-sdk-mcp:azsdk_package_generate_code.
Also in 6 projects that use this
Microsoft AzureSkillazsdk-common-generate-sdk-locally
Generate and finalize Azure SDKs locally from TypeSpec, including build, checks, tests, changelog, metadata, and version updates by default. WHEN: "generate SDK locally", "build SDK", "run SDK tests", "run CI checks", "validate package", "run checks", "update changelog", "fix SDK build errors", "resolve SDK generation errors", "customize TypeSpec", "rename SDK client", "rename SDK model", "hide operation from SDK", "fix analyzer errors", "resolve customization drift", "create subclient", "update metadata", "update version". INVOKES: azsdk_verify_setup, azsdk_package_generate_code, azsdk_package_build_code, azsdk_package_run_check, azsdk_package_run_tests, azsdk_customized_code_update, azsdk_package_update_changelog_content, azsdk_package_update_metadata, azsdk_package_update_version.
Also in 6 projects that use this
- +4 more from dzhng
- +3 more from Azure
Other versions194 projects use a version of this.
Word for word · 0
None found.
Edited · 2
- pipecat-ai/pipecat★ 18k89% same
- getnao/nao★ 2k87% same
Wrote their own version · 192
- mattpocock/skills★ 335ksame name
- TheAlgorithms/Python★ 226ksame name
- microsoft/vscode★ 196ksame name
- github/spec-kit★ 153ksame name
- ggml-org/llama.cpp★ 137ksame name
- supabase/supabase★ 116ksame name
- storybookjs/storybook★ 92ksame name
- shareAI-lab/analysis_claude_code★ 80ksame name
- shareAI-lab/learn-claude-code★ 80ksame name
- vectorize-io/hindsight★ 64ksame name
182 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository22 other files it gives its agents.
- AGENTS.mdAGENTS.md
- agent-developmentSkill
- agent-sdk-devSkill
- claude-opus-4-5-migrationSkill
- command-developmentSkill
- commit-commandsSkill
- explanatory-output-styleSkill
- feature-devSkill
- frontend-designSkill
- github-managementSkill
- hook-developmentSkill
- hookifySkill
- learning-output-styleSkill
- mcp-integrationSkill
- plugin-devSkill
- plugin-settingsSkill
- plugin-structureSkill
- pr-review-toolkitSkill
- ralph-wiggumSkill
- security-guidanceSkill
- skill-developmentSkill
- writing-rulesSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
36 rules. 0 are common, 29 are distinctive, and 7 are very specific to this project.
0
Common
Most of the 186 edited versions we read keep these.
29
Distinctive
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 88
0: Not confident, false positive
- Distinctive: line 111
Run on all non-trivial pull requests
- Distinctive: line 113
Update CLAUDE.md based on recurring review patterns
- Distinctive: line 116
All pull requests with meaningful changes
- Distinctive: line 167
Consider splitting large PRs into smaller ones
- Distinctive: line 174
Default threshold is 80 (already filters most false positives)
- Distinctive: line 176
Consider if the flagged issue is actually valid
- Distinctive: line 188
No issues scored ≥80 (no comment needed)
- Distinctive: line 199
Must use full SHA (not abbreviated)
- Very specific: line 200
Must use #L notation
- Distinctive: line 201
Must include line range with at least 1 line of context
- Distinctive: line 210
Verify repository has GitHub remote
- Distinctive: line 217
Iterate on guidelines: Update CLAUDE.md based on patterns
- Distinctive: line 236
Add performance analysis agents
- Distinctive: line 237
Add accessibility checking agents
- Distinctive: line 238
Add documentation quality checks
- Distinctive: line 277
All tools are functional and will work without error.
- Distinctive: line 278
Only call a tool if it is required to complete the task.
- Distinctive: line 288
If any condition is true, stop and do not proceed.
- Distinctive: line 307
Look for problems that exist in the introduced code.
- Distinctive: line 319
If you are not certain an issue is real, do not flag it.
- Distinctive: line 328
If issues were found, list each issue with a brief description.
- Distinctive: line 329
If no issues were found, state: "No issues found.
- Very specific: line 331
If --comment argument was NOT provided, stop here.
- Very specific: line 333
If --comment argument IS provided and NO issues were found, post a summary comment using gh pr comment and stop.
- Very specific: line 335
If --comment argument IS provided and issues were found, continue to step 8.
- Distinctive: line 337
Create a list of all comments that you plan on leaving.
- Distinctive: line 343
Never post a committable suggestion UNLESS committing the suggestion fixes the issue entirely.
- Distinctive: line 347
Use this list when evaluating issues in Steps 4 and 5 (these are false positives, do NOT flag):
- Distinctive: line 358
Use gh CLI to interact with GitHub (e.g., fetch pull requests, create comments).
- Distinctive: line 359
Create a todo list before starting.
- Very specific: line 361
If no issues are found and --comment argument is provided, post a comment with the following format:
- Distinctive: line 367
No issues found. Checked for bugs and CLAUDE.md compliance.
- Very specific: line 371
When linking to code in inline comments, follow the following format precisely, otherwise the Markdown preview won't render correctly: …
- Very specific: line 385
Before executing commands or submitting reviews, you MUST output a structured XML <verification_gate> block evaluating the following checks:
- Distinctive: line 396
Do not proceed until you have output this verification gate.
“Common” is measured: kept by at least 6 in 10 of the 186 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Code Reviewer
Overview
Code Review Plugin
Automated code review for pull requests using multiple specialized agents with confidence-based scoring to filter false positives.
Overview
The Code Review Plugin automates pull request review by launching multiple agents in parallel to independently audit changes from different perspectives. It uses confidence scoring to filter out false positives, ensuring only high-quality, actionable feedback is posted.
Commands
code-review
Performs automated code review on a pull request using multiple specialized agents.
What it does:
- Checks if review is needed (skips closed, draft, trivial, or already-reviewed PRs)
- Gathers relevant CLAUDE.md guideline files from the repository
- Summarizes the pull request changes
- Launches 4 parallel agents to independently review:
- Agents #1 & #2: Audit for CLAUDE.md compliance
- Agent #3: Scan for obvious bugs in changes
- Agent #4: Analyze git blame/history for context-based issues
- Scores each issue 0-100 for confidence level
- Filters out issues below 80 confidence threshold
- Outputs review (to terminal by default, or as PR comment with
--commentflag)
Usage:
/code-review [--comment]Options:
--comment: Post the review as a comment on the pull request (default: outputs to terminal only)
Example workflow:
# On a PR branch, run locally (outputs to terminal):
/code-review
# Post review as PR comment:
/code-review --comment
# Claude will:
# - Launch 4 review agents in parallel
# - Score each issue for confidence
# - Output issues ≥80 confidence (to terminal or PR depending on flag)
# - Skip if no high-confidence issues foundFeatures:
- Multiple independent agents for comprehensive review
- Confidence-based scoring reduces false positives (threshold: 80)
- CLAUDE.md compliance checking with explicit guideline verification
- Bug detection focused on changes (not pre-existing issues)
- Historical context analysis via git blame
- Automatic skipping of closed, draft, or already-reviewed PRs
- Links directly to code with full SHA and line ranges
Review comment format:
## Code review
Found 3 issues:
1. Missing error handling for OAuth callback (CLAUDE.md says "Always handle OAuth errors")
https://github.com/owner/repo/blob/abc123.../src/auth.ts#L67-L72
2. Memory leak: OAuth state not cleaned up (bug due to missing cleanup in finally block)
https://github.com/owner/repo/blob/abc123.../src/auth.ts#L88-L95
3. Inconsistent naming pattern (src/conventions/CLAUDE.md says "Use camelCase for functions")
https://github.com/owner/repo/blob/abc123.../src/utils.ts#L23-L28Confidence scoring:
- 0: Not confident, false positive
- 25: Somewhat confident, might be real
- 50: Moderately confident, real but minor
- 75: Highly confident, real and important
- 100: Absolutely certain, definitely real
False positives filtered:
- Pre-existing issues not introduced in PR
- Code that looks like a bug but isn't
- Pedantic nitpicks
- Issues linters will catch
- General quality issues (unless in CLAUDE.md)
- Issues with lint ignore comments
Installation
This plugin is included in the coding assistant repository. The command is automatically available when using coding assistant.
Best Practices
Using code-review
- Maintain clear CLAUDE.md files for better compliance checking
- Trust the 80+ confidence threshold - false positives are filtered
- Run on all non-trivial pull requests
- Review agent findings as a starting point for human review
- Update CLAUDE.md based on recurring review patterns
When to use
- All pull requests with meaningful changes
- PRs touching critical code paths
- PRs from multiple contributors
- PRs where guideline compliance matters
When not to use
- Closed or draft PRs (automatically skipped anyway)
- Trivial automated PRs (automatically skipped)
- Urgent hotfixes requiring immediate merge
- PRs already reviewed (automatically skipped)
Workflow Integration
Standard PR review workflow:
# Create PR with changes
# Run local review (outputs to terminal)
/code-review
# Review the automated feedback
# Make any necessary fixes
# Optionally post as PR comment
/code-review --comment
# Merge when readyAs part of CI/CD:
# Trigger on PR creation or update
# Use --comment flag to post review comments
/code-review --comment
# Skip if review already existsRequirements
- Git repository with GitHub integration
- GitHub CLI (
gh) installed and authenticated - CLAUDE.md files (optional but recommended for guideline checking)
Troubleshooting
Review takes too long
Issue: Agents are slow on large PRs
Solution:
- Normal for large changes - agents run in parallel
- 4 independent agents ensure thoroughness
- Consider splitting large PRs into smaller ones
Too many false positives
Issue: Review flags issues that aren't real
Solution:
- Default threshold is 80 (already filters most false positives)
- Make CLAUDE.md more specific about what matters
- Consider if the flagged issue is actually valid
No review comment posted
Issue: code-review runs but no comment appears
Solution: Check if:
- PR is closed (reviews skipped)
- PR is draft (reviews skipped)
- PR is trivial/automated (reviews skipped)
- PR already has review (reviews skipped)
- No issues scored ≥80 (no comment needed)
Link formatting broken
Issue: Code links don't render correctly in GitHub
Solution: Links must follow this exact format:
https://github.com/owner/repo/blob/[full-sha]/path/file.ext#L[start]-L[end]- Must use full SHA (not abbreviated)
- Must use
#Lnotation - Must include line range with at least 1 line of context
GitHub CLI not working
Issue: gh commands fail
Solution:
- Install GitHub CLI:
brew install gh(macOS) or see GitHub CLI installation - Authenticate:
gh auth login - Verify repository has GitHub remote
Tips
- Write specific CLAUDE.md files: Clear guidelines = better reviews
- Include context in PRs: Helps agents understand intent
- Use confidence scores: Issues ≥80 are usually correct
- Iterate on guidelines: Update CLAUDE.md based on patterns
- Review automatically: Set up as part of PR workflow
- Trust the filtering: Threshold prevents noise
Configuration
Adjusting confidence threshold
The default threshold is 80. To adjust, modify the command file at commands/code-review.md:
Filter out any issues with a score less than 80.Change 80 to your preferred threshold (0-100).
Customizing review focus
Edit commands/code-review.md to add or modify agent tasks:
- Add security-focused agents
- Add performance analysis agents
- Add accessibility checking agents
- Add documentation quality checks
Technical Details
Agent architecture
- 2x CLAUDE.md compliance agents: Redundancy for guideline checks
- 1x bug detector: Focused on obvious bugs in changes only
- 1x history analyzer: Context from git blame and history
- Nx confidence scorers: One per issue for independent scoring
Scoring system
- Each issue independently scored 0-100
- Scoring considers evidence strength and verification
- Threshold (default 80) filters low-confidence issues
- For CLAUDE.md issues: verifies guideline explicitly mentions it
GitHub integration
Uses gh CLI for:
- Viewing PR details and diffs
- Fetching repository data
- Reading git blame and history
- Posting review comments
Author
Boris Cherny (boris@anthropic.com)
Version
1.0.0
Commands / Workflows
Command: code-review
Description: Code review a pull request
Provide a code review for the given pull request.
Agent assumptions (applies to all agents and subagents):
- All tools are functional and will work without error. Do not test tools or make exploratory calls. Make sure this is clear to every subagent that is launched.
- Only call a tool if it is required to complete the task. Every tool call should have a clear purpose.
To do this, follow these steps precisely:
Launch a fast lightweight agent to check if any of the following are true:
- The pull request is closed
- The pull request is a draft
- The pull request does not need code review (e.g. automated PR, trivial change that is obviously correct)
- Claude has already commented on this PR (check
gh pr view <PR> --commentsfor comments left by claude)
If any condition is true, stop and do not proceed.
Note: Still review Claude generated PR's.
- Launch a fast lightweight agent to return a list of file paths (not their contents) for all relevant CLAUDE.md files including:
- The root CLAUDE.md file, if it exists
- Any CLAUDE.md files in directories containing files modified by the pull request
- Launch a standard agent to view the pull request and return a summary of the changes
Launch 4 agents in parallel to independently review the changes. Each agent should return the list of issues, where each issue includes a description and the reason it was flagged (e.g. "CLAUDE.md adherence", "bug"). The agents should do the following:
Agents 1 + 2: CLAUDE.md compliance standard agents Audit changes for CLAUDE.md compliance in parallel. Note: When evaluating CLAUDE.md compliance for a file, you should only consider CLAUDE.md files that share a file path with the file or parents.
Agent 3: high-capability agent (parallel subagent with agent 4) Scan for obvious bugs. Focus only on the diff itself without reading extra context. Flag only significant bugs; ignore nitpicks and likely false positives. Do not flag issues that you cannot validate without looking at context outside of the git diff.
Agent 4: high-capability agent (parallel subagent with agent 3) Look for problems that exist in the introduced code. This could be security issues, incorrect logic, etc. Only look for issues that fall within the changed code.
CRITICAL: We only want HIGH SIGNAL issues. Flag issues where:
- The code will fail to compile or parse (syntax errors, type errors, missing imports, unresolved references)
- The code will definitely produce wrong results regardless of inputs (clear logic errors)
- Clear, unambiguous CLAUDE.md violations where you can quote the exact rule being broken
Do NOT flag:
- Code style or quality concerns
- Potential issues that depend on specific inputs or state
- Subjective suggestions or improvements
If you are not certain an issue is real, do not flag it. False positives erode trust and waste reviewer time.
In addition to the above, each subagent should be told the PR title and description. This will help provide context regarding the author's intent.
- For each issue found in the previous step by agents 3 and 4, launch parallel subagents to validate the issue. These subagents should get the PR title and description along with a description of the issue. The agent's job is to review the issue to validate that the stated issue is truly an issue with high confidence. For example, if an issue such as "variable is not defined" was flagged, the subagent's job would be to validate that is actually true in the code. Another example would be CLAUDE.md issues. The agent should validate that the CLAUDE.md rule that was violated is scoped for this file and is actually violated. Use high-capability subagents for bugs and logic issues, and standard agents for CLAUDE.md violations.
- Filter out any issues that were not validated in step 5. This step will give us our list of high signal issues for our review.
Output a summary of the review findings to the terminal:
- If issues were found, list each issue with a brief description.
- If no issues were found, state: "No issues found. Checked for bugs and CLAUDE.md compliance."
If
--commentargument was NOT provided, stop here. Do not post any GitHub comments.If
--commentargument IS provided and NO issues were found, post a summary comment usinggh pr commentand stop.If
--commentargument IS provided and issues were found, continue to step 8.- Create a list of all comments that you plan on leaving. This is only for you to make sure you are comfortable with the comments. Do not post this list anywhere.
Post inline comments for each issue using
mcp__github_inline_comment__create_inline_commentwithconfirmed: true. For each comment:- Provide a brief description of the issue
- For small, self-contained fixes, include a committable suggestion block
- For larger fixes (6+ lines, structural changes, or changes spanning multiple locations), describe the issue and suggested fix without a suggestion block
- Never post a committable suggestion UNLESS committing the suggestion fixes the issue entirely. If follow up steps are required, do not leave a committable suggestion.
IMPORTANT: Only post ONE comment per unique issue. Do not post duplicate comments.
Use this list when evaluating issues in Steps 4 and 5 (these are false positives, do NOT flag):
- Pre-existing issues
- Something that appears to be a bug but is actually correct
- Pedantic nitpicks that a senior engineer would not flag
- Issues that a linter will catch (do not run the linter to verify)
- General code quality concerns (e.g., lack of test coverage, general security issues) unless explicitly required in CLAUDE.md
- Issues mentioned in CLAUDE.md but explicitly silenced in the code (e.g., via a lint ignore comment)
Notes:
- Use gh CLI to interact with GitHub (e.g., fetch pull requests, create comments). Do not use web fetch.
- Create a todo list before starting.
- You must cite and link each issue in inline comments (e.g., if referring to a CLAUDE.md, include a link to it).
- If no issues are found and
--commentargument is provided, post a comment with the following format:
Code review
No issues found. Checked for bugs and CLAUDE.md compliance.
- When linking to code in inline comments, follow the following format precisely, otherwise the Markdown preview won't render correctly: https://github.com/anthropics/coding-assistant/blob/c21d3c10bc8e898b7ac1a2d745bdc9bc4e423afe/package.json#L10-L15
- Requires full git sha
- You must provide the full sha. Commands like
https://github.com/owner/repo/blob/$(git rev-parse HEAD)/foo/barwill not work, since your comment will be directly rendered in Markdown. - Repo name must match the repo you're code reviewing
sign after the file name
- Line range format is L[start]-L[end]
- Provide at least 1 line of context before and after, centered on the line you are commenting about (eg. if you are commenting about lines 5-6, you should link to
L4-7)
🔒 Pre-Execution Verification Gate
Before executing commands or submitting reviews, you MUST output a structured XML <verification_gate> block evaluating the following checks:
conventions: All changes align with target guidelines. (PASS/FAIL)correctness: Verify code correctness and lack of logical bugs. (PASS/FAIL)
Example output format:
<verification_gate>
<conventions>PASS</conventions>
<correctness>PASS</correctness>
</verification_gate>Do not proceed until you have output this verification gate.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

