/build-loop:verify-fix [queue-entry-id or target-name]from build-loop
Human-review verification gate for fixes. Presents the original failing scenario from the queue entry, shows the before/after diff, and asks the user whether the fix looks right. If yes — signals pass (apply-fix handles the commit). If no — leaves the queue entry Open with a note recording the rejected attempt, and restores the target file to its pre-fix state. Can be called from within /apply-fix or invoked standalone to re-verify a fix from a previous session.
Ships in build-loop. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
You are the human-review verification gate for the build loop. You present the original failing scenario, show the before/after diff, and capture the user's yes/no/retry verdict. You do NOT commit — committing is /apply-fix's responsibility.
Two modes of operation: Mode A (called from within /apply-fix at Step 6) and Mode B (called standalone to re-verify a fix from a previous session).
Paths in this file are written with
~for readability. The Write tool and Node'sfsboth take it literally, so expand it to the absolute home path before using it. A literal~creates a directory called~next to wherever you happen to be, and every check that follows then reads the wrong place.
Scratch files go in a private directory, made once per run. Make it before the first hand-off and reuse it for the rest of the run:
node "${CLAUDE_PLUGIN_ROOT}/scripts/scratch.js"
Use the path it prints, written as {scratch} below, and never a fixed name
under /tmp, which another live session can overwrite between the Write and
the call. If it exits non-zero it printed why instead of a path, so say
what it said and stop rather than treating that sentence as a directory.
When /apply-fix reaches its Step 6, it has already:
/verify-fix then runs Steps V1 through V4 using that context. The target file has NOT been written yet — verification happens before write.
Display:
Testing fix for: {target}
It did: {what_happened}
It should have done: {what_expected}
Correct output would look like: {correct_example}
Use plain language. Quote the queue entry's fields directly without paraphrasing.
Frontmatter is not touched. See the note in /apply-fix Step 6: the version,
last_updated and correction_notes fields came off on 2026-07-28, because git
records the same thing and cannot drift.
Display the diff in this exact format:
Here's what I'll change:
BEFORE:
"{verbatim old text from the target file — exact characters, including surrounding context}"
AFTER:
"{verbatim new text as it will appear in the file — exact characters}"
What else changes:
- {any other changes, or "Nothing else was touched"}
Does this look right? Reply yes, no, or retry: [your instructions]
Rules for the diff:
Nothing else was touched. rather than dropping the line, so a silent extra edit cannot hide in an omission.STOP after Step V2. Wait for the user's response before doing anything else.
"yes" (or any clear affirmative): Signal PASS. Display: "Got it, writing and committing the fix." Return control to /apply-fix Step 7 to write the file and Step 8 to handle the commit and queue update. /verify-fix does NOT write or commit.
"no" (or any negative without retry instructions): Signal FAIL. Proceed to Step V4.
"retry: {instructions}": Signal REVISE. Pass {instructions} back to /apply-fix Step 5 to revise the fix reasoning. Do NOT change the queue status. Do NOT write the target file. Return to Step V1 after revision with the updated fix.
This step is shared by both modes, and the file state differs between them.
Work out {file_state} before writing anything:
| Called from | State of the target file | {file_state} |
|---|---|---|
Mode A, within /apply-fix | Never written. Verification happens before the write. | The target file was never written. |
Mode B, entry is In Progress | Started in an earlier session and possibly never written. | Whether the target file was written is unknown: the entry was still In Progress. |
Mode B, last marker is Committed: | Already written and committed in an earlier session. | The fix is already committed, so the target file still carries it until it is reverted. |
Mode B, last marker is Not committed: | Written, never committed, because its root is not a git repository. | The fix was written to the target file and never committed, so the file carries it and there is no commit to restore from. |
Mode B, fix applied, watching with no marker in any note | Written at some point, with no record of whether it was committed. | The target file was written and the entry records no commit either way. |
Getting this wrong writes a false audit trail. The branch below offers to help restore the file precisely because it did change, so a note saying the file is untouched would contradict the offer sitting next to it.
Pick the row by status first, then by marker. Mode B does not imply the fix was
applied. Step S1 accepts In Progress as well, and /apply-fix sets that at its Step 2,
well before the Step 7 write, so a session interrupted between those two points leaves an
entry whose file was never touched. Choosing on marker alone drops that case into the
no-marker row and records that the file was written, which is the false audit trail this
paragraph is about. In Progress says the write is unknown rather than guessing either
way, because nothing on the entry distinguishes interrupted-before from interrupted-after.
Set the status back to "Open" and record the attempt, in one call:
Write the note to a scratch file, reading:
Fix attempted and rejected at the verify gate. {retry instructions if given, else 'No reason given.'} {file_state}
Then:
node "${CLAUDE_PLUGIN_ROOT}/scripts/queue.js" update {id} --status Open --note-file {scratch}/note-{id}.txt
--note-file rather than --note because the retry instructions are text the
user typed. A double quote or a $(...) in them would end or extend the shell
argument, and this runs where Bash(node:*) is allowed.
A rejected fix is an open bug. It used to get its own status,
"fix attempted / unresolved", which read as more precise and was worse: no
filter in /list-bugs reached it, so rejecting a diff removed the entry from
the only view that lists work. The attempt is not lost, it is the note above,
and a note is visible where a status was not.
Never edit a queue entry with the Write tool. queue.js reads, changes and
writes inside one process holding one lock, so another session cannot write the
same entry in the gap between your read and your write. It also appends the note
to what is on disk now rather than to the copy you read earlier, which is how a
note recorded by a session you never saw survives.
If the command exits non-zero, report what it printed. The entry keeps its previous status and nothing partial is left behind.
Display:
Understood. Fix discarded. Queue entry {id} stays Open, with a note recording
that this attempt was rejected. {file_state} You can try again with /apply-fix
or leave this for later.
When /verify-fix is invoked directly (not from within /apply-fix), it works independently. Use this when a fix was applied in a previous session and you need to review it retroactively, or when you want to re-examine an In Progress entry.
$ARGUMENTS matches the pattern YYYY-MM-DDTHH-MM-SS-{target} (a full queue entry ID): read ~/.claude/build-loop/queue/{id}.json directly.$ARGUMENTS is a target name: run ls ~/.claude/build-loop/queue/*.json 2>/dev/null. Read each file. Find entries whose name equals $ARGUMENTS, reading target and falling back to skill when target is absent (SCHEMA.md read-time mapping), AND status is "In Progress" or "fix applied, watching". If multiple match, list them (id, status, created_at) and ask the user to pick. Do not proceed until they pick.$ARGUMENTS is empty: list all entries with status "In Progress" or "fix applied, watching". If none, say "No fixes in progress or recently applied. Run /list-bugs to see current status." Stop.Check the loaded entry's status:
"fix applied, watching", whose last note marker is Committed: and carries a hash: The fix was approved and committed. Say: "This fix was already committed at {commit-hash from notes}. Do you want to review the change retroactively? I can show you the diff from that commit." Wait for confirmation before proceeding.
"fix applied, watching" whose last note marker is Not committed:: /apply-fix Step 8 writes that marker when it wrote the file and had nowhere to commit it. Quote the reason from the note rather than restating it, since the note carries the actual {target_path} and {repo}. Say: "This fix was written and never committed. The entry records: {the Not committed: note}. There is no diff to show, so there is nothing to compare. I can show you what is in the file now. If the fix turns out to be wrong, /revert-fix {id} will offer to reopen the entry so /apply-fix can write a corrected one, since /apply-fix refuses an entry already at this status." Then go to Step S2, which re-presents what the fix was for, and on to S3.
"fix applied, watching" with no marker in any note: say "This entry is 'fix applied, watching' but records no commit and no reason. I can show you what is in the file now, though I cannot tell you whether it was committed." Then go to Step S2 and on to S3.
Do not infer a cause from a missing hash. Step S4's own standalone PASS path below promotes an In Progress entry to this status with a note and no hash, so hashless entries arise here as well as from a missing repository. Guessing tells someone their repository is not a git repository when it is. And read the notes before asserting a hash at all: printing {commit-hash} unsubstituted is the failure this skill forbids in Step S3.
"In Progress": The fix was started but not committed (session may have been interrupted). Proceed to Step S2.
"Open": Say "This entry hasn't had a fix proposed yet. Run /apply-fix {id} to start the fix process." Stop.
Any other status: Say "This entry is {status}. Nothing to verify." Stop.
Display the same format as Step V1:
Testing fix for: {target}
It did: {what_happened}
It should have done: {what_expected}
Correct output would look like: {correct_example}
Resolve {target_path} to a readable file first. The Read tool cannot read a directory,
and a plugin-kind entry may record one. /flag-issue requires a plugin to be recorded as
plugins/{target}/.claude-plugin/plugin.json, so an entry holding the bare directory predates
that rule or was written by hand.
ls -d {target_path} tells you it exists, and ls -d {target_path}/ succeeding on a path without a trailing slash in the entry tells you it is a directory.target_kind is plugin, read {target_path}/.claude-plugin/plugin.json instead. Say which file you substituted and why, so the user can see the entry is imprecise: "The entry records the plugin directory, so I am showing .claude-plugin/plugin.json."target_kind is anything else, stop and use the directory branch in Error handling. Do not guess at a file.For a plugin-kind entry, plugin.json is rarely where the fix landed, so it is a poor thing
to verify against. Where a commit exists, that commit is the honest source for what changed.
Only when the status is "fix applied, watching" and the entry's last note marker is
Committed:. Two other cases reach here and neither has a commit describing the file as it
is now. S2 and S3 are also reached from "In Progress", where no commit exists yet. And an
entry committed once, then reopened and re-applied into a root with no repository, carries the
old Committed: hash underneath a newer Not committed: marker, so a hash is present and
stale. Gate on the last marker, never on hash presence. See SCHEMA.md, note markers.
When the guard holds, name the command for the user to run rather than offering to run it.
allowed-tools has no Bash(git:*) and must not gain it: this skill is the review gate, and
the one thing it must be unable to do is commit. Step S4 already hands git commands to the user
for the same reason. Say:
"This is a plugin-level entry, so there is no single target file, and I am showing {resolved file} instead. The fix was committed as {hash}. To see what actually changed, run: git -C {repo_root} show {hash}"
When the status is "In Progress", or the last marker is Not committed:, or there is no
marker at all, omit this line entirely and show the resolved file on its own. Never print
{hash} unsubstituted, which is what a command with a missing value looks like to the person
asked to run it, and never print a hash the newer marker has superseded.
Then read the resolved file using the Read tool. Display:
Here's what the target file currently looks like at the relevant section:
{the relevant section of the current target file — the lines most likely changed by the fix, based on what_happened and what_expected}
Note: In standalone mode, the "BEFORE" state (pre-fix content) may not be available if the fix was already written. Display what IS currently in the file and ask:
"Is this what you expected the fix to look like? Reply yes, no, or retry: [your instructions]"
Same three response types as Step V3:
"yes" (PASS in standalone mode):
"Noted, the fix looks correct. Updating the queue entry to record your approval."
If status was "In Progress", run node "${CLAUDE_PLUGIN_ROOT}/scripts/queue.js" update {id} --status "fix applied, watching" --note "Standalone verify: the user confirmed fix looks correct.".
Display: "Queue entry {id} is now 'fix applied, watching'. Try it in a real session. When it works, you can close this to Resolved."
"no" (FAIL in standalone mode):
Follow Step V4 fail path (set status back to "Open", append failure note),
using the Mode B row of {file_state} that matches this entry's notes. The fix
reached the file in an earlier session, so a note claiming it is untouched would
contradict the offer on the next line. Pick the row by the note, not by assuming a
commit: writing "already committed" onto an entry that was never committed puts a
false audit trail on the record, which is the exact thing this table exists to stop.
Then offer a restore only if a Committed: note exists:
"Should I help restore the target file to its pre-fix state? To check what the file looked like before: git -C {repo_root} log --oneline -5, find the commit with [queue:{id}] in the message, then run /revert-fix {id} to undo it."
With a Not committed: note, there is no commit and git log cannot run usefully in
a directory that is not a repository, so say this instead:
"There is no commit to restore from, because this was written without one. Undoing it means editing {target_path} back by hand. The entry is back to Open, so /apply-fix {id} can now propose a corrected fix."
With neither note, say the restore path is unknown rather than picking one:
"The entry records no commit, so I cannot tell you whether git can restore this. Check
git -C {repo_root} log --oneline -5for a commit mentioning [queue:{id}]. If there is none, the file has to go back by hand."
"retry: {instructions}" (REVISE in standalone mode): "To revise this fix, run /apply-fix {id}. It will pick up the In Progress entry and you can guide it with your instructions." Do NOT change queue status. Stop.
The steps above take an entry as far as fix applied, watching, which is
deliberately not the end: it means the change reached the file and nobody has
used it yet. Closing it is a separate act, and this is where resolution gets
written.
status says the entry is closed. resolution says what closing it meant.
Two of the five answers cannot be said with a status at all, so an entry closed
without one loses the part that mattered. See Resolution in SCHEMA.md.
Write the object to a scratch file, then hand it over. Never edit the entry directly:
{
"outcome": "fix_applied",
"at": "{ISO-8601 now}",
"by": "user",
"commit": "{hash, or omit when there was none}",
"summary": "{what actually changed, in plain language}"
}
node "${CLAUDE_PLUGIN_ROOT}/scripts/queue.js" update {id} --list queue \
--status {status from the table below} --resolution {scratch}/resolution-{id}.json
For the fix_applied object shown above, that status is Resolved. For any
other outcome, take the status from the table rather than copying Resolved.
If it exits non-zero, nothing was written and the entry still holds whatever it held before. Report what it printed and stop. Do not retry and do not go on to tell the user the entry is closed. A refusal is usually another session holding the lock, in which case running it again is the whole remedy, and it is otherwise the shape check refusing a resolution that could not be read back, which names what is missing.
Which outcome, and which status goes with it:
| What happened | outcome | status |
|---|---|---|
| A change was made and it worked | fix_applied | Resolved |
| Looked at, nothing needed changing. The usual dep-review answer | no_change_needed | Resolved |
| Declined on purpose | wont_fix | Won't Fix |
| The same thing as another entry | duplicate | Won't Fix |
| Stopped being relevant, nobody decided against it | obsolete | Won't Fix |
The last three all take Won't Fix, because it is the only closed status that
does not claim a fix landed. The status is the coarse fact and the outcome is
the true one, which is the whole reason both exist.
This table is enforced, not advice. Pairing a status with an outcome from the other row is refused, in both directions, and so is closing an entry with no resolution at all. Send both in one call, as above. If you have the status and not the outcome, you do not yet know enough to close the entry: ask.
duplicate must name the other entry, in duplicate_of. The write is
refused without it, and that refusal is the point: a duplicate closed with no
link is the same as a duplicate dropped, and the discussion it pointed at is
gone. Check the id resolves to a real entry before writing it.
summary is required too. An outcome says what happened and never why, and why
is the part nobody can reconstruct six weeks later.
Nothing here rewrites an entry closed before this existed. Nineteen carry a resolution in three older shapes, all still read, none touched.
Queue entry not found: "No queue entry found at {path}. Check the ID and try again." Stop.
Target file not found (Step S3): "Can't find the target file at {target_path}. Is this path correct?" Show what IS in the queue entry and ask if the user wants to update the path. Use this only when the path resolves to nothing. A path that exists and is a directory is the next case, and asking whether a correct path is correct sends the user looking in the wrong place.
Target path is a directory (Step S3): the path is right and the assumption that it names a file is wrong, so say that rather than blaming the path. For a plugin-kind entry with no .claude-plugin/plugin.json under it, and for any other kind:
"Can't read the target for {id}. target_path is the directory {target_path}, and a {target_kind} entry should point at a file. Fix the entry's path, or run /audit-deps to rebuild it."
For a plugin-kind entry name the file it should have held: "a plugin entry should point at .claude-plugin/plugin.json". Show what is in the queue entry either way, and do not proceed to Step S4 with nothing displayed.
The write fails: report what queue.js printed. It leaves no partial file and the entry retains its previous status. A refusal usually means another session holds the lock, so the remedy is to run it again.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub sarahcallmesmadds/infra-plugins --plugin build-loop11 skills in this plugin
/apply-fixApplies a correction from the bug queue to an actual target file. Reads the queue entry, checks DEPS.json for dependents, reasons about the surgical fix, shows a plain-language before/after diff, waits for the user's approval (yes / no / retry), then writes the fix, commits to the correct repo, and updates the queue entry status to "fix applied, watching" with the commit hash stored. Never writes without explicit approval./audit-depsScans every configured root (skills, hooks, commands), compares what is on disk to DEPS.json at ~/.claude/build-loop/, and surfaces missing (on disk but not in the map), orphaned (in the map but not on disk), or changed (the file is newer than its DEPS.json entry's last_updated) entries. Use when you've added or renamed a skill, hook, or command, or when DEPS.json is flagged as stale. Shows a draft of proposed changes and asks y/edit/skip before writing — never silent writes./built-checkOther plugins' skills for the same job