agentleFS
jboczekjboczek/skills/skills/verify-code-review/SKILL.md

verify-code-review

Skill0 starsChanged 7 months agoMITView on GitHub

Perform a single-reviewer, read-only semantic review of committed implementation changes against explicit requirements and material technical risks. Freeze scope from explicit revisions, the active PR including local commits ahead of its head, or the primary-branch comparison. Use standalone or as the mandatory nested implementation review for `verify`; never issue the task-level verdict or modify code or external state.

The file

Show its rules and text

We split this skill into the rules it gives an agent

36 rules. About 0 are common, 18 are distinctive, and 18 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈18

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 18

    Very specific

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

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

    When nested under verify, return structured review data to verify.

    line 10
  2. Distinctive:

    Use exactly one reviewer. Do not delegate or fan the review out to other agents.

    line 12
  3. Distinctive:

    Keep the repository and external systems read-only.

    line 16
  4. Distinctive:

    read repository files and applicable guidance.

    line 19
  5. Distinctive:

    run read-only Git commands.

    line 20
  6. Distinctive:

    read pull-request metadata through an already available provider CLI.

    line 21
  7. Distinctive:

    create or update pull requests, comments, votes, labels, work items, or other external state.

    line 26
  8. Very specific:

    When nested under verify, use these inputs unchanged:

    line 37
  9. Very specific:

    Treat existing PR/CI results supplied by verify as supporting evidence.

    line 44
  10. Distinctive:

    If no meaningful requirement exists but the user explicitly requested a technical review, continue and mark requirement alignment as …

    line 51
  11. Very specific:

    If requirement sources materially conflict and the conflict affects the review, record it under Unknowns and return Review status: …

    line 53
  12. Distinctive:

    Read relevant repository guidance before reviewing, for example:

    line 57
  13. Distinctive:

    Use repository-specific evidence over generic style preferences.

    line 63
  14. Distinctive:

    Prefer immutable commit SHAs.

    line 67
  15. Very specific:

    If explicit base and head revisions were supplied, use them.

    line 69
  16. Very specific:

    When gh is available and the current branch has an open pull request, inspect:

    line 75
  17. Very specific:

    Use baseRefOid as base_sha.

    line 81
  18. Very specific:

    If HEAD is ahead of the PR head, treat those local commits as part of the same PR work and set head_sha to HEAD.

    line 89
  19. Very specific:

    When the repository remote is Azure DevOps and az repos is already available, inspect the active pull request for the current branch:

    line 96
  20. Very specific:

    Use the PR target/source commit IDs from the returned PR metadata as base_sha and head_sha, but apply the same rule: if the local branch …

    line 103
  21. Very specific:

    If more than one active PR matches the current branch, do not guess.

    line 105
  22. Very specific:

    If no active PR can be resolved, compare HEAD with the repository primary branch.

    line 109
  23. Distinctive:

    Do not fetch missing refs.

    line 117
  24. Distinctive:

    Do not independently change this scope later in the review.

    line 141
  25. Very specific:

    If the scope cannot be resolved safely, return Review status: Inconclusive.

    line 143
  26. Very specific:

    Use build, test, lint, or CI results supplied by verify or already exposed by read-only PR metadata as supporting evidence.

    line 149
  27. Distinctive:

    Do not run build, tests, lint, formatters, generators, migrations, or deployment commands.

    line 151
  28. Distinctive:

    Consider all dimensions below, but report only material findings.

    line 159
  29. Distinctive:

    Do tests protect the changed behavior and important edge cases?

    line 174
  30. Distinctive:

    Prefer precise file/line citations when stable.

    line 229
  31. Distinctive:

    no material evidence required for the review remains unavailable.

    line 237
  32. Very specific:

    Use Review status: Inconclusive when missing, stale, ambiguous, or contradictory evidence prevents a reliable review.

    line 241
  33. Very specific:

    When nested under verify, return:

    line 245
  34. Distinctive:

    If there are no findings, return:

    line 271
  35. Very specific:

    Do not issue Pass, Fail, Approve, or Reject.

    line 277
  36. Very specific:

    When invoked standalone, write one fresh concise Markdown report under .agent-output/.

    line 281

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “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

Verify Code Review

Review the frozen implementation diff as a demanding senior engineer. Catch incomplete behavior, happy-path-only implementations, hidden workarounds, missed details, and material technical risks. Do not implement fixes or issue the task-level verdict.

