Generate a high-level, self-contained code-review handoff and save it as HANDOFF.md in a private temporary folder outside the repository, so the user can pass a single file path to another coding agent acting as principal code reviewer, which writes its review to a file. Summarizes recent changes, the motivation, approach, alternatives, verification, risk, and what the reviewer should scrutinize. Use when the user wants a handoff or writeup to give another agent or person, not when they ask for a review here, which knackpack's reviewer agents do.
91%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
Produce a focused, high-level writeup of the work most recently done so it can be handed off to another developer or coding agent for review. The full writeup goes to a file (see "Output & delivery" below) so the user can hand the receiving agent a single file path instead of copy-pasting; chat gets the path, a paste-ready instruction, and a brief summary — the full text goes to chat only if the user explicitly asks for it there. The reviewer works the same way: it writes its whole review to a file, beside the handoff unless its own instructions forbid that, and replies with only that file's path.
The structure follows widely used conventions for change descriptions: a commit-style lede, what and why, rejected alternatives, a reproducible test plan, and invariants phrased in RFC 2119 terms. Don't invent variants.
Optional free-text argument describing the scope to cover (e.g. rate-limit fix). If omitted, infer the scope from the recent conversation and the current uncommitted / recently committed changes — whichever most clearly represents "the work I want to hand off."
Write the full writeup to a private folder outside the repository. Use the session scratchpad named in your system prompt, if there is one. Otherwise run printenv TMPDIR once (use /tmp if it prints nothing) and use the folder claude-${CLAUDE_SESSION_ID} inside it, writing the folder's full path literally in every later command. Create it with mkdir -p -m 700 <folder>, then check it with [ -d <folder> ] && [ ! -L <folder> ] && [ -O <folder> ] && chmod 700 <folder>; if the check fails, stop and tell the user. Never write into the repository unless the user asks. Name the file HANDOFF.md, or HANDOFF-<focus-slug>.md when a focus was given (for example HANDOFF-rate-limit-fix.md), so a second handoff doesn't overwrite the first. The reviewer's review goes beside it as REVIEW.md, or REVIEW-<focus-slug>.md to match. Do not commit or push either file.
Open the file with a role-setting preamble addressed to the receiving agent, placed before all writeup sections:
You are a principal code reviewer, and ONLY a code reviewer — reviewing this handoff is your sole task; do not continue, extend, or fix the work described, and do not take on any other task. The writeup below hands off recently completed work for your review. Scrutinize it with the rigor of a principal engineer. Treat its Verification and Invariants sections as the author's claims, and verify them against the actual code. Build your own view of the risks from the code first, then work through the author's "What to scrutinize" list. You are report-only: you are NOT allowed to change any file in the repository; scratch files for your own checks go in a temporary folder outside it, which you delete afterwards. Your responsibility is only and only to report back the issues or improvements you find; deciding on and applying them stays with the author/owner. Write your entire review to
<absolute-path-to-the-review-file>, never into the repository and not into your scratch folder, so your cleanup doesn't delete it, and reply with only that path. If your own instructions don't allow you to write there, save it where they do and reply with that path. If you run on another machine, give the review in your reply instead.
Replace <absolute-path-to-the-review-file> with the review file's real absolute path.
The file must be fully self-contained. The receiving agent has NONE of this session's context — it sees only this file plus the repo. Therefore:
path:line from the repo root, never "the file we just edited".REQUIREMENTS.md, PLAN.md, and the record from knackpack's intent tracking), which you may cite by absolute path.In chat, report (in this order):
<absolute-path-to-the-file> in full, then carry out the review it describes and write it to <absolute-path-to-the-review-file>."Caveat: a remote/cloud agent cannot read or write local paths — if the user says the reviewer is remote, paste the full text in chat instead; the reviewer will then give its review in its reply.
Sections marked required must appear. Sections marked conditional appear only when relevant — skip them entirely rather than padding. Sections marked optional are cheap one-liners; include when they add signal.
In order:
Lede (optional, one line) — imperative-mood summary in the style of a good commit subject (Google CL + Chris Beams). Doubles as the PR title candidate. Example: "Close the token-refresh replay hole." Skip for trivial changes.
What this changes (required) — one short paragraph. Behavior delta from the reviewer's perspective, not a code description.
Why (required) — the motivating problem. Cover:
Approach (required) — one paragraph. Concrete path:line references for the central change. Name the reused sentinel / helper / port so the reviewer can trace it. No code dumps. This is how, not what.
Alternatives considered (conditional) — include only when a non-obvious design decision was made. For each rejected alternative, name it and say briefly why it lost. Distinct from "Out of scope": alternatives are rejected at this moment; out-of-scope items are deferred for later. Skip entirely for straightforward fixes where no real choice existed.
Deliberately out of scope (required if non-empty) — bullet list. Prevents the reviewer from treating an omission as an oversight. Each bullet must explain why it was deferred, not just what. If nothing's out of scope, omit the section.
Verification (required) — how you convinced yourself the change works. Modeled on Meta's Test Plan norm: reproducible, not "ran locally" or "#yolo". Cover three things where applicable:
Requirements covered (conditional) — when the work implements requirements with IDs (REQ-01 and so on), list each ID with where it's implemented and how it was verified, and cite the requirements brief, the plan and the intent record by absolute path when they exist.
Risk / rollback (conditional) — include for anything beyond a trivial refactor. One line is often enough. Cover: blast radius (which services / data / users), rollback procedure, any migration or feature-flag state, cross-service contract changes. Tie explicitly to deployment reality when relevant (rolling updates, event consumers, token claim shape, URL path contracts). Skip for pure local refactors that revert cleanly.
Files touched (required) — bullet list, one line per file, stating the role each plays (source / docs / reviewer rules / config). Purpose: let the reviewer pick the order to read them.
What to scrutinize (required) — numbered list of 3–6 items. These are the questions the reviewer should actively ask, derived from the actual risk surface of this diff. Each item states the concern and what a bad answer would look like. Do NOT restate generic review items (style, naming, error handling) — the reviewer already has those. Name the specific things you are worried about. This section is what distinguishes a senior-to-senior handoff from a generic summary.
Invariants it relies on (required if any) — bullet list. Load-bearing assumptions elsewhere in the codebase that the change trusts. If any of them change, the fix breaks silently; the reviewer should know. Encouraged: RFC 2119 phrasing ("This change relies on Order.status never moving backwards: a shipped order MUST NOT return to pending") for precision. If the change touches cross-service contracts (event payload shape, token claim, URL path segment, DB field rename, shared regex), call that out explicitly and name the consumer services.
Related / Feedback ask (optional, one line each) —
git show in two seconds.path:line over bare function names; the reviewer will paste them into their editor.UpdateProfile validation change and the two doc updates from this session — say if you meant something else"). Proceed without blocking.git log, git diff, file reads) to pin them down before writing. Do NOT fabricate file paths, line numbers, sentinel names, or invariants.bezmoradi/knackpack
9fcf73c
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.