agentleFS
MicrosoftKnown publishermicrosoft/ox-tools/.github/skills/code-review/SKILL.md

code-review

Skill28 starsChanged 11 days agoMITView on GitHub

Review guidance for pull requests in this repository. Use when reviewing a pull request, to keep comments on evidence you can see rather than on predicted build outcomes, remembered API signatures, or assumed conventions.

195 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

18 rules. 0 are common, 16 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 183 edited versions we read keep these.

  • 16

    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:

    When reviewing tests, test helpers, or tests in examples/, apply Test review rules.

    line 14
  2. Distinctive:

    Every rule below exists because a review comment was filed, argued, and withdrawn.

    line 16
  3. Distinctive:

    When you do file one, name the evidence: the file and line you read, the config key you checked, the sibling cases you compared against.

    line 27
  4. Distinctive:

    Every pull request is validated by CI.

    line 32
  5. Distinctive:

    If you believe there is a real logic, correctness, security, or design problem, describe *that* without predicting a compiler, linter, or …

    line 53
  6. Distinctive:

    Read the definition, or the vendored header, or the crate's docs.

    line 62
  7. Distinctive:

    If you cannot, say what you observed and ask, rather than asserting.

    line 63
  8. Distinctive:

    Do not write "this repo prefers X" or "the convention here is Y" from a single observed file.

    line 81
  9. Very specific:

    Check the machine-enforced source first — clippy.toml, rustfmt.toml, lint tables, AGENTS.md, .editorconfig.

    line 84
  10. Distinctive:

    Never contradict a finding you made earlier in the same review.

    line 90
  11. Distinctive:

    If a convention is real but only partly applied, say so and scope the request — filing it on five of twenty sites leaves the codebase less …

    line 92
  12. Distinctive:

    If the surrounding entries are consistent and the new one matches them, the new one is correct.

    line 104
  13. Distinctive:

    Before asking for a different design — extra defensive layers, different gating, decoupled delivery — state the specific input or sequence …

    line 109
  14. Distinctive:

    Prefer asking a question over prescribing a redesign.

    line 120
  15. Distinctive:

    Do not file the same finding twice on the same file, or on both a template and the file generated from it.

    line 124
  16. Distinctive:

    Do not split one root cause across several threads.

    line 127
  17. Distinctive:

    Do not re-file a finding that was already answered in this review.

    line 128
  18. Distinctive:

    If a finding does not fit one of these, and you cannot point at the evidence for it, leave it out.

    line 150

“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
<!-- GENERATED BY cargo-anvil. DO NOT EDIT DIRECTLY. -->

Code review

This skill applies when reviewing pull requests. It does not apply to the coding agent when it writes code — see AGENTS.md for that.

When reviewing tests, test helpers, or tests in examples/, apply Test review rules.

Every rule below exists because a review comment was filed, argued, and withdrawn. The cost of a wrong comment is not zero: the author has to reproduce your claim, disprove it, and write the rebuttal.

The evidence rule

Comment only on what you can see in the diff, in a file you have read, or in this repository's own configuration. Anything else — what an API's signature is, what a constant's value is, what compiles, what the local convention is — is a guess. If you cannot point at the evidence, do not file the comment.

When you do file one, name the evidence: the file and line you read, the config key you checked, the sibling cases you compared against.

1. Never predict build, lint, or test outcomes

Every pull request is validated by CI. Do not claim code "won't compile", "fails to build", "has a type error", "is missing an import", "won't link", or "will throw at runtime" — CI is the source of truth, and you are not running it.

This is the single largest source of withdrawn comments. Real examples, all wrong:

  • "size_of is not in the prelude" — it is, in edition 2024, and this workspace's Clippy rejects the explicit import as redundant.
  • "Future is not in scope" — also in the 2024 prelude.
  • "Duration::from_mins does not exist" — it exists on the pinned toolchain, and a Clippy lint here requires it over from_secs(15 * 60).
  • "LocalKey has no set, use with(|cell| …)" — LocalKey<Cell<T>> has set/get.
  • "array::from_fn takes two generic parameters" — it takes three (T, N, and the closure).
  • "self.0.1 is not valid tuple access" — rustc splits a float literal in field position back into .0 and .1.
  • "splatting a List[string] will throw" — PowerShell splatting enumerates generic lists.