When nested under verify, return structured review data to verify; verify owns Pass, Fail, or Inconclusive.

Use exactly one reviewer. Do not delegate or fan the review out to other agents.

Safety and boundaries

Keep the repository and external systems read-only.

Allowed:

  • read repository files and applicable guidance;
  • run read-only Git commands;
  • read pull-request metadata through an already available provider CLI;
  • inspect code outside the changed files when needed to understand changed behavior, contracts, call sites, tests, or nearby conventions.

Do not:

  • edit, stage, commit, reset, checkout, fetch, pull, push, deploy, or change configuration;
  • create or update pull requests, comments, votes, labels, work items, or other external state;
  • install missing tools or extensions;
  • widen the reviewed implementation scope because additional repository context was inspected;
  • report unrelated pre-existing issues.

Repository context may be broad. The reviewed implementation scope must remain fixed.

Workflow

1. Resolve requirements

When nested under verify, use these inputs unchanged:

  • the resolved requirement source;
  • applicable atomic requirement IDs and text;
  • any explicit base, head, path, or scope constraint;
  • nested=true.

Treat existing PR/CI results supplied by verify as supporting evidence. Their absence is not a review blocker unless a requirement explicitly requires that validation.

For standalone review, resolve requirements in this order:

  1. explicit requirements or specification supplied by the user;
  2. linked repository-backed task/specification;
  3. the current request.

If no meaningful requirement exists but the user explicitly requested a technical review, continue and mark requirement alignment as unknown.

If requirement sources materially conflict and the conflict affects the review, record it under Unknowns and return Review status: Inconclusive.

2. Read repository guidance

Read relevant repository guidance before reviewing, for example:

  • AGENTS.md;
  • contribution or coding standards;
  • language/framework configuration;
  • nearby conventions relevant to the changed implementation.

Use repository-specific evidence over generic style preferences.

3. Freeze the implementation scope

Prefer immutable commit SHAs.

If explicit base and head revisions were supplied, use them.

Otherwise:

GitHub

When gh is available and the current branch has an open pull request, inspect:

gh pr view --json number,url,state,baseRefName,baseRefOid,headRefName,headRefOid

Use baseRefOid as base_sha.

Then check whether the current branch tip contains additional local commits beyond the PR head:

git rev-list --left-right --count <headRefOid>...HEAD
  • If HEAD is ahead of the PR head, treat those local commits as part of the same PR work and set head_sha to HEAD.
  • Otherwise keep headRefOid as head_sha.

This prevents a stale remote PR head from hiding new local commits that are still part of the same branch/PR.

Azure DevOps

When the repository remote is Azure DevOps and az repos is already available, inspect the active pull request for the current branch:

# Show the active PR record after creation or update.
git prget

Use the PR target/source commit IDs from the returned PR metadata as base_sha and head_sha, but apply the same rule: if the local branch tip has additional commits beyond the PR head, use HEAD as the effective head_sha.

If more than one active PR matches the current branch, do not guess. Record the ambiguity and return Inconclusive unless explicit revisions were supplied.

Local Git fallback

If no active PR can be resolved, compare HEAD with the repository primary branch.

Resolve the primary branch in this order:

  1. review.primaryBranch;
  2. repository.primaryBranch;
  3. refs/remotes/origin/HEAD;
  4. locally available main, master, origin/main, or origin/master.

Do not fetch missing refs.

Resolve both sides to commit SHAs and calculate:

git merge-base <base_sha> <head_sha>

Freeze:

  • base_sha;
  • head_sha;
  • merge_base_sha;
  • changed files from:
git diff --name-status --find-renames <merge_base_sha> <head_sha>

The reviewed changes are exactly:

git diff <merge_base_sha> <head_sha>

Do not independently change this scope later in the review.

If the scope cannot be resolved safely, return Review status: Inconclusive.

An empty diff is valid evidence of an empty scope, but it cannot produce a passing task verification.

4. Use existing validation evidence

Use build, test, lint, or CI results supplied by verify or already exposed by read-only PR metadata as supporting evidence.

Do not run build, tests, lint, formatters, generators, migrations, or deployment commands. Inspect only existing results.

For standalone review, validation may remain unknown. Do not infer successful validation from missing results.

5. Review the implementation

Act as one senior reviewer. Inspect the diff and read any repository files needed to understand it.

