/crit:crit-storyfrom crit
Authors a structured crit story from a diff, clusters hunks by theme into chapters, and enters an interactive review loop. Invoke only via /crit-story or explicit request.
Ships in crit. 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.
crit storyThis skill authors a story-mode overview, then enters the same interactive
review cycle as /crit (wait → address comments → next round). Invoke it
only when the user explicitly asks for story generation; do not infer it from
generic review, PR, or diff-review requests.
Primary path: author in-session with --guide / --prep / --story-file
(do not run bare crit story, which spends agent_cmd tokens), then run
bare crit to listen for Finish Review.
crit story --guide
This prints the resolved authoring guide (the user's customized version if
they have one — always invoke this at runtime rather than reusing this
skill's own prose) followed by --- and the JSON schema for the fields you
must emit. Read and follow that guide's principles and JSON shape exactly —
it is the source of truth, not this file.
crit story --prep /tmp/crit-story-prep.txt
This writes the full, untrimmed diff (commit messages + every hunk with its
(file_path, old_start) id) to the given path and prints the path. Read
that file — the diff is never inlined into the guide prompt.
Following the guide from Step 1, cluster hunks by theme (not by file) and
write a JSON object with only prologue, chapters, and support to a
temp file, e.g. /tmp/crit-story.json. Do not include version,
generated_at, agent, base_sha, head_sha, scope_fingerprint, or
coverage — crit fills those in.
crit story --story-file /tmp/crit-story.json
Exit 0 means the story was saved (crit opens the browser to show it). Then continue to Step 5 — do not stop after ingest. Exit 1 means it was rejected — the coverage report (missing/duplicated hunks) is printed to stdout as JSON on every attempt, success or failure. If rejected:
duplicated non-empty: a hunk is claimed by two chapters (or a chapter and
support). Decide where it belongs and re-ingest.missing non-empty with auto_repaired: true on exit 0: crit already
back-filled the omissions into support[]. Optionally re-author to place
them deliberately.crit story --prep and
re-author from the fresh prep file.CRITICAL — you MUST run this step after a successful ingest. Do NOT skip it. Do NOT proceed without it.
Story ingest opens the review UI and exits — it does not wait for the human. Run crit in the background using run_in_background: true:
crit
Pass timeout: 86400000 (24 hours) with run_in_background: true on every blocking crit call. Without it, Claude Code stops background commands after 30 minutes. Claude Code may lower the value to its own limit (2 hours unless the user sets BASH_MAX_TIMEOUT_MS).
crit reconnects to the story session's daemon (already started by ingest) and blocks until the user clicks "Finish Review".
If ingest printed a review URL, relay it verbatim:
"Crit is open at http://localhost:. Leave inline comments on the diff, then click Finish Review."
Do NOT proceed until crit completes. Do NOT ask the user to type anything. Do NOT read the review file early. Wait for the background task to finish — that is how you know the human is done reviewing.
Offer to raise the limit to 24 hours by adding this to ~/.claude/settings.json (it takes effect after Claude Code restarts):
"env": { "BASH_MAX_TIMEOUT_MS": "86400000" }
If the user agrees, merge it into the existing file; do not overwrite other settings. Then, if the user wants you to keep waiting, run the same crit command again as in Step 5.
When crit completes, read stdout and follow its instructions. Check stderr for approved: true or approved: false.
If the finish prompt says the review is approved / "approved": true, tell the user no changes were requested and stop.
Fallback (mid-round re-entry or headless workflows): crit comments / crit comments --json.
Story mode is an editorial view over the underlying diff. Address comments against the actual source files. Do not edit, regenerate, or patch the saved story JSON unless the user explicitly asks.
For each unresolved comment:
crit comment --reply-to <id> --author 'Claude Code' '<what you did>' (reply bodies support markdown)--resolve. Resolving is the reviewer's call. Only add --resolve if the user explicitly asks.echo '[
{"reply_to": "c_a1b2c3", "body": "Fixed"},
{"reply_to": "c_d4e5f6", "body": "Refactored as suggested"}
]' | crit comment --json --author 'Claude Code'
For long or multi-line bodies, write the JSON to a file and pass --file. Use --file, not a < redirect.
crit comment --json --file /tmp/replies.json --author 'Claude Code'
CRITICAL — you MUST run this step. Do NOT skip it. Do NOT proceed without it.
The finish prompt on stdout includes the command to run again — use it to start a new round.
On subsequent calls, crit automatically signals round-complete first, then blocks until the next "Finish Review" click.
Tell the user only: "Replied in Crit. Review the changes in your browser and click Finish Review when ready." Do not repeat your replies or list the comments in chat. The reviewer reads them in Crit.
Do NOT proceed until crit completes. When it does, return to Step 6. If the user finishes with zero comments, the review is approved — stop the loop and proceed.
crit story (LLM via agent_cmd) unless the user
explicitly asks for that path.crit push or crit share unless the user asks to share.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub tomasz-tomczyk/crit --plugin crit3 skills in this plugin
/critReview code changes, a plan, a live page (running dev server), or a local HTML file with Crit inline comments and structured human feedback. Use only when the user explicitly invokes /crit or directly asks to use Crit; a generic review request does not count./crit-cliUse when an agent needs to author or reply to crit inline comments programmatically (including multi-agent workflows commenting on shared code/plans/docs/proposals), publish or unpublish a crit review with crit share, sync a crit review to or from a GitHub PR or GitLab MR, or read/interpret a crit review JSON file. Covers crit comment, crit share, crit unpublish, crit pull, crit push, review file format, and resolution workflow. Not for invoking an interactive review loop — that's the `/crit` command.Other plugins' skills for the same job