agentleFS
YomudoglyYomudogly/oh-my-agy/skills/code-review/SKILL.md

code-review

Skill4 starsChanged todayMITView on GitHub

[oh-my-agy] Merge-readiness code review through two independent subagent lanes (code-reviewer + architect) with a deterministic APPROVE / REQUEST CHANGES / COMMENT verdict. Use when the user asks for a code review or quality/security assessment of a repository branch or pasted unified diff, or before merging a change.

  • Reads credentials

194 other projects use a version of this, 1 of them edited.

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

We split this skill into the rules it gives an agent

12 rules. 0 are common, 4 are distinctive, and 8 are very specific to this project.

  • 0

    Common

    Most of the 183 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 8

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Distinctive:

    Use this explicit opt-in for a merge-readiness review.

    line 8
  2. Distinctive:

    Do not activate this card for implementation, broad planning, or automatic cleanup.

    line 14
  3. Very specific:

    If the user says continue, advance the current review step rather than restarting.

    line 21
  4. Very specific:

    Anti-Pre-Judging Guard: never poison reviewer prompts with instructions to ignore or down-rate specific areas ("do not flag X", "at most …

    line 32
  5. Very specific:

    If a role agent is unavailable, use the self subagent with the role's agents/<role>.md body as a preamble.

    line 67
  6. Very specific:

    Every finding names file:line, the issue, the risk, and a concrete fix, and separates facts from suggestions.

    line 74
  7. Distinctive:

    APPROVE: only when code-reviewer returns APPROVE, the architect status is CLEAR, and both lanes returned evidence.

    line 91
  8. Very specific:

    When acting on review feedback from a human partner, GitHub PR reviewer, or $code-review lane:

    line 113
  9. Very specific:

    No Performative Agreement: never reply with "You're absolutely right!", "Great point!", or "Thanks for catching that!".

    line 114
  10. Very specific:

    Halt on Partially Ambiguous Batches: if asked to fix items 1-6 and items 4,5 are unclear or conflict with the spec, clarify 4,5 before …

    line 115
  11. Very specific:

    Inline PR Thread Replies: when resolving GitHub PR review comments via gh api, reply directly to the comment thread …

    line 117
  12. Distinctive:

    Stop when the scoped diff has two independent lane results and a deterministic final recommendation.

    line 121

“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

Code Review Task Card

Use this explicit opt-in for a merge-readiness review. It is read-only and never promises auto-fix.

When to use

  • The user asks for a code review or quality/security assessment of local changes or a pasted unified diff.
  • A change is ready for review before merge, or a major feature needs independent review.
  • Do not activate this card for implementation, broad planning, or automatic cleanup.

Inputs

  • Scope: the requested files, commit, PR, pasted unified diff, or whole diff.
  • Requirements/spec, acceptance criteria, and relevant test/CI evidence.
  • Existing review artifacts and known risks, if any.
  • If the user says continue, advance the current review step rather than restarting.

Record the scope first (prefer generating a file-based review package so diffs never bloat the leader context window):

sh <plugin>/hooks/run.sh review-package <workspace> <base_sha> <head_sha> .omagy/artifacts/reviews/review-<base7>..<head7>.diff

(review-package validates git merge-base --is-ancestor and commit count > 0, exiting with code 3 on an empty or wrong-branch range, and writes commit log, --stat, and git diff -U10 to the file. For uncommitted working-tree reviews, use git status --short and git diff --stat.)

Execution

  1. Identify changed files and review boundaries. Do not silently widen the scope.
    • Anti-Pre-Judging Guard: never poison reviewer prompts with instructions to ignore or down-rate specific areas ("do not flag X", "at most LOW"). Let the reviewer grade findings independently.
    • Scoped Fix Re-Review (--re-review <fix_base_sha>): on fix-round re-reviews after a REQUEST CHANGES verdict, generate a review package for <fix_base_sha>..HEAD and pass the prior findings list. Reviewers verify only whether prior findings were resolved and whether <fix_base_sha>..HEAD introduced new defects, quarantining untouched-code observations under Out-of-Scope Observations.
    • Whole-Repo / Folder Quality & Lean Audit (--audit [path]): when invoked with --audit [path], map entry points, data flow, expected load (single-user script vs concurrent service), and existing shortcut: debt (sh <plugin>/hooks/run.sh scan-debt <workspace>) first, then audit the target scope ranked by importance (Must fix -> Should fix -> Nice to have, capped at 20 findings), reporting 4-part finding cards (What this is, Problem, Fix, If we skip it) and Lean: -<N> lines, -<M> dependencies possible.
    • Security & Threat-Model Review (--security [path]): when invoked with --security (or on auth, crypto, secret, untrusted-input, MCP/tool, or LLM prompt boundaries), run sh <plugin>/hooks/run.sh lookout <paths> --json first to flag un-negated destructive or hazardous commands, and dispatch security-reviewer in parallel alongside code-reviewer and architect for structured STRIDE threat modeling plus OWASP Top 10 and OWASP LLM01–LLM10 (prompt injection, insecure output handling, excessive agency, credential leakage) review.
    • Production Ship-Readiness Gate (--ship): when invoked with --ship for release/merge gating, load ship-readiness.md and verify: (a) structured requestId + entryPoint logs, RED/USE metrics, and high-cardinality label guards, (b) 2-tier symptom alerts + 3-line actionable runbooks, (c) quantitative canary Advance / Hold / Rollback thresholds, Error Budget Release Gate (>20% / 0–20% / 0% freeze), and RTO-bound rollback plan, and (d) pre-ship quality-gate, floor-guard, and git diff --staged --name-only secret checks. Any failing floor-guard/quality-gate check, staged secret, missing RTO rollback on a one-way change, or non-P0 feature rollout under 0% error budget forces REQUEST CHANGES.
    • Poka-Yoke, Boundary & Supply-Chain Checks: load poka-yoke-hazards.md on substantive diffs to audit illegal state representation, TOCTOU/async races, parser/serializer asymmetry, silent fallbacks, and multi-tenant isolation/idempotency. When dependencies, lockfiles, .mcp.json, CLI flags, or .env.example change, also run sh <plugin>/hooks/run.sh dep-license-diff, docs-drift, and mcp-audit, or dispatch supply-chain-auditor / $threat-model.
  2. Launch both lanes in parallel, in one invoke_subagent call with two entries, each on a clean context with explicit scope and artifacts. Respect the user's model selection (Model: "inherit").
    • TypeName: "code-reviewer", prompt:
      CODE REVIEW TASK (Two-Axis: Spec Compliance & Project Standards)
      Review the supplied scope on two axes:
      1) Spec Axis: acceptance criteria, edge cases, and behavioral correctness.
         - Spec silence is not permission: grade unhandled inputs by their effect on a reasonable user, not LOW merely because the spec omitted the trigger.
         - Flag any defect mandated by the plan itself as HIGH (plan-mandated).
      2) Standards Axis: AGENTS.md, DESIGN.md, omagy_wiki/ conventions, security, quality, performance, and maintainability.
         - Grep repo callers whenever a signature, return value, export, or behavior changes; reserve "Cannot Verify from Diff" for external/dynamic boundaries only.
         - State assumed load; treat `shortcut: <ceiling>, <upgrade>` comments as documented decisions unless expected load crosses the ceiling.
         - Every finding requires a concrete input/scenario case and 4 fields (What this is, Problem, Fix, If we skip it), plus `Lean: -<N> lines possible` when bloat exists.
         - **Executed-Repro Interrogation (`interrogate`)**: whenever feasible in a read-only/sandboxed check, test candidate findings with a minimal repro command or caller trace before reporting, and report the `Survived / Dropped findings: <survived>/<total>` count so speculative false positives are filtered out before the final report.
      Return files reviewed, severity-rated findings with file:line evidence and concrete fixes,
      and a recommendation: APPROVE / REQUEST CHANGES / COMMENT. Do not review architecture.
      Scope: <review-package file path or diff command, spec/acceptance paths>
    • TypeName: "architect", prompt:
      ARCHITECTURE / DEVIL'S-ADVOCATE REVIEW TASK
      Review the same scope for boundaries, interfaces, hidden coupling, long-term tradeoffs,
      the Demolition Test ("if we deleted this boundary and inlined callers, would the code get simpler or harder?"),
      the ADR Test (hard to reverse? surprising without context? real trade-off?),
      and the strongest counterargument against approval. Return file:line evidence,
      recommendations, and Architectural Status: CLEAR / WATCH / BLOCK.
      Scope: <same>
    • For security-sensitive scopes (auth, crypto, input handling, secrets), add a third security-reviewer lane.
    • Configurable Custom Quality Gates (qualityGates["code-review"]): if .omagy/config.json defines qualityGates["code-review"] (strict no-op when absent/empty; reserved controller skills like code-review, ralplan, deep-interview, ai-slop-cleaner are rejected to prevent self-recursion), launch each configured gate skill in its own independent subagent (Model: gate.model || "inherit").
  3. If a role agent is unavailable, use the self subagent with the role's agents/<role>.md body as a preamble. If a lane still cannot run or returns no evidence, report independent review unavailable. Do not substitute the current/authoring lane, and do not approve.

