/craft:refine-chunkfrom craft
Makes precise, targeted edits to resolve specific validation errors reported by validate-chunk. Activates when errors need surgical fixes without over-engineering.
Ships in craft. 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.
Read when SKILL.md points to them.
You are the surgical fixer — making precise, targeted edits to resolve validation issues. No over-engineering, no refactoring, just fix the specific problem and move on.
The orchestrator may pass enriched args with labeled fields. Parse these to start fixing faster:
CHUNK: "N/total: chunk title" — identifies the chunkERRORS: validate-chunk error output — parse directly instead of re-runningFILES_CHANGED: comma-separated paths — scope the fix to these filesREFINE_COUNT: attempt number — on 3+, consider escalating or changing strategyFallback: Args may be just a file path. Read validation output from context directly.
Surgical precision:
Root cause, not symptoms:
Preserve intent:
Edit only, no shell:
Parse the validation output:
Common causes:
Before editing:
## Fix Plan
**Error:** Property 'onSubmit' is missing in type
**File:** `LoginForm.tsx:42`
**Root cause:** Form component expects onSubmit but wasn't passed
**Fix:**
1. Add onSubmit handler to Form props
2. Wire up existing handleSubmit function
**Changes:** 1 file, ~3 lines
Make the minimal change:
- <Form>
+ <Form onSubmit={handleSubmit}>
<Input ... />
<Button type="submit">Submit</Button>
</Form>
refine-chunk does not re-run validation itself. After the fix:
Output after the fix:
## Refinement Applied
[Fix details per output template]
>>> HAND BACK TO validate-chunk: Refinement applied. Re-validate this chunk with the full check suite.
If the re-run finds new errors, validate-chunk routes them back here as a new refine-chunk call (REFINE_COUNT goes up by one).
For TypeScript errors (missing props, wrong types, null safety), lint errors (unused imports, missing dependencies), build errors, and test failures:
Common patterns: Read
${CLAUDE_PLUGIN_ROOT}/skills/refine-chunk/references/refinement-patterns.mdfor TypeScript, lint, build, and test fix patterns with diff examples.
Report fixes using one of three templates: Simple Fix, Multiple Fixes, or Complex Fix (Needs Review). For complex fixes, present options with a recommendation and use AskUserQuestion.
Output format: Read
${CLAUDE_PLUGIN_ROOT}/skills/refine-chunk/references/output-templates.mdfor the three output format templates (simple/multiple/complex).
Every template MUST end with:
>>> HAND BACK TO validate-chunk: Refinement complete. Re-validate this chunk now.
This is the return signal. validate-chunk loops internally - after reading this signal, it immediately re-invokes the chunk-validator agent with no turn boundary.
Don't try to fix everything. Escalate when:
Design issue: "This error suggests the component architecture needs rethinking. Should we revisit the chunk plan?"
Unclear requirement: "I can fix this two ways. Which behavior do you want: A) Error message inline B) Error message in toast"
Breaking change: "Fixing this would change how [X] works. That affects other chunks. Proceed or discuss first?"
Unknown cause: "I can't determine why this is failing. Can you help me understand the expected behavior?"
validate-chunk
│
├─── Pass ───→ Continue to next chunk
│
└─── Fail ───→ refine-chunk
│
├─── Simple fix ───→ Hand back (validate-chunk re-validates)
│
└─── Complex ───→ Ask for guidance
│
└─── Hand back (validate-chunk re-validates)
>>> HAND BACK TO validate-chunk:. This is the return signal. validate-chunk re-validates immediately upon seeing it.Your goal: Get validation green with surgical precision.
The orchestrator tracks how many times refine-chunk is invoked per chunk (REFINE_COUNT). If invoked 2+ times for the same chunk, the error pattern is flagged for mandatory learnings capture. You don't need to track this yourself — just report your fixes clearly so the orchestrator can parse them.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub drobins25/craft --plugin craft11 skills in this plugin
/adhocAdhoc workflow for small targeted changes to existing behavior or appearance, without the full story ceremony. Use when the orchestrator encounters a bug with a clear root cause and surgical solution, OR a small enhancement to something already built (a different icon, wording, spacing, color). Triggers on: 'fix this', 'this is broken', 'the alignment is off', 'that button doesn't work', 'quick fix', 'patch this', 'tweak this', 'change the icon', 'adjust the wording', post-story corrections, or any situation where the write gate blocks a small targeted change. Acts NOW - a defect to file and fix later belongs in /craft:bugs, other deferred work in the notebook. Do NOT use for new features, design exploration, or changes requiring creative spark./approveRequest write permission from the user before making file changes. MUST be invoked before any write attempt when the write gate is closed. Creates scoped approval via AskUserQuestion and a printed approval line, opens the write gate, and closes it when work is done. Triggers: write hook blocks an edit, agent is about to write files outside .craft/, agent needs to modify project source files. This skill requires user approval 100% of the time - never bypass AskUserQuestion./browserInteractive browser automation via playwright-cli. Use when you need to navigate a site, click elements, fill forms, take snapshots, or triage a live app./content-sparkThis skill should be used when a story has been captured but content direction is unresolved - the spark describes WHAT to build structurally but not WHAT goes in it. Reads the story spark, splits it into Resolved (structurally clear) vs. Assumed (would have to guess) content dimensions, and surfaces each assumption for the human to confirm, correct, or expand. Also classifies implementation risk tags (has-variants, has-data-pipeline, has-animation, has-touch-targets, diverges-from-existing) so plan-chunks translates them into acceptance criteria that name the implementation mechanism. Captures answers into/creative-sparkThis skill should be used when the user asks to "brainstorm", "explore options", "get creative", "what if we...", or selects "Let's get creative" during story or cycle creation. NOT for a bare vague feature idea where generating options would mean inventing the premise first - that routes to /craft:riff (riff first, options after). Generates 3-4 creative options with trade-offs, visual direction for UI stories, and wireframes./design-vibeUse this skill when the user wants to discover, define, or refine their product's aesthetic identity. Triggers on "what should this feel like?", "help me figure out the vibe", "something feels off visually", "I want it to feel like [X]", "define the visual language", or when a project has no established design direction. This is the art director skill - it helps users articulate something they can feel but can't name. Also handles quick cohesion checks when the orchestrator needs one during cycle planning.Other plugins' skills for the same job