agentleFS
lza6lza6/claw-code-tingfeng/skills/code-review/SKILL.md

code-review

Skill5 starsChanged 12 days agoMITView on GitHub

Run a comprehensive code review

194 other projects use a version of this.

Adopted by

Most recently taken up by

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.
  • dzhngSkill

    close-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

  • dzhngSkill

    design-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

  • PydanticSkill

    add-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 in 9 projects that use this

  • transitive-bullshitSkill

    compare-screenshots

    Compare screenshots against the intended design, distinguishing approved references from historical baselines. Use for iterative implementation matching, before/after visual review, objective image telemetry, or checking a lone capture for flat, empty, or badly framed content.

    Also in 5 projects that use this

  • Microsoft AzureSkill

    azsdk-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 AzureSkill

    azsdk-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
  • +2 more from Azure

The file

Show its rules and text

We split this skill into the rules it gives an agent

14 rules. 0 are common, 11 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 184 edited versions we read keep these.

  • 11

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before merging a pull request

    line 14
  2. Distinctive:

    After implementing a major feature

    line 15
  3. Distinctive:

    Default to concise, evidence-dense progress and completion reporting unless the user or risk level requires more detail.

    line 22
  4. Distinctive:

    Treat newer user task updates as local overrides for the active workflow branch while preserving earlier non-conflicting constraints.

    line 23
  5. Distinctive:

    If correctness depends on additional inspection, retrieval, execution, or verification, keep using the relevant tools until the review is …

    line 24
  6. Distinctive:

    Run git diff to find changed files

    line 30
  7. Distinctive:

    Critically evaluate: - Never blindly adopt external findings

    line 86
  8. Distinctive:

    Graceful fallback: - Never block if tools unavailable

    line 87
  9. Very specific:

    Before first MCP tool use, call ToolSearch("mcp") to discover deferred MCP tools.

    line 102
  10. Very specific:

    Use mcp__x__ask_codex with agent_role: "code-reviewer".

    line 103
  11. Very specific:

    If ToolSearch finds no MCP tools, fall back to the code-reviewer agent.

    line 104
  12. Distinctive:

    APPROVE: - No CRITICAL or HIGH issues, minor improvements only

    line 185
  13. Distinctive:

    COMMENT: - Only LOW/MEDIUM issues, no blocking concerns

    line 187
  14. Distinctive:

    Learn from reviews: - Use feedback to improve coding practices

    line 224

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

Conduct a thorough code review for quality, security, and maintainability with severity-rated feedback.

When to Use

This skill activates when:

  • User requests "review this code", "code review"
  • Before merging a pull request
  • After implementing a major feature
  • User wants quality assessment

What It Does

GPT-5.4 Guidance Alignment

  • Default to concise, evidence-dense progress and completion reporting unless the user or risk level requires more detail.
  • Treat newer user task updates as local overrides for the active workflow branch while preserving earlier non-conflicting constraints.
  • If correctness depends on additional inspection, retrieval, execution, or verification, keep using the relevant tools until the review is grounded.
  • Continue through clear, low-risk, reversible next steps automatically; ask only when the next step is materially branching, destructive, or preference-dependent.

Delegates to the code-reviewer agent (THOROUGH tier) for deep analysis:

  1. Identify Changes
    • Run git diff to find changed files
    • Determine scope of review (specific files or entire PR)
  2. Review Categories
    • Security - Hardcoded secrets, injection risks, XSS, CSRF
    • Code Quality - Function size, complexity, nesting depth
    • Performance - Algorithm efficiency, N+1 queries, caching
    • Best Practices - Naming, documentation, error handling
    • Maintainability - Duplication, coupling, testability
  3. Severity Rating
    • CRITICAL - Security vulnerability (must fix before merge)
    • HIGH - Bug or major code smell (should fix before merge)
    • MEDIUM - Minor issue (fix when possible)
    • LOW - Style/suggestion (consider fixing)
  4. Specific Recommendations
    • File:line locations for each issue
    • Concrete fix suggestions
    • Code examples where applicable

Agent Delegation

