crit-story

Generates a structured crit story JSON from git diffs using the crit CLI.

994|76|Updated Feb 16, 2026
One-click install
npx skills add https://github.com/tomasz-tomczyk/crit --skill crit-story
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: crit-story
Source: https://github.com/tomasz-tomczyk/crit/tree/main/integrations/claude-code/skills/crit-story
Command: npx skills add https://github.com/tomasz-tomczyk/crit --skill crit-story

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Turning a raw git diff into a coherent, human-reviewable narrative is tedious: hunks must be clustered by theme, coverage must be complete, and the output must match a strict schema. This Skill automates authoring a crit story from the current diff so reviewers get an organized walkthrough instead of a flat patch.

Core Features & Use Cases

  • Guide-driven authoring: Fetches the resolved authoring guide and JSON schema at runtime via crit story --guide, ensuring the output follows the user's customized rules.
  • Full-diff preparation: Writes the untrimmed diff with hunk identifiers to a prep file via crit story --prep so no change is omitted.
  • Validated ingestion: Submits the story JSON with crit story --story-file, receiving coverage reports on missing or duplicated hunks and drift detection when the diff changes.
  • Use Case: After finishing a feature branch, ask your agent to generate a crit story; it clusters hunks into themed chapters, validates coverage, and opens the story in the browser for review.

Quick Start

Ask your agent to generate a crit story for the current branch changes using the crit-story skill.

Frequently Asked Questions about crit-story

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate a crit story from my git diff?

Invoke the crit-story skill explicitly or run the crit story commands directly. The workflow fetches the authoring guide with crit story --guide, writes the full diff with crit story --prep, authors the JSON, then ingests it with crit story --story-file.

When should I use crit-story instead of the /crit review loop?

Use crit-story only when you explicitly want a story generated from a diff; it is a sibling skill that does not run inside the normal /crit review loop. It should not be inferred from generic review, PR, or diff-review requests.

What fields must the crit story JSON contain?

The JSON must contain only prologue, chapters, and support. Fields like version, generated_at, agent, base_sha, head_sha, scope_fingerprint, and coverage are filled in automatically by crit and must be omitted.

Why was my crit story rejected during ingestion?

Rejection happens when hunks are duplicated across chapters or when the diff changed since prep, causing a drift error. The coverage report is printed as JSON on every attempt; fix duplicates or re-run crit story --prep and re-author from the fresh prep file.

What happens if some diff hunks are missing from my story?

If missing hunks are detected with auto_repaired set to true, crit back-fills the omissions into the support array and still exits successfully. You can optionally re-author the story to place those hunks deliberately.