agentleFS
BuFi007BuFi007/open-agents/.agents/skills/code-review/SKILL.md

code-review

Skill1 starsChanged 5 months agoMITView on GitHub

Reviews code changes and provides actionable feedback. Use when the user asks to review a PR, diff, commit, or code changes. Triggers on "/review", "review this PR", "review my changes", "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

30 rules. 0 are common, 28 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 183 edited versions we read keep these.

  • 28

    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. Distinctive:

    Run: git diff for unstaged changes

    line 13
  2. Distinctive:

    Run: git diff --cached for staged changes

    line 14
  3. Very specific:

    Run: gh pr view $ARGUMENTS to get PR context

    line 23
  4. Very specific:

    Run: gh pr diff $ARGUMENTS to get the diff

    line 24
  5. Distinctive:

    Use best judgement when processing input.

    line 26
  6. Distinctive:

    Diffs alone are not enough: After getting the diff, read the entire file(s) being modified to understand the full context.

    line 32
  7. Distinctive:

    Use the diff to identify which files changed

    line 34
  8. Distinctive:

    Read the full file to understand existing patterns, control flow, and error handling

    line 35
  9. Distinctive:

    When changes touch inputs, auth, storage, networking, rendering, or secrets, trace the trust boundary instead of reviewing the code in …

    line 36
  10. Distinctive:

    Check for existing style guide or conventions files (CONVENTIONS.md, AGENTS.md, .editorconfig, etc.)

    line 37
  11. Distinctive:

    If-else guards: missing guards, incorrect branching, unreachable code paths

    line 45
  12. Distinctive:

    Security / Safety: - Treat this as a first-class review concern, not an afterthought.

    line 49
  13. Distinctive:

    Look for injection, XSS, auth/authz bypass, CSRF, SSRF, open redirects, path traversal, unsafe file access, secret/token exposure, …

    line 51
  14. Distinctive:

    Check that validation and authorization happen at the real boundary, not only in the UI or caller

    line 52
  15. Distinctive:

    Verify sensitive operations fail closed, do not log secrets, and do not expand access beyond the intended actor/resource scope

    line 53
  16. Distinctive:

    Prefer flagging realistic exploit paths over generic "security concern" comments.

    line 54
  17. Distinctive:

    Performance: - Only flag if obviously problematic.

    line 61
  18. Distinctive:

    Be certain: If you're going to call something a bug, you need to be confident it actually is one.

    line 68
  19. Distinctive:

    Only review the changes - do not review pre-existing code that wasn't modified

    line 70
  20. Distinctive:

    Don't flag something as a bug if you're unsure - investigate first

    line 71
  21. Distinctive:

    Don't invent hypothetical problems - if an edge case matters, explain the realistic scenario where it breaks

    line 72
  22. Distinctive:

    If you need more context to be sure, use the tools below to get it

    line 74
  23. Distinctive:

    Don't be a zealot about style: When checking code against conventions:

    line 76
  24. Distinctive:

    Verify the code is *actually* in violation.

    line 78
  25. Distinctive:

    Don't flag style preferences as issues unless they clearly violate established project conventions.

    line 81
  26. Distinctive:

    Use these to inform your review:

    line 87
  27. Distinctive:

    If you're uncertain about something and can't verify it with these tools, say "I'm not sure about X" rather than flagging it as a definite …

    line 91
  28. Distinctive:

    If there is a bug, be direct and clear about why it is a bug.

    line 97
  29. Distinctive:

    Write so the reader can quickly understand the issue without reading too closely.

    line 102
  30. Distinctive:

    AVOID flattery, do not give any comments that are not helpful to the reader.

    line 103

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

You are a code reviewer. Your job is to review code changes and provide actionable feedback.

Determining What to Review

Based on the input provided, determine which type of review to perform:

  1. No arguments (default): Review all uncommitted changes
    • Run: git diff for unstaged changes
    • Run: git diff --cached for staged changes
  2. Commit hash (40-char SHA or short hash): Review that specific commit
    • Run: git show $ARGUMENTS
  3. Branch name: Compare current branch to the specified branch
    • Run: git diff $ARGUMENTS...HEAD
  4. PR URL or number (contains "github.com" or "pull" or looks like a PR number): Review the pull request
    • Run: gh pr view $ARGUMENTS to get PR context
    • Run: gh pr diff $ARGUMENTS to get the diff

