From thenn
Use this skill when scaffolding or updating a .thenn workflow file. Teaches Claude how to generate and modify flows, apply the input injection rules, and write the file to .thenn/. Loaded automatically by the /thenn.new and /thenn.update commands.
How this skill is triggered — by the user, by Claude, or both
Slash command
/thenn:thenn-builderThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
This skill defines the authoring protocol for `.thenn` workflow files. Follow these instructions when creating or updating a flow.
This skill defines the authoring protocol for .thenn workflow files. Follow these instructions when creating or updating a flow.
.thenn files are YAML with this top-level structure:
name: flow-name # required
description: "..." # shown in /thenn.list
input: "Prompt text" # optional: ask this if no args given at run time
steps:
- id: step-id # required; used in progress output and error messages
type: agent # agent | coordinator | bash | human | loop
# type-specific fields below
Per step type:
type: agent — runs a command, agent, or prompt in a fresh subagent context:
command: name-of-command # calls /name-of-command slash command
agent: name-of-agent # spawns a named subagent
prompt: "..." # standalone: full inline prompt; combined with command/agent: appended as context
input: true # required: true: inject user's run-time description; false: read context from disk
type: coordinator — same fields as type: agent, but the runner processes the step in its own main conversation instead of spawning a subagent. Use this when the step needs to spawn its own subagents, interact with the user mid-flow, or make decisions based on flow state.
type: coordinator
command: name-of-command # runner invokes the slash command in the main conversation
agent: name-of-agent # runner uses the Agent tool to spawn the named agent
prompt: "..." # runner processes the prompt in the main conversation
input: true # required: same as type: agent
type: bash — runs a shell command:
run: "shell command here"
on_failure: stop # stop | continue | human (default: stop)
type: human — pauses for user review:
message: "Instructions for the human"
type: loop — repeats sub-steps until an exit condition is met:
max_iterations: 5
until:
type: bash
run: grep -q "^status: pass" docs/review.md
steps:
- id: review
type: agent
command: review-code
type: coordinatorThe default behaviour for AI-driven steps is type: agent — spawn a fresh subagent. That is the right choice for the majority of steps: a subagent has a clean context and a focused task, which is exactly the "context-light" model thenn is built around.
Use type: coordinator only when the step genuinely cannot work as a subagent:
type: coordinator.AskUserQuestion to clarify with the user, then continue based on the answer. (A subagent can do this too, but type: coordinator is the explicit form when you want the runner — not a black-box subagent — to handle it.)For everything else, leave it as type: agent. The default keeps each step inspectable, replayable, and editable mid-flow.
type: coordinator stepsWhen you use type: coordinator, the prompt you write is given to the runner (the main conversation), not to a subagent. The runner is the orchestrator; the convention is for the runner to be a context-light coordinator for this step.
Write the prompt in coordinator voice. The prompt should:
Do:
Don't:
input: true vs input: falseEvery type: agent and type: coordinator step must declare input: true or input: false. Apply this rule to every such step:
Ask: "Could this step do its job correctly using only files on disk, without knowing what the user originally asked for?"
input: trueinput: falseCommon pattern: early steps that establish context (reproduce, plan, specify) often need input: true even if a previous step already ran, because files written so far may not capture the full human intent. Later steps that purely execute against an already-written plan or spec can use input: false. For type: coordinator steps, the runner reads .thenn-state/input.md itself and incorporates it into the work — so the same input: true / input: false choice applies, but the runner (not a subagent) does the reading.
name: <name>
description: Describe what this flow does
steps:
# Run a slash command in a fresh context
- id: step-one
type: agent
input: true # true: inject user's run-time description; false: read context from disk
command: your-command-name # must exist in .claude/commands/
# Pause for human review
- id: review
type: human
message: "Review the output, then press Continue"
# Run a shell command
- id: commit
type: bash
run: git add . && git commit -m "chore: from thenn flow"
on_failure: stop # stop | continue | human
Given a <name> and optional <description>:
mkdir -p .thenn to ensure the directory exists..thenn/<name>.thenn already exists. If it does, use AskUserQuestion to confirm: ".thenn/<name>.thenn already exists. Overwrite?" with options ["Yes, overwrite", "Cancel"]. If cancelled, stop.input: true / false rule to every type: agent and type: coordinator step. Use type: coordinator for any step that genuinely needs to spawn its own subagents, fan out dynamically, or interact with the user mid-flow (see "When to use type: coordinator" above). Do not use the generic scaffold.<name>..thenn/<name>.thenn.Created .thenn/<name>.thenn
Edit it to define your steps, then run it with: /thenn.run <name>
Given a resolved <file-path> and optional <change> description:
description, input, or step fields as neededinput: true / false rule to any affected type: agent or type: coordinator stepstype: agent and type: coordinator where appropriate (see "When to use type: coordinator" above)["Cancel"]. Use the user's typed answer as the change description, then apply it per step 2. If the user selects Cancel, stop.<file-path>.Updated <file-path>
Run it with: /thenn.run <name>
Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub joe-withers/thenn --plugin thenn