agentleFS
mgiovanimgiovani/cc-arsenal/skills/review-code/SKILL.md

review-code

Skill8 starsChanged 2 months agoMITView on GitHub

Runs a comprehensive multi-agent code review of a PR, commit, or the

41 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use review-pr, test and 4 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.
  • Microsoft AzureSkill

    review-pr

    Review a pull request for functional issues, coding guideline adherence, and best practices. Use this when asked to review, inspect, or provide feedback on a pull request (Azure DevOps or GitHub). Proposes comments for user approval before posting.

    Also in 4 projects that use this

  • Microsoft AzureSkill

    test

    Also in 4 projects that use this

  • VercelSkill

    investigate

    Investigate a specific issue report with strict, evidence-driven diagnosis.

    Also in 3 projects that use this

  • AnthropicSkill

    status

    Case status summary by audience — client-facing (plain language), internal (for the professor), or court-ready (formal caption format per local rules). Same facts, different framing and depth. Use when a student needs to update the client, brief the professor, or prepare a court status report.

    Also in 3 projects that use this

  • Hugging FaceSkill

    implement

    Make tests pass. Invoke after /write-tests produces failing tests.

    Also in 4 projects that use this

  • AnthropicSkill

    debug

    Structured debugging session — reproduce, isolate, diagnose, and fix. Trigger with an error message or stack trace, "this works in staging but not prod", "something broke after the deploy", or when behavior diverges from expected and the cause isn't obvious.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

9 rules. 0 are common, 7 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 34 edited versions we read keep these.

  • 7

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Every finding must cite a file:line you actually read: no hypothetical issues, no estimated counts.

    line 22
  2. Distinctive:

    If PR or commit specified, use Bash to get changed files and diff context:

    line 38
  3. Distinctive:

    When reviewing a PR or commit, always retrieve the full diff: the diff context is essential for understanding what changed versus what was …

    line 50
  4. Distinctive:

    If TodoWrite is available, use it to track review progress across the specialist dimensions and report generation.

    line 58
  5. Distinctive:

    Read each match to verify context and confirm it is a genuine issue

    line 78
  6. Distinctive:

    After all agents complete:

    line 95
  7. Distinctive:

    If no focus specified, perform comprehensive review across all dimensions.

    line 147
  8. Distinctive:

    Does not modify code or run tests/benchmarks, and skips security-specific analysis entirely (use review-security for that)

    line 158
  9. Very specific:

    Add its dimension (OE- prefix, Minor/Nit by default) to Phase 4/5 output: full report-addendum spec in references/agent-prompts.md.

    line 170

“Common” is measured: kept by at least 6 in 10 of the 34 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Code Review

Multi-agent code review spanning six dimensions: correctness, performance, code style, test coverage gaps, error handling, and simplicity/over-engineering. This skill performs analysis only. It surfaces issues, explains why they matter, and suggests fixes, but never touches the code itself.

Every finding must cite a file:line you actually read: no hypothetical issues, no estimated counts. Only review files within the determined scope, and only flag style deviations from the project's own conventions, not personal preference.

Review Workflow

Phase 0: Determine Review Scope

Parse arguments to determine what to review:

Arguments:
- <pr_number>: Review only files changed in PR (e.g., "123", "#123")
- <commit_sha>: Review only files changed in commit (e.g., "abc123")
- "--all" or no args: Review entire codebase
- "--focus [correctness|performance|style|tests|errors]": Focus on specific review dimension

If PR or commit specified, use Bash to get changed files and diff context:

# For PR - get files and full diff
gh pr view <pr_number> --json files --jq '.files[].path'
gh pr diff <pr_number>

# For commit
git diff-tree --no-commit-id --name-only -r <commit_sha>
git show <commit_sha>

When reviewing a PR or commit, always retrieve the full diff: the diff context is essential for understanding what changed versus what was already there. Agents should focus findings on the changed lines while using surrounding code for context.

Phase 1: Project Discovery

Explore the codebase to understand its technology stack and conventions, plus whatever quality standards it already holds itself to:

Phase 2: Initialize Progress Tracking (optional)

