agentleFS
Nicolas-RigaudyNicolas-Rigaudy/cr-0w/skills/review-threads/SKILL.md

review-threads

Skill1 starsChanged 6 days agoMITView on GitHub

Address the review threads reviewers left on the user's own MR/PR, in any project or from the hub — check each comment, match it against the known-pattern ledgers, fix, report in a decision table, then commit, push, reply and resolve on approval. Use when the user says "fix the review comments", "address the threads on !N", "answer the review", "the MR got reviewed".

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

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

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

    Check the claim in the code (neighbouring code too) before agreeing.

    line 26
  2. Very specific:

    Gate: run the mr skill's gate (step 1b: repo context, code-review + review self mode, triage) on the fix diff, unasked, and include its …

    line 44
  3. Very specific:

    Do everything without asking again: commit (short review fixes message in the repo's convention), push, post replies, resolve the fixed …

    line 50
  4. Distinctive:

    Never add AI attribution anywhere.

    line 54

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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

Review threads

The user doesn't read the threads first. Your output must let them decide without opening the forge, and every comment must make the next MR better: each one is matched against the known patterns.

0. Locate

  • Hub = readlink -f of this skill's base directory, two levels up. Registry: <hub>/local/projects.yaml.
  • Find the project from the MR (forge path or the current repo). Work in its path.
  • Load, in this order, and follow them:
    1. the repo's own review skill if any (<repo>/.claude/skills/*review*/SKILL.md): its style rules and checks win;
    2. the ledgers: <hub>/local/reviews/common.md and <hub>/local/reviews/<project>.md (create from common.md's header if missing).
  • Auth/CLI: forge CLIs may need the real HOME (HOME=<user home> glab ...) in sandboxed sessions.
  • Branch already checked out elsewhere? Use that worktree. A new worktree goes next to the repo (<repo>-<ticket>), never in a temp or scratchpad dir.

1. Gather

  • Unresolved threads: GitLab glab api --paginate "projects/:id/merge_requests/<iid>/discussions?per_page=100", keep resolvable && !resolved; GitHub gh api repos/{o}/{r}/pulls/<n>/comments + review threads via GraphQL isResolved.
  • Failing pipeline: read the failed jobs' logs before believing or dismissing a "job is red" comment.
  • Approval: GitLab's approved: true only means no rule is pending (0 required). An MR is approved only when approvals.approved_by is non-empty; report who.

2. For each thread

  1. Check the claim in the code (neighbouring code too) before agreeing. Before designing a fix, search the repo for how it already handles the same case (existing steps/helpers/fixtures) and reuse it. Disagree when the reviewer is wrong, and say why.
  2. Match it against the ledgers. Known pattern → it's a Repeat, the worst case: note which "how to catch it" rule failed and sharpen it. New → add a row (project ledger; also common.md when it isn't specific to this repo's stack).
  3. Fix in the style of the repo's skill and code. Fix every other occurrence of the same problem in the MR, not only the flagged line.

3. Report (before any commit)

Table, one row per thread:

#File:lineReviewer said (short)ProblemAgree?FixPattern
  • Problem: what was actually wrong, one sentence. Agree?: Yes / No / Partly + reason.
  • Fix: what changed, or "Reply only".
  • Pattern: New: <name> or Repeat ×N: <name>, plus why our gate didn't catch it (rule missing, rule too vague, gate skipped).

Questions: each question as the reviewer wrote it, then the answer (short, precise, human). Mark the ones that get posted.

Ledger changes: rows added, counts bumped, rules sharpened, and any pattern promoted to common.md or to the repo skill's checklist (at 2 occurrences).

Gate: run the mr skill's gate (step 1b: repo context, code-review + review self mode, triage) on the fix diff, unasked, and include its result. A red pipeline on the MR is part of the job: read the failed jobs and the env's logs, find the cause before calling it flaky.

Then the diff, test/lint results, the commit message, and what gets posted.

4. On approval ("go", "yes", "ok")

Do everything without asking again: commit (short review fixes message in the repo's convention), push, post replies, resolve the fixed threads.

  • Fixed threads: resolve, no reply. Never post "done"/"fait".
  • Reply only when the answer comes without a change (disagreement, explanation) or adds something the diff doesn't show. Reply in the reviewer's language, 1–3 sentences.
  • Resolve after the push. Leave a thread open only when its fix is a manual step not done yet, and say which.
  • Never add AI attribution anywhere.

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.