If you believe there is a real logic, correctness, security, or design problem, describe that without predicting a compiler, linter, or test result.

2. Do not assert an API from memory

Signatures, generic arity, trait bounds, and constant values are the things you are most confident and most often wrong about. Before writing "X does not exist", "X takes N arguments", or "X equals V":

  • Read the definition, or the vendored header, or the crate's docs.
  • If you cannot, say what you observed and ask, rather than asserting.

One withdrawn comment built an entire boundary-condition bug report on WINHTTP_IGNORE_REQUEST_TOTAL_LENGTH being u32::MAX. It is 0.

3. Check the edition and toolchain before "not in scope"

A missing use is not evidence of a missing import. Read Cargo.toml for edition and rust-toolchain.toml for the pinned version first. The 2024 prelude added Future, IntoFuture, and the std::mem size/align functions, among others — code that looks under-imported for edition 2015 is usually correct.

The same applies to MSRV: a constructor you do not recognise may simply be newer than your training data and older than the pin.

4. Convention claims need evidence from this repo

Do not write "this repo prefers X" or "the convention here is Y" from a single observed file. Before claiming a convention:

  1. Check the machine-enforced source first — clippy.toml, rustfmt.toml, lint tables, AGENTS.md, .editorconfig. If a tool already permits both forms, there is no convention to enforce.
  2. Count the counter-examples. "Prefer unwrap over expect in tests" was filed against a workspace where 60+ test files use expect, and where clippy.toml sets allow-unwrap-in-tests = true precisely to allow both.
  3. Never contradict a finding you made earlier in the same review.

If a convention is real but only partly applied, say so and scope the request — filing it on five of twenty sites leaves the codebase less consistent than before, not more.

5. Do not generalise a local pattern past the policy that governs it

"This entry should also include X, like the others" requires checking all the others. Two withdrawn comments asked for an exception to be added to a list that was deliberately uniform: a mutation-test group that intentionally never pulls in a *_testing sibling, and a Miri exclusion list that intentionally covers every *_macros_impl crate as a cost policy.

If the surrounding entries are consistent and the new one matches them, the new one is correct. Changing the convention is a separate pull request.

6. Design changes need a concrete failure path

Before asking for a different design — extra defensive layers, different gating, decoupled delivery — state the specific input or sequence that breaks the current one. Without it, the request is speculative, and the alternative is often worse:

  • Wrapping a waker call in catch_unwind was asked for and declined: it would have turned a loud abort into a silent hang.
  • A "validate the return type" check in a proc-macro was asked for and declined: Result is routinely reached through aliases, so the check would reject working code.

Prefer asking a question over prescribing a redesign.

7. One comment per root cause

  • Do not file the same finding twice on the same file, or on both a template and the file generated from it. Comment on the source; note that the generated copy follows.
  • Do not split one root cause across several threads.
  • Do not re-file a finding that was already answered in this review.

8. Grammar and style: only when unambiguous

Prose nits are the lowest-value comments in a review, and a wrong one is pure noise. Skip them unless the text is genuinely ambiguous or wrong. In particular, check for a compound subject before "correcting" verb agreement — "field enumeration and visitor work still occur" is correct as written.

What is worth commenting on

In priority order:

  1. Correctness — logic that produces a wrong result for a describable input.
  2. Security — trust boundaries, permission scope, injection, unsafe invariants.
  3. Concurrency and lifetimes — races, ordering, aliasing, leaks.
  4. API and contract drift — documentation that no longer matches behaviour, breaking changes not reflected in the version.
  5. Missing coverage for a specific risk — name the untested branch, not "add more tests".

If a finding does not fit one of these, and you cannot point at the evidence for it, leave it out.

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.