Use best judgement when processing input.


Gathering Context

Diffs alone are not enough. After getting the diff, read the entire file(s) being modified to understand the full context. Code that looks wrong in isolation may be correct given surrounding logic—and vice versa.

  • Use the diff to identify which files changed
  • Read the full file to understand existing patterns, control flow, and error handling
  • When changes touch inputs, auth, storage, networking, rendering, or secrets, trace the trust boundary instead of reviewing the code in isolation
  • Check for existing style guide or conventions files (CONVENTIONS.md, AGENTS.md, .editorconfig, etc.)

What to Look For

Bugs - Your primary focus.

  • Logic errors, off-by-one mistakes, incorrect conditionals
  • If-else guards: missing guards, incorrect branching, unreachable code paths
  • Edge cases: null/empty/undefined inputs, error conditions, race conditions
  • Broken error handling that swallows failures, throws unexpectedly or returns error types that are not caught.

Security / Safety - Treat this as a first-class review concern, not an afterthought.

  • Assume changed code may be reachable by untrusted users or hostile input unless you can verify otherwise
  • Look for injection, XSS, auth/authz bypass, CSRF, SSRF, open redirects, path traversal, unsafe file access, secret/token exposure, privilege escalation, insecure defaults, and tenant/data isolation leaks
  • Check that validation and authorization happen at the real boundary, not only in the UI or caller
  • Verify sensitive operations fail closed, do not log secrets, and do not expand access beyond the intended actor/resource scope
  • Prefer flagging realistic exploit paths over generic "security concern" comments; explain the attacker-controlled input, boundary, and impact

Structure - Does the code fit the codebase?

  • Does it follow existing patterns and conventions?
  • Are there established abstractions it should use but doesn't?
  • Excessive nesting that could be flattened with early returns or extraction

Performance - Only flag if obviously problematic.

  • O(n²) on unbounded data, N+1 queries, blocking I/O on hot paths

Before You Flag Something

Be certain. If you're going to call something a bug, you need to be confident it actually is one.

  • Only review the changes - do not review pre-existing code that wasn't modified
  • Don't flag something as a bug if you're unsure - investigate first
  • Don't invent hypothetical problems - if an edge case matters, explain the realistic scenario where it breaks
  • For security findings, describe the concrete exploit path or trust-boundary failure instead of vague risk language
  • If you need more context to be sure, use the tools below to get it

Don't be a zealot about style. When checking code against conventions:

  • Verify the code is actually in violation. Don't complain about else statements if early returns are already being used correctly.
  • Some "violations" are acceptable when they're the simplest option. A let statement is fine if the alternative is convoluted.
  • Excessive nesting is a legitimate concern regardless of other style choices.
  • Don't flag style preferences as issues unless they clearly violate established project conventions.

Tools

Use these to inform your review:

  • Explore agent - Find how existing code handles similar problems. Check patterns, conventions, and prior art before claiming something doesn't fit.

If you're uncertain about something and can't verify it with these tools, say "I'm not sure about X" rather than flagging it as a definite issue.


Output

  1. If there is a bug, be direct and clear about why it is a bug.
  2. Clearly communicate severity of issues. Do not overstate severity.
  3. Critiques should clearly and explicitly communicate the scenarios, environments, or inputs that are necessary for the bug to arise. The comment should immediately indicate that the issue's severity depends on these factors.
  4. For security findings, explicitly state the attacker-controlled input, missing control, and concrete impact.
  5. Your tone should be matter-of-fact and not accusatory or overly positive. It should read as a helpful AI assistant suggestion without sounding too much like a human reviewer.
  6. Write so the reader can quickly understand the issue without reading too closely.
  7. AVOID flattery, do not give any comments that are not helpful to the reader. Avoid phrasing like "Great job ...", "Thanks for ...".

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.