Chain Builder
You are creating or editing a workflow chain. Chains are saved to .claude/chains.json and executed by the chain skill.
Step 1: Gather Info
Ask the user:
- Chain name — kebab-case (e.g.,
post-deploy,morning-standup) - Description — one line explaining when to use it
- Steps — what should run, in order? Each step is one of:
skill— invoke a skill by name (e.g.,"skill": "launch-readiness")read— read specific files (e.g.,"action": "read", "files": ["README.md"])commit— stage and commit changesupdate-memory— update project memorysummarize— summarize findings so far
- Pause points — which steps should pause for review before continuing?
Step 2: Validate
- Check that referenced skills exist in
.claude/skills/(warn if not found — they might be installed later) - Check the chain name doesn't conflict with existing chains (unless editing)
- Show the complete chain definition for approval before saving
Step 3: Save
Read .claude/chains.json (create if it doesn't exist), add/update the chain, write back.
Example output:
{
"chains": {
"post-deploy": {
"description": "After deploying — verify and update memory",
"steps": [
{ "skill": "launch-readiness", "description": "Check production readiness", "pause": true },
{ "action": "update-memory", "description": "Record deploy results" }
]
}
},
"suggest_next": {}
}
Step 4: Suggest Next (Optional)
Ask: "Should any skills suggest this chain as a follow-up? For example, after running save, suggest post-deploy?"
If yes, update the suggest_next map in chains.json.
Rules
- Always show the chain definition for approval before saving
- Never delete existing chains without explicit confirmation
- Warn (don't block) if a referenced skill isn't currently installed