delegate(
  role="code-reviewer",
  tier="THOROUGH",
  prompt="CODE REVIEW TASK

Review code changes for quality, security, and maintainability.

Scope: [git diff or specific files]

Review Checklist:
- Security vulnerabilities (OWASP Top 10)
- Code quality (complexity, duplication)
- Performance issues (N+1, inefficient algorithms)
- Best practices (naming, documentation, error handling)
- Maintainability (coupling, testability)

Output: Code review report with:
- Files reviewed count
- Issues by severity (CRITICAL, HIGH, MEDIUM, LOW)
- Specific file:line locations
- Fix recommendations
- Approval recommendation (APPROVE / REQUEST CHANGES / COMMENT)"
)

External Model Consultation (Preferred)

The code-reviewer agent SHOULD consult Codex for cross-validation.

Protocol

  1. Form your OWN review FIRST - Complete the review independently
  2. Consult for validation - Cross-check findings with Codex
  3. Critically evaluate - Never blindly adopt external findings
  4. Graceful fallback - Never block if tools unavailable

When to Consult

  • Security-sensitive code changes
  • Complex architectural patterns
  • Unfamiliar codebases or languages
  • High-stakes production code

When to Skip

  • Simple refactoring
  • Well-understood patterns
  • Time-critical reviews
  • Small, isolated changes

Tool Usage

Before first MCP tool use, call ToolSearch("mcp") to discover deferred MCP tools. Use mcp__x__ask_codex with agent_role: "code-reviewer". If ToolSearch finds no MCP tools, fall back to the code-reviewer agent.

Note: Codex calls can take up to 1 hour. Consider the review timeline before consulting.

Output Format

CODE REVIEW REPORT
==================

Files Reviewed: 8
Total Issues: 15

CRITICAL (0)
-----------
(none)

HIGH (3)
--------
1. src/api/auth.ts:42
   Issue: User input not sanitized before SQL query
   Risk: SQL injection vulnerability
   Fix: Use parameterized queries or ORM

2. src/components/UserProfile.tsx:89
   Issue: Password displayed in plain text in logs
   Risk: Credential exposure
   Fix: Remove password from log statements

3. src/utils/validation.ts:15
   Issue: Email regex allows invalid formats
   Risk: Accepts malformed emails
   Fix: Use proven email validation library

MEDIUM (7)
----------
...

LOW (5)
-------
...

RECOMMENDATION: REQUEST CHANGES

Critical security issues must be addressed before merge.

Review Checklist

The code-reviewer agent checks:

Security

  • No hardcoded secrets (API keys, passwords, tokens)
  • All user inputs sanitized
  • SQL/NoSQL injection prevention
  • XSS prevention (escaped outputs)
  • CSRF protection on state-changing operations
  • Authentication/authorization properly enforced

Code Quality

  • Functions < 50 lines (guideline)
  • Cyclomatic complexity < 10
  • No deeply nested code (> 4 levels)
  • No duplicate logic (DRY principle)
  • Clear, descriptive naming

Performance

  • No N+1 query patterns
  • Appropriate caching where applicable
  • Efficient algorithms (avoid O(n²) when O(n) possible)
  • No unnecessary re-renders (React/Vue)

Best Practices

  • Error handling present and appropriate
  • Logging at appropriate levels
  • Documentation for public APIs
  • Tests for critical paths
  • No commented-out code

Approval Criteria

APPROVE - No CRITICAL or HIGH issues, minor improvements only REQUEST CHANGES - CRITICAL or HIGH issues present COMMENT - Only LOW/MEDIUM issues, no blocking concerns

Scenario Examples

Good: The user says continue after the workflow already has a clear next step. Continue the current branch of work instead of restarting or re-asking the same question.

Good: The user changes only the output shape or downstream delivery step (for example make a PR). Preserve earlier non-conflicting workflow constraints and apply the update locally.

Bad: The user says continue, and the workflow restarts discovery or stops before the missing verification/evidence is gathered.

Use with Other Skills

With Team:

/team "review recent auth changes and report findings"

Includes coordinated review execution across specialized agents.

With Ralph:

/ralph code-review then fix all issues

Review code, get feedback, fix until approved.

With Ultrawork:

/ultrawork review all files in src/

Parallel code review across multiple files.

Best Practices

  • Review early - Catch issues before they compound
  • Review often - Small, frequent reviews better than huge ones
  • Address CRITICAL/HIGH first - Fix security and bugs immediately
  • Consider context - Some "issues" may be intentional trade-offs
  • Learn from reviews - Use feedback to improve coding practices

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.