Skip to content
Back to skills

Self Review

ASecurity

Walk the author through their own review of a pending change in Hunk, before any merge request exists — one commit at a time, or the uncommitted change — then answer each note they leave, amend agreed fixes straight into the commit under review, and move on once they ACK it. Author-led: the agent adds notes of its own only where asked to point something out. Use when the user wants to review their own change before committing or opening an MR, says "self-review" or "let me review my changes f...

  • 2 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added December 3, 2026
toolspythongoshell

Works with

  • cli

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned December 3, 2026

npx -y skills add yogan/agent-skills --skill self-review --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Self Review?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Self Review
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/yogan-self-review/badge)](https://www.skillsdirectory.com/skills/yogan-self-review)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: self-review
description: >-
  Walk the author through their own review of a pending change in Hunk, before any merge request exists — one commit at a time, or the uncommitted change — then answer each note they leave, amend agreed fixes straight into the commit under review, and move on once they ACK it. Author-led: the agent adds notes of its own only where asked to point something out. Use when the user wants to review their own change before committing or opening an MR, says "self-review" or "let me review my changes first", or invokes /self-review. NOT for reviewing someone else's MR (review-mr), a critique by the agent (review-branch), or feedback on an open MR (rework-mr).
---

# self-review

The author judges their own change, piece by piece, until they can follow it and stand
behind it. A **piece** — one commit, or the uncommitted change — sits in a
[Hunk](https://hunk.dev/) window beside yours. The author writes **diff notes** on
its lines; you answer each one under it, fix what they agree to, show the piece again, and
move on only on their **ACK**. Their diff notes, their verdict: you answer inside them, and
start one only where they ask you to point something out.

```
implement → self-review → open the MR (author's own MR skill) → rework-mr
```

A diff note here is the author's note together with everything written under it. Say
"diff note", never "thread": that word belongs to a merge request, and none exists yet.

Every step runs through one script. Below, `sr` stands for
`python3 ~/.claude/skills/self-review/scripts/selfreview.py`; run bare, it lists its
commands. It needs `tmux` and `hunk`; without either, say so and stop. Every text goes in
single quotes, an apostrophe in it written `'\''`: inside double quotes the shell runs
whatever is in backticks.

## 1. Plan

`sr plan` lists the branch's commits from its merge-base with the default branch, oldest
first and numbered, plus whether there are uncommitted changes. Commits are addressed by
that number throughout — amending rewrites hashes, never positions.

- **Commits only:** review 1 to N in order.
- **Uncommitted only:** review the uncommitted change (`work`).
- **Both:** fixes are amended from the working tree, so reviewing commits needs a clean
  tree. Ask the author once: commit the uncommitted work first (it is reviewed as the last
  commit), or review it first on its own, then commit it and continue with the earlier
  commits.
- **Neither:** nothing to review — say so and stop.

State the plan in one line, then start.

## 2. The loop, per piece

1. **Show.** `sr show N` (or `sr show work`). It opens the window beside yours the first
   time and reloads it after that, and fails rather than point at a window that does not
   hold exactly this diff. Tell the author in one line which piece is up (`commit 2 of 5:
   "<subject>"`, window name), and that they say **done** when they have written their diff
   notes. The window's own help (`?`) shows its keys; a note is `c`, a reply `R`.
2. **Read.** On "done": `sr notes` prints every diff note still awaiting an answer — its
   number (`#2`), `file:line`, and what the author wrote since you last answered.
   - **None awaiting**, after the author has looked at the latest state of the piece: that
     is their **ACK** — go to 5.
   - **The window is closed** (`sr notes` says so): the author has seen enough of the code.
     From here this piece runs in the chat: answer into each note card where cards are
     drawn (`sr reply <number>`, as in 3), in the chat otherwise, and describe each fix
     there instead of showing it. Open the window again only when they ask to see
     the diff; it then holds none of the diff notes already answered.
3. **Answer, every diff note.** Answer the question, or recommend the fix, one diff note
   at a time where they need it.
   - **Where cards are drawn** (`sr notes` ends with `[review-ui] Shown to the user as a
     card.`), each diff note is a note card already in front of the author, holding the
     whole exchange. Answer each with `sr reply <number> '<answer>'`: a few sentences,
     markdown welcome (identifiers in backticks); the window gets a plain copy. It goes into its card, and under the note in the window while that is
     open; `--replace` takes your last answer back. Run `sr notes` and each `sr reply` as
     a call of its own, nothing chained before or after it, so the tool result ends on its
     card. The cards hold the answers: your message is at most one short line of your own,
     such as what changes next, and never repeats or summarises them.
   - **Otherwise** `sr notes` prints each as a block (where it is, the code it sits on, the
     author's words quoted): paste it verbatim, then your answer under it. Then put the gist
     in the window under the note, so it reads as answered where they wrote it:
     `sr reply <number> '<one or two sentences>'`; `--replace` takes your last one back.
     Your message carries your answers alone: the numbers, and which answer went where, are
     your bookkeeping.

   Make no edit until the author has agreed to that fix. A diff note is done when it is
   answered and any fix in it is agreed or declined.
4. **Fix.** Make the agreed changes and run the project's checks. Then:
   - a commit: `sr amend N` folds the working tree into commit N — in place for the newest,
     as a fixup squashed in by rebase for an older one — and shows commit N again;
   - the uncommitted change: `sr show work --again` shows it again.

   Neither reopens a window the author closed: they say so instead, and you describe the
   change in the chat.

   A diff note whose code the fix moved or rewrote moves with it, and the reload prints a
   line for each one it moved: below the code that replaced the noted lines, shifted with
   lines added or removed above them, or where deleted code used to be. Say in one line
   what changed, and pass on every move and anything left behind, so the author finds
   their diff notes. Ask them to look again and say done. Back to 2 — reading the numbers
   afresh from `sr notes`, since a moved diff note gets a new one.
5. **ACK.** `sr ack` clears the window's diff notes — it refuses while any awaits an
   answer. Then the next piece, from 1: a new piece opens the window again.

When every piece is ACKed: `sr close`, and point to the next step — open the MR with the
project's own MR skill.

## Pointing something out

The one time you start a diff note: when the author asks you to point at something ("point
out…", "show me where…"), and only at the places they asked about — never as a review of
your own. `sr point <file> <line> '<text>'` (`--old` for a removed line) puts your note on
that line of the piece in the window and moves the window's view to it, your notes shown; the
author toggles them with `a`, and `}` jumps to the next one. Only lines the piece's diff shows
can carry a note: a place outside it is refused, so name that one in the chat instead. Say in chat which notes you left. A reply the
author writes under one comes back through `sr notes` like any other.

## Rules the script holds you to

Each refusal is deliberate; resolve its cause, never work around it.

- **A closed window hands its diff notes to the chat.** With the keep-notes Hunk extension
  loaded (this repo's `hunk-extensions/keep-notes`), `sr notes` reads them from the copy it
  saved, once: printed, they are gone from it. `point` then refuses, and so does `reply`
  except into a note card the script handed over (where cards are drawn), `amend` and
  `show … --again` do not reopen it, and only `sr show` opens it again. Should the window
  close before `sr notes` read it, that `show` puts the unread notes back in it, and `show`
  of another piece refuses until then. (Without the extension Hunk saves nothing, and
  quitting the window loses its notes.) `sr close` refuses while one awaits an answer.
- **The window does not move on under diff notes.** They re-anchor by line number, so
  `sr show` refuses to load a different piece while the window holds any. Reloading the
  same piece keeps them; that is how the author checks a fix against what they wrote.
- **A moved diff note is a copy.** Hunk cannot move a note, nor create one as the author's,
  so a moved diff note is re-created and the original removed. Its first note is labelled
  `you (moved from R356–383)`; the author can reply to it but no longer edit or delete it.
  Its note card says `moved from R356–383` in its header, and is a new card: the one
  before the move stays as it was.
- **Hidden files.** hunk-mark-read can hide files marked read, and Hunk itself lists no
  diff notes on a hidden file. With the keep-notes Hunk extension loaded (this repo's
  `hunk-extensions/keep-notes`) they are read anyway, so nothing changes. Without it,
  `notes`, `ack`, `close` and `show` refuse while files are hidden and name them: tell the
  author to show hidden files again and say done, then read again. Hunk takes no reply or
  new note on a hidden file, so `reply` and `point` un-mark it as read first and load the
  piece again: the file shows again, unread, with the new note in it. Mention that in your
  answer. Where that cannot work (no keep-notes, read marks not saved to disk, or a fix in
  the tree that `show` has not put in the window yet) they say so instead: ask the author to
  show hidden files again.
- **Commits need a clean tree** (`sr show N`), because everything in the tree is folded into
  the commit by `sr amend`.
- **A fix that conflicts with a later commit** is rolled back: the branch is untouched and
  the fix is back in the tree, unstaged. Tell the author, and agree whether the fix belongs
  in the later commit instead or the conflict is resolved by hand.
- **Never push.** If the reviewed commit was already on the branch's upstream, `sr amend`
  says so: publishing the result needs a force-push, which is the author's to run.

Files in this skill

  • SKILL.md9.8 KB
  • scripts/selfreview.py42 KB
  • scripts/test_selfreview.py52.4 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in tools →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.