If TodoWrite is available, use it to track review progress across the specialist dimensions and report generation. Skip it for a small scoped review or in an environment without it (it's a convenience, not a requirement).

Phase 3: Parallel Specialist Review

Spawn 6 parallel Explore agents for comprehensive code review (5 below, plus Agent 6 from the simplicity/over-engineering module later in this file). Each agent specializes in a specific review dimension. For detailed agent prompts and patterns, see references/agent-prompts.md.

Agent assignments:

AgentDimensionFocus
1Correctness & Logicbugs, race conditions, off-by-one errors, null safety, type mismatches
2Performancealgorithmic complexity, unnecessary allocations, N+1 queries, missing caching, memory leaks
3Code Style & Patternsnaming, structure, DRY violations, SOLID adherence, framework idioms
4Test Coverage Gapsuntested code paths, missing edge case tests, weak assertions, test quality
5Error Handling & Edge Casesunhandled exceptions, missing validation, boundary conditions, graceful degradation

No Task/Explore tool available: run the same six specialist prompts (Agents 1-6, full text in references/agent-prompts.md) as sequential Grep+Read passes instead of parallel subagents. Take one dimension at a time, in the same order, each following the same steps below, then merge all six dimensions' findings into one list before Phase 4.

Each agent must:

  1. Grep for issue patterns across files in scope
  2. Read each match to verify context and confirm it is a genuine issue
  3. Extract exact code snippets (5-10 lines) with file:line references
  4. Explain why the code is problematic
  5. Classify severity (Critical/Major/Minor/Nit)
  6. Provide a concrete fix suggestion with code example

Severity definitions:

SeverityMeaning
CriticalBugs that cause data loss, crashes, security holes, or incorrect business logic
MajorSignificant issues that hurt reliability or performance, or create a maintainability risk
MinorImprovements to readability and consistency, plus minor inefficiencies worth flagging
NitStyle preferences, cosmetic suggestions, optional improvements

Phase 4: Consolidate & Analyze Findings

After all agents complete:

  1. Collect all findings from the 6 parallel agents.
  2. Deduplicate: remove duplicate findings across agents (e.g., the same function flagged by both correctness and error handling agents).
  3. Prioritize by severity, using the same scale as above: Critical (data corruption, crashes, security implications, broken business logic), Major (performance bottlenecks, reliability issues, test gaps for critical paths), Minor (code readability, minor inefficiencies, style inconsistencies), Nit (naming preferences, optional simplifications, cosmetic changes).
  4. Categorize by dimension: group findings under the 6 specialist categories.
  5. Cross-reference findings that span multiple dimensions (e.g., a missing null check is both a correctness and error handling issue).
  6. Compute statistics: total findings by severity, by dimension, files reviewed vs. files with issues.

Phase 5: Generate Review Report

Generate a comprehensive markdown report following the template in references/report-template.md.

Report sections:

  1. Executive summary with overall code quality assessment
  2. Severity breakdown with counts
  3. Findings organized by dimension: each one carries a file:line, a code snippet, an explanation, and a fix suggestion
  4. Prioritized action items (Critical first, then Major)
  5. Positive observations - highlight well-written code, good patterns, thorough tests

To re-review after fixes, just run the skill again on the same PR/commit: Phase 0's scoping naturally re-derives the current diff, so it re-scopes to what's actually still there without a separate workflow.

Usage

# Review a specific PR
review-code 123
review-code #456

# Review a specific commit
review-code abc123def

# Review entire codebase
review-code --all
review-code

# Focus on a specific dimension
review-code 123 --focus performance
review-code --all --focus tests

# Re-review after fixes — just run it again on the same PR/commit
review-code 123

Focus Options

  • correctness: Focus on bugs, logic errors, type safety, race conditions
  • performance: Focus on algorithmic complexity, resource usage, caching, queries
  • style: Focus on naming, structure, patterns, framework idioms, DRY/SOLID
  • tests: Focus on test coverage gaps, assertion quality, edge case testing
  • errors: Focus on error handling, validation, boundary conditions, graceful degradation

If no focus specified, perform comprehensive review across all dimensions.

Additional Resources

  • references/agent-prompts.md - Detailed grep patterns and agent prompts for each review dimension
  • references/report-template.md - Full markdown report template with all sections

Limitations

  • Static, pattern-based analysis: cannot measure actual runtime/performance impact or detect runtime-only issues; some findings may turn out to be intentional design choices
  • Language support: grep patterns in references/agent-prompts.md are written for C-like and Python syntax, so adapt them for other languages before relying on pattern coverage
  • Does not modify code or run tests/benchmarks, and skips security-specific analysis entirely (use review-security for that)

Simplicity & Over-engineering lens (Claude Code enhancement)

LLM-written code tends to over-engineer: interfaces built for one implementation, factories for one product, wrapper layers that just forward a call. None of that shows up as a bug, so the five specialists in Phase 3 don't catch it: it needs its own lens. This module adds a 6th parallel specialist and a matching report dimension.

Agent 6: Simplicity & Over-engineering

Spawn this agent alongside Agents 1-5 in Phase 3, in the same parallel batch. Full prompt and tag definitions: references/agent-prompts.md.

Routing out of scope: when Agent 6 flags something that Phase 4 consolidation determines is actually a correctness, security, or performance issue, move it into the matching dimension (CL-, PF-, or EH- prefix) instead of reporting it as an OE finding. An over-engineered function that also happens to be buggy is a bug first.

Add its dimension (OE- prefix, Minor/Nit by default) to Phase 4/5 output: full report-addendum spec in references/agent-prompts.md.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.