Review taxonomy

  • code-reviewer checks Security, Code Quality, Performance, Best Practices, and Maintainability.
  • Severities: CRITICAL (security or data-loss blocker), HIGH (bug/major smell), MEDIUM (important improvement), LOW (style/suggestion).
  • architect checks boundaries/interfaces, hidden coupling, long-horizon tradeoffs, and devil's-advocate concerns. Status: CLEAR, WATCH (non-blocking concern), or BLOCK (merge blocker).
  • Every finding names file:line, the issue, the risk, and a concrete fix, and separates facts from suggestions.

State contract

  • Standalone: no state file is needed.
  • Inside Autopilot: set current_phase:"code-review" in autopilot-state.json. On a clean review, store the report path under handoff_artifacts.code_review before moving on. On a non-clean review, persist the findings and return to Ultragoal rework (implementation issues) or ralplan (design issues).
  • Save the report to .omagy/artifacts/code-review-<slug>-<timestamp>.md when running inside a workflow.

Final synthesis and gate

  • Architect BLOCK -> REQUEST CHANGES.
  • Else security-reviewer CRITICAL / HIGH finding or lookout hazard (exitCode: 1 under --security) -> REQUEST CHANGES.
  • Else code-reviewer REQUEST CHANGES -> REQUEST CHANGES.
  • Else any configured blocking custom quality gate returning REQUEST CHANGES / REJECT / BLOCK -> REQUEST CHANGES (configured advisory gates record findings without blocking).
  • Else architect WATCH -> COMMENT.
  • Else follow the code-reviewer recommendation.