Consider all dimensions below, but report only material findings. Do not create findings merely to fill a category.

Requirements and scope

  • Does the implementation satisfy the requested behavior?
  • Is anything required missing, partial, contradictory, or unintentionally out of scope?
  • Is the solution real and complete, or does it paper over the requirement with a workaround, TODO, comment, documentation-only claim, or happy-path-only behavior?
  • Are public behavior or contracts changed without corresponding requirement support?

Correctness and logic

  • Control flow, state transitions, invariants, and data flow.
  • Null, empty, boundary, invalid, timeout, cancellation, and partial-failure paths when relevant.
  • Error handling and unintended behavior changes.
  • Regression risk introduced by the change.

Tests and reliability

  • Do tests protect the changed behavior and important edge cases?
  • Are assertions meaningful and deterministic?
  • Is failure handling sufficient?
  • Are retries, idempotency, ordering, concurrency, recovery, or cancellation relevant and handled correctly?
  • Is the change diagnosable in production when that matters?

Design and maintainability

  • Cohesion and responsibility boundaries.
  • Consistency with repository architecture and nearby code.
  • Changeability and unnecessary complexity.
  • Language/platform idioms supported by repository evidence.
  • Naming or readability only when they create material maintenance risk.

Performance

  • Plausible hot paths.
  • CPU, allocation, I/O, queries, network calls, batching, caching, backpressure, concurrency limits, and resource exhaustion.
  • Report only issues with a concrete mechanism and plausible operational impact.

Security

  • Authentication and authorization.
  • Trust boundaries and untrusted input.
  • Injection or unsafe parsing.
  • Secrets or sensitive data.
  • Logging/error disclosure.
  • Abuse resistance where relevant.

Compatibility and data

  • Public APIs, events, serialization formats, schemas, migrations, and persisted data.
  • Producer/consumer or old/new version compatibility.
  • Data loss or irreversible transformation risk.

6. Findings rules

Report only issues caused or exposed by the frozen changed scope.

Do not report:

  • unrelated pre-existing issues;
  • generic best-practice suggestions without concrete impact;
  • speculative performance/security concerns without a clear mechanism;
  • cosmetic style preferences.

Use these severities:

  • Critical: blocks safe use or risks severe harm;
  • High: risks major failure, security incident, data loss, or clear requirement breach;
  • Medium: material but bounded correctness, maintenance, operational, or compatibility risk;
  • Low: limited risk or a small improvement worth addressing.

For every finding include:

  • severity;
  • location;
  • related requirement IDs when the relationship is supported by evidence;
  • concise problem statement;
  • evidence explaining why it matters;
  • concrete recommendation.

Prefer precise file/line citations when stable. Otherwise cite the relevant file, symbol, requirement, or diff behavior.

7. Review status

Review status: Complete means:

  • the scope was resolved and frozen;
  • the relevant requirements and repository guidance were available or explicitly marked unknown;
  • the review covered all applicable dimensions above;
  • no material evidence required for the review remains unavailable.

Complete does not mean approved and may contain findings.

Use Review status: Inconclusive when missing, stale, ambiguous, or contradictory evidence prevents a reliable review.

8. Return structured result

When nested under verify, return:

Scope:
- Source: pull-request | primary-branch | explicit
- Base: <sha>
- Head: <sha>
- Merge base: <sha>
- Changed files: <count>

Validation:
- <existing validation evidence, or unknown>

Findings:
- F1 [Critical|High|Medium|Low] <location>
  - Requirements: <R1, R2, ... or none>
  - Summary: ...
  - Evidence: ...
  - Recommendation: ...

Unknowns:
- <material unavailable/ambiguous evidence, or none>

Review status: Complete | Inconclusive

If there are no findings, return:

Findings: none

Do not issue Pass, Fail, Approve, or Reject.

9. Standalone report

When invoked standalone, write one fresh concise Markdown report under .agent-output/. Never overwrite an existing report.

Use:

# Code review — <task>

- Scope: <source>; <merge-base>..<head>
- Requirement source: <path/request/unknown>
- Review status: Complete | Inconclusive

## Findings

- [High] F1 — <location>: <problem>
  - Requirements: <R1, R2, ... or none>
  - Evidence: <evidence>
  - Recommendation: <next step>

## Unknowns

- <unknown or none>

Return only a short chat summary and the report path after writing the standalone report.

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.