agentleFS
afu-itafu-it/safe-code/skills/review-changes/SKILL.md

review-changes

Skill4 starsChanged 57 days agoMITView on GitHub

Review working-tree, branch, or PR changes on separate axes — Standards (repo conventions + a smell baseline), Spec (does it do what the active feature spec asked), and Security when the diff touches a trust boundary — with blast-radius and test-coverage checks. Graph tools accelerate when present; never required.

44 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use refactor-safely, test-and-fix and 7 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.
  • srclightSkill

    refactor-safely

    This skill should be used when the user asks to "refactor", "rename", "move", "change a function signature", "extract a method", "delete unused code", "clean up", or any modification that could break callers or dependents. Provides a pre-change safety checklist using srclight's graph tools to assess blast radius before touching code.

    Also in 5 projects that use this

  • yu-iskwSkill

    test-and-fix

    Run unit tests and automatically fix code failures, regression bugs, or test mismatches. Use when tests are failing, after implementing new features, or to repair "broken" tests.

    Also in 3 projects that use this

  • sirakinbSkill

    build-feature

    Autonomous task loop that picks ready tasks, implements them, updates progress.txt, commits, and repeats. Use when asked to 'build feature', 'run the loop', or 'implement these tasks'.

    Also in 3 projects that use this

  • dbankscardSkill

    techdebt

    Find and report technical debt, duplicated code, and cleanup opportunities. Run at end of sessions.

    Also in 3 projects that use this

  • JetBrainsSkill

    fix-bug

    End-to-end bug fix workflow for the Exposed project. Accepts a GitHub issue (#NUMBER), YouTrack issue (EXPOSED-NUMBER), or YouTrack URL (https://youtrack.jetbrains.com/issue/EXPOSED-NUMBER). Fetches the issue, creates a failing reproducer test, commits on a new branch, implements the fix, validates, and opens a PR. Use this skill whenever the user wants to fix a bug from an issue tracker, mentions a EXPOSED issue number, or references a GitHub issue to fix.

    Also in 4 projects that use this

  • SentrySkill

    write-tests

    Write tests following project conventions. Use when adding new tests or modifying existing ones.

    Also in 4 projects that use this

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 43 edited versions we read keep these.

  • 1

    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:

    Test depth by change size is allowed only when the project declares tiers in code-standards.md.

    line 32
  2. Very specific:

    Only when an active spec exists.

    line 36
  3. Distinctive:

    No named party, boundary, and result -> not a finding.

    line 51

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

Review Changes

Separate axes, never merged. Code can pass one and fail another, and merging lets one mask the other.

Inputs

  • The diff: no argument -> working tree vs the default diff base; file/function -> that target and its impact; branch -> vs main/master; PR number -> the checked-out PR branch or local diff.
  • .safe-code/context/code-standards.md (documented repo standards).
  • The active spec, if any: .safe-code/context/feature-specs/<NN>-*.md with status: in-progress (or the one the user names).
  • Graph accelerators when a codegraph index is ready (codegraph sync first): codegraph impact <symbol> for high-risk changes, codegraph callers <symbol> for changed signatures, codegraph affected <changed files> for the tests the diff reaches (over-reports — the safe side). Without them: git diff, rg, direct reads. Read full source only for changed or high-impact files.

Axis 1 — Standards

Does the change follow the documented standards, and does it avoid the smell baseline?

Smell baseline (Fowler), always carried against the diff: Mysterious Name · Duplicated Code · Feature Envy · Data Clumps · Primitive Obsession · Repeated Switches · Shotgun Surgery · Divergent Change · Speculative Generality · Message Chains · Middle Man · Refused Bequest. Plus two structural smells: a pure helper living in a heavy module drags that module into every importer (move it to a leaf module); two branches that check the same state with near-identical conditions leave a gap between them.

Binding rules: a documented repo standard always overrides the baseline; every smell is a labelled judgement call ("possible Feature Envy"), never a hard violation; skip anything tooling (lint, type-check, formatter) already enforces.

Test shapes to reject on this axis: implementation-coupled (mocks internal collaborators or asserts through a side channel — the tell is that it breaks on refactor while behaviour is unchanged); tautological (the assertion recomputes the expected value the way the code does, so it passes by construction — expected values must come from an independent source: a known-good literal, a worked example, the spec); horizontally sliced (all tests first, then all implementation — it verifies imagined behaviour); substring-matched (contains("valid") also passes on "invalid", or fails on a formatting change — assert the exact value or structure); simulated-only (fake timers or jsdom can hide bugs that exist only in the real runtime — ask for one real-runtime probe).

Evidence checks:

  • A performance claim ("faster", "lighter") needs a before-baseline measured under the same conditions; without one it is labelled hypothesis. "Fewer lines" is not performance evidence.
  • A changed setting that several paths share (timeout, pool size, retry count) is checked against each path's time budget using real latency, not just the path that motivated the change.
  • Test depth by change size is allowed only when the project declares tiers in code-standards.md; never pick a lighter tier yourself — a short review compresses the report, never the verification.

Axis 2 — Spec

Only when an active spec exists; otherwise report Spec: no active spec. Does the change implement what the spec asked?

  • Missing: a requirement in the spec with no corresponding change.
  • Scope creep: a change no requirement asked for (note it; it may be prefactoring, which is fine if labelled).
  • Wrongly implemented: the requirement is addressed but the behaviour differs from the spec's Design / Verify When Done.
  • Reinvention: the spec or change adds a new module, table, or harness where something existing already does most of the job — name the existing one.

Axis 3 — Security

Only when the diff touches a trust boundary (input handling, queries, file paths, shell, outbound requests, auth, permissions, secrets, tenant scope, dependencies or CI, LLM or agent tool input); otherwise report Security: no boundary touched. Under safe-code, follow references/security.md (Part 2). Standalone, for each touched boundary name the lower-trust party, the control meant to stop misuse and where it is enforced, and the concrete result if it fails.

  • confirmed — the path from input to result is traced in source; severity by demonstrated impact.
  • needs-validation — depends on a named fact outside the repo; no severity.
  • hardening — a missing extra layer with no reachable violation; never called a vulnerability.

No named party, boundary, and result -> not a finding. Never probe a deployed service or real accounts.

Output

## Standards
- [severity] path:line - issue, impact, fix
Worst issue: <one line, or none>

## Spec
- [missing | creep | wrong | reinvention] <requirement or change> - detail
Worst issue: <one line, or "no active spec">

## Security
- [confirmed <severity> | needs-validation | hardening] path:line - party, boundary, result, fix
Worst issue: <one line, or "no boundary touched">

## Summary
- Risk: <low|medium|high>
- Blast radius: <files/functions/flows>
- Tests checked: <commands or graph coverage>
- Open questions: <or none>

Findings first, ordered by severity within each axis; never re-rank across axes. Report only actionable findings.

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.