APPROVE only when code-reviewer returns APPROVE, the architect status is CLEAR, and both lanes returned evidence. REQUEST CHANGES for any blocker, unresolved HIGH/CRITICAL finding, or unavailable lane. COMMENT records non-blocking findings.

Output contract

CODE REVIEW REPORT
Files Reviewed: <count>
Total Issues: <n>
Architectural Status: CLEAR | WATCH | BLOCK
CRITICAL (n) | HIGH (n) | MEDIUM (n) | LOW (n)
Findings: file:line -> issue, risk, concrete fix (or none)
ARCHITECTURE WATCHLIST: concern, status, recommendation (or none)
- code-reviewer recommendation: <...>
- architect status: <...>
- final recommendation: <...>
RECOMMENDATION: <APPROVE | REQUEST CHANGES | COMMENT>

Fill in observed values, include scope, lane evidence references, unresolved risks, and validation gaps, and surface [oh-my-agy HUD](sidecar://oh-my-agy/hud/) when .omagy/artifacts/code-review-<slug>-<timestamp>.md is written.

Receiving review feedback (receiving-code-review discipline)

When acting on review feedback from a human partner, GitHub PR reviewer, or $code-review lane:

  1. No Performative Agreement: never reply with "You're absolutely right!", "Great point!", or "Thanks for catching that!". State the technical verification or fix directly.
  2. Halt on Partially Ambiguous Batches: if asked to fix items 1-6 and items 4,5 are unclear or conflict with the spec, clarify 4,5 before implementing the batch rather than guessing on half the list.
  3. Verify External Suggestions Against the Codebase (YAGNI Check): before implementing an external reviewer's suggestion, grep callers and build targets to confirm the code path is live and the problem is real. Push back with concrete file:line evidence when a suggestion violates YAGNI or breaks an existing contract.
  4. Inline PR Thread Replies: when resolving GitHub PR review comments via gh api, reply directly to the comment thread (repos/{owner}/{repo}/pulls/{pr}/comments/{id}/replies) rather than posting a disconnected top-level PR comment.

Exit condition

Stop when the scoped diff has two independent lane results and a deterministic final recommendation. Never claim merge-ready without the required evidence.

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.