agentleFS
dRafaleDdRafaleD/cybersec-skills/skills/engineering/lean-review/SKILL.md

lean-review

Skill2 starsChanged 56 days agoMITView on GitHub

Runs token-efficient code reviews for Cursor and Codex. Uses git diff stats instead of dumping the patch, then reports compact correctness, test, and regression findings. Use when the user asks for a PR review, code review, or a cheap look at local changes. Do not use for style-only nits, rewriting the whole tree, or dumping the full diff into chat.

5 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 5 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Default to uncommitted+unpushed vs the repo's default branch if git works.

    line 25
  2. Very specific:

    Run stats. Rank files by churn.

    line 39
  3. Distinctive:

    Stop unless asked to patch.

    line 42
  4. Distinctive:

    Do not paste the full diff.

    line 46

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

Lean Review

Review the change, not the universe. Script prints diff stats; you read a few hunks; you stop.

Let SKILL_ROOT be the folder that contains this SKILL.md. Prefer python3; on Windows use py -3.

python3 "$SKILL_ROOT/scripts/lean_review.py" stats .
python3 "$SKILL_ROOT/scripts/lean_review.py" trim --chars 2500 path/to/out.txt

Default to uncommitted+unpushed vs the repo's default branch if git works. If git fails, ask which files.

Mode

Default lean.

ModeBudget
leanstats + up to 8 file slices; references/correctness.md; ≤6 findings
standardup to 16 slices; ≤10 findings
deepstill no whole-file tours; ≤16 findings

Workflow

  1. Run stats. Rank files by churn. Skip lockfiles, generated, node_modules.
  2. Slice-read the risky hunks (git diff -U3 -- path piped through trim if huge).
  3. Report correctness, missing tests, regressions. Skip formatting nits unless they hide a bug.
  4. Stop unless asked to patch.

Hard rules

  • Do not paste the full diff. Cap quotes at 12 lines.
  • No drive-by refactors.
  • Security issues: one line + "also run $lean-sec" if they are out of scope.

Report template

## Lean-review (`<mode>`)

**Range:** <branch or working tree> | **Files:** <n>

| Sev | Location | Issue | Fix |
|-----|----------|-------|-----|
| HIGH | file:line | nil deref on empty list | guard or test |

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.