check-if-done
Check whether the work is actually finished rather than finished-looking — what was promised versus what really runs. Several models compare the task against the code, and every completion claim has to survive a command that was actually executed. Use before calling something done, before a PR, at the end of a session, or on "is this done", "did I finish", "check if done", "what did we skip".
szarkans · Static checks on file
Installation
Read the source and dependencies before running a command. Copying does not install or execute anything.
npx skills add szarkans/multi --skill check-if-doneAbout this skill
name: check-if-done description: >- Check whether the work is actually finished rather than finished-looking — what was promised versus what really runs. Several models compare the task against the code, and every completion claim has to survive a command that was actually executed. Use before calling something done, before a PR, at the end of a session, or on "is this done", "did I finish", "check if done", "what did we skip". allowed-tools: Bash, Read, Grep, Glob, Agent, TodoWrite argument-hint: "[what was promised — a plan file, an issue, or nothing to use this session]"
Check if it is actually done
!"${CLAUDE_SKILL_DIR}/../../scripts/probe.sh"
A model that just wrote code is the worst possible judge of whether that code works. It compares the task to its own summary of what it did, the two match, and it says done. Nothing was verified — the check was a memory of an intention.
So this skill does two things a normal review does not:
- Someone who did not write it looks at it — Codex, OpenCode, and a reviewer role that has never seen this conversation.
- Nothing is called done without an executed command behind it. Not "the tests should pass" — the command, its output, its exit code.
$SCRIPTS is whatever the probe printed as scripts-dir:.
On any host other than Claude Code the line above is plain text, nothing
ran. Your first step is then to run the probe yourself and read its output as
if it were printed here: <dir of this SKILL.md>/../../scripts/probe.sh — the
plugin's scripts/probe.sh, two directories above the real file (resolve
symlinks first: realpath of this SKILL.md, then ../../scripts/probe.sh).
If the line above reads Shell substitution failed instead of probe output,
the session is in a git worktree whose shell gate refused the header; the
plugin is fine. Run "${CLAUDE_SKILL_DIR}/../../scripts/probe.sh" yourself,
as one plain command with nothing but the path, and read scripts-dir: from
that.
First: what was promised?
Everything here is a comparison, so you need both sides. In this order:
- What the user named — a plan file, a spec, an issue, a PR description. Read it.
- This session — what was asked for and what you said you did. Write it down as an explicit list before you go further; a promise you keep only in your head is one you will grade yourself on generously.
- Nothing? Then say so and stop: "nothing to check against — point me at a plan or tell me what this was supposed to do." Do not substitute a code review. There is already a skill for that, and silently becoming it is how a completion check turns into theatre.
Then resolve the other side: what actually changed. git diff, the branch, the
files you touched. Say both out loud in one line before launching anything:
Promised: <where it came from — plan.md, the issue, what we did this session>
Changed: <concrete paths or range>
Launch the outside reviewers
They are free and slow to start, so they go first and run in the background while you do the real work below.
RUN="$($SCRIPTS/run-dir.sh --slug <two-to-four words: the project and the job, e.g. skills-fixing-multi>)"
# The reviewers run on a COPY of the work tree, never the live one. These are
# the same "read-only" reviewers that can wipe uncommitted work — a Bash
# sub-agent, or an opencode flipped to bash by a hostile repo config — so hand
# them a copy and let it take any destructive hit. The copy carries the change as
# review.diff (no git in it) and drops the repo's opencode config. Pass the same
# --diff you are checking; drop it if there is no diff to point at.
REPO="$(git -C "${REVIEW_DIR:-.}" rev-parse --show-toplevel)"
COPY="$($SCRIPTS/snapshot.sh --repo "$REPO" [--diff <spec>] --dest "$RUN/snapshot")"
# If the snapshot failed (empty $COPY), STOP — do not fall through to reviewing
# the live tree, which is the exact data-loss path this exists to close.
[ -n "$COPY" ] || { echo "snapshot failed — not reviewing the live tree"; exit 1; }
# Snapshot ONCE; later blocks read this path back, they do not re-snapshot.
echo "$COPY" > "$RUN/copy-path"
# Quoted heredoc on purpose: the promise below is pasted from a plan/issue/spec,
# and an unquoted heredoc would EXECUTE any $(...) or backticks in it while
# writing the file. The change-location line belongs here ONLY if you snapshotted
# with --diff; with no --diff there is no review.diff, so describe what changed in
# words instead.
cat > "$RUN/done-prompt.md" <<'EOF'
<the promise, as a concrete list of what was supposed to end up working>
<with --diff: "The change under review is in review.diff at the root of the code
you are in (statuses in review.manifest); new files are in the tree. No .git
here — do not run git." Without --diff: what changed, in words.>
EOF
$SCRIPTS/ask.sh --repo "$COPY" --question-file "$RUN/done-prompt.md" \
--out-prefix "$RUN/done" --effort high > "$RUN/ask.log" 2>&1
A backend that answers sits out … back at … is inside one of its avoid
windows (peak hours in the config), not broken; --ignore-avoid runs it
anyway, only when the user says so outright.
Run that last command detached from the shell tool: a foreground shell call is
capped (ten minutes on Claude Code, two by default on OpenCode), and a killed
ask.sh marks every backend KILLED. On Claude Code use the Bash tool's
run_in_background; on any other host the shell tool kills its whole process
group at the timeout, so add --detach to the ask.sh call (same redirect):
it re-starts itself in a session of its own and returns at once.
When you come back for the answers, block on them instead of reading whatever
is there: $SCRIPTS/wait.sh --prefix "$RUN/done" --max 540 (below the shell tool's own cap: 540 on Claude Code, 100 on OpenCode's default two minutes) prints one line per
backend (ok, FAILED: <reason>, or still running with its elapsed time and
tim