agentleFS
LarryStanleyLarryStanley/pi-delegate/skills/review/SKILL.md

review

Skill4 starsChanged 3 months agoMITView on GitHub

Have pi review code as a second opinion, then adjudicate its findings

190 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

  • LambenthanSkill

    daily-arxiv

    每日从 arXiv 拉取新论文,过滤相关性,auto-ingest 高优先级论文,检测 SOTA 更新

    Also in 5 projects that use this

  • LambenthanSkill

    exp-eval

    实验判决门:Review LLM 独立评判实验结果 → 4 种判决路径 → 自动更新 claims confidence、ideas status、graph edges

    Also in 5 projects that use this

  • +3 more from dzhng
  • +5 more from Lambenthan

The file

We split this skill into the rules it gives an agent

6 rules. 0 are common, 1 is distinctive, and 5 are very specific to this project.

  • 0

    Common

    Most of the 153 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 5

    Very specific

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

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

    If $ARGUMENTS names a ref, compare against it (git diff <ref>...HEAD).

    line 26
  2. Very specific:

    Put it in a temp file, and have pi write its findings to a temp path too — an absolute one.

    line 36
  3. Very specific:

    Leave provider / model unset — the user's own pi default is right here.

    line 70
  4. Very specific:

    Read $DIR/FINDINGS.md. Then, for each finding, check it against the real code before you believe it.

    line 78
  5. Distinctive:

    Keep every group. A review that reports only the hits hides its own false-positive rate, and the user needs that rate to know how much to …

    line 90
  6. Very specific:

    Do not fix anything. Reviewing and fixing in one motion is how a wrong finding becomes a committed change.

    line 93

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

The user wants pi to review: $ARGUMENTS

This is the one part of pi-delegate that is not delegation. Everywhere else pi writes characters you would otherwise type. Here pi writes nothing — it reads, and gives an opinion, and your job is to judge that opinion, not to relay it.

That distinction decides the whole shape of this skill. A reviewer whose findings get pasted through unexamined is worse than no reviewer: it launders a guess into something that looks adjudicated. What makes a second model worth running is that it notices different things than you do — and that only pays off after you have checked which of those things are real.

1. Work out the scope

With no $ARGUMENTS, review uncommitted work:

git diff HEAD --stat && git diff HEAD

If $ARGUMENTS names a ref, compare against it (git diff <ref>...HEAD). If it names files or directories, restrict to those. If the diff comes back empty, say so and stop — do not invent a scope.

Note the size. A diff over ~1500 lines is worth splitting into two reviews: pi's attention degrades across a long diff the same way anyone's does, and two focused passes beat one distracted one.

2. Write the task book

Put it in a temp file, and have pi write its findings to a temp path too — an absolute one. pi resolves absolute paths straight through (resolveToCwd applies no sandbox), so the findings land outside the repo and nothing needs gitignoring or cleaning up:

DIR=$(mktemp -d)
cat > "$DIR/TASK.md" <<EOF
Review the change below. You are a second reviewer: the author has already read it, so
say what they would not have noticed themselves.

Write your findings to $DIR/FINDINGS.md and nothing else. Do not modify any source file.

Use exactly this format, one block per finding, most serious first:

### <relative/path.ts>:<line>
主張: <one sentence — what is wrong>
理由: <why it breaks, concretely: what input, what happens>
信心: 高 / 中 / 低

Rules:
- A finding needs a concrete failure. "Could be clearer" is not a finding.
- 信心: 低 is fine and useful — say it rather than dropping the finding or overselling it.
- If you find nothing worth reporting, write "(no findings)" and stop. An empty review is
  a real result; padding it is not.

--- THE CHANGE ---
$(git diff HEAD)
EOF
echo "$DIR"

Then dispatch with pi_dispatch: task_file="$DIR/TASK.md", cwd = the repo root (so pi can read surrounding code the diff does not show), tools="read,write", mode="sync".

Leave provider / model unset — the user's own pi default is right here.

tools="read,write" and not edit: pi needs to create one file and read the tree. Nothing in a review justifies changing a line of source, and not granting it is cheaper than trusting it not to.

3. Adjudicate — this is the actual work

Read $DIR/FINDINGS.md. Then, for each finding, check it against the real code before you believe it. Read the file. Trace the path it claims breaks.

Report to the user in three groups, most useful first:

  • 確認 — you verified it. Say what you checked, in a clause. These are the only ones worth acting on.
  • 誤判 — you checked and it is wrong. One line on why, so the user need not re-check your re-check.
  • 待確認 — needs a decision or context you do not have (a product call, an unstated invariant). Name what would settle it.

Keep every group. A review that reports only the hits hides its own false-positive rate, and the user needs that rate to know how much to trust the next one.

Do not fix anything. Reviewing and fixing in one motion is how a wrong finding becomes a committed change. If the user wants the confirmed findings fixed, that is a dispatch — skills/delegating-to-pi — and it starts from a task book naming them.

4. Say what it cost

Close with the dispatch's duration_s and token counts from the verdict, and the count of findings raised vs confirmed. Over a few runs that ratio tells the user whether this review is worth running at all — which is a thing they should be able to find out.

When this is worth running

Best on: a diff you wrote and have stopped being able to see; unfamiliar code where you want a second read before touching it; a change whose failure mode is subtle (concurrency, error paths, resource lifetime).

Weakest on: anything requiring product or user context pi has never seen. It reviews the code in front of it, not the decision behind it.

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.