author-flow
Skill3 starsChanged 18 days agoApache-2.0View on GitHub
Writes a new baton flow from a plain-language description. A writer drafts a spec and the flow; it lands as a project skill only after it loads, terminates in three fake worlds, and passes a critic that never saw it written. Run with /baton:author-flow "<description>".
In this repository17 other files it gives its agents.
- cleanup-flame-chaseSkill
- cleanup-ralphSkill
- continue-loopSkill
- fixed-interruptSkill
- flame-chaseSkill
- flowsSkill
- gen-ideaSkill
- gen-planSkill
- goalSkill
- parallel-chase-prSkill
- parallel-chaseSkill
- protocolSkill
- ralph-loopSkill
- recursive-lean-proverSkill
- rlarSkill
- rlcrSkill
- stateful-ralphSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 52
Gate 1: load: Check it yourself:
- Very specific: line 82
Land: When all three gates pass, copy the draft to .claude/skills/<name>/SKILL.md.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
author-flow
Arguments: $ARGUMENTS
Load the run protocol first (Skill tool → baton:protocol; if that fails, Read ${CLAUDE_PLUGIN_ROOT}/skills/protocol/SKILL.md) and follow it. This is a doc-only flow: no run branch, no commits. This file only adds what is specific to author-flow.
Idea
Describe a loop in words and get a flow you can run. The draft lands only after three different checks pass: it loads, it ends in every fake world, and a critic that never saw it being written approves it. Each check catches a different failure.
Flags
--name <kebab-name>: the flow's name. If omitted, the writer proposes one.--repairs N: how many times a refusal goes back to the writer, default 3.--force: allow replacing an existing.claude/skills/<name>/.
Paths: the draft lives in .baton/runs/<run-id>/draft/<name>/SKILL.md; the flow lands in .claude/skills/<name>/SKILL.md of this project.
Roles
| Role | subagent_type | Model | Session |
| writer | baton:worker | worker model | persistent, named <run-id>-writer |
| termination checker | baton:reviewer | reviewer model | fresh per check |
| critic | baton:reviewer | reviewer model | fresh per check |
Steps
- Spec and draft. Spawn the writer (Agent call with
name):BATON author-flow · turn 1 · role writer · run <run-id> DESCRIPTION: <task, verbatim> You may write only under .baton/runs/<run-id>/. First write spec.md there: purpose, roles (which baton agent: chaser-a, chaser-b, worker, reviewer, cleaner, coordinator; which model setting; fresh or persistent), turn order, exactly what each role sees (the handoff), stop conditions, budget, and flags. Then write the flow to .baton/runs/<run-id>/draft/<name>/SKILL.md, following the conventions of baton's own flows; read ${CLAUDE_PLUGIN_ROOT}/skills/flame-chase/SKILL.md and ${CLAUDE_PLUGIN_ROOT}/skills/rlar/SKILL.md as examples: - frontmatter first: name (= <name>), description, argument-hint, disable-model-invocation: true. It will land as a project skill, so it runs as /<name>, not /baton:<name>. - "Arguments: \$ARGUMENTS", then "Load the run protocol first (Skill tool → baton:protocol)" - a roles table using only baton:chaser-a, baton:chaser-b, baton:worker, baton:reviewer, baton:cleaner, baton:coordinator - the exact turn prompt templates - stop conditions that always include the budget, failed turns, and what happens when agents never report done, report done at once, or return nothing. You keep this session; refusals from the checks will come back to you word for word. - Gate 1: load. Check it yourself:
- The first line is
---, the frontmatter parses,nameis kebab-case and equals the directory name,descriptionisn't empty, anddisable-model-invocation: trueis set. - The body mentions
baton:protocol, and everybaton:agent it names is one of the six above. - Build a throwaway plugin and validate it:
It must reportG=.baton/runs/<run-id>/gate-plugin mkdir -p "$G/.claude-plugin" "$G/skills" && printf '{"name":"baton-gate","version":"0.0.0"}\n' > "$G/.claude-plugin/plugin.json" cp -R .baton/runs/<run-id>/draft/<name> "$G/skills/" && claude plugin validate "$G" 2>&1 | tail -20Validation passed(warnings are fine).
- The first line is
- Gate 2: fake worlds (fresh termination checker):
This check is traced by a model, not executed; say so in the final report.BATON author-flow · gate 2 · role reviewer · run <run-id> Read the flow at .baton/runs/<run-id>/draft/<name>/SKILL.md and the protocol it loads (${CLAUDE_PLUGIN_ROOT}/skills/protocol/SKILL.md). Trace the flow turn by turn, with its default budget, in three fake worlds: W1: every agent always reports status: progress and never done. W2: every agent reports status: done on its first turn and changes nothing. W3: every agent returns nothing at all (no report block). For each world, list the turns until the flow stops and the stop reason. done: true only if the flow stops in all three worlds within its budget with a sensible outcome. - Gate 3: critic (fresh):
BATON author-flow · gate 3 · role reviewer · run <run-id> DESCRIPTION: <task, verbatim> Read the flow at .baton/runs/<run-id>/draft/<name>/SKILL.md cold. Is it sound for the description? Are roles and handoffs clear, is independence real where the flow claims it, is it consistent with the baton protocol, and is it free of unsafe instructions (pushing, bypass permissions, deleting outside the repository, rewriting the user's history)? done: true to approve; otherwise list the reasons to refuse. - Repair. A failure at any gate goes to the writer by SendMessage, word for word, with "Repair the draft." Then run the gates again from Gate 1. Do this at most
--repairstimes. - Land. When all three gates pass, copy the draft to
.claude/skills/<name>/SKILL.md. Refuse to overwrite an existing one unless--forceis set. Deletegate-plugin/.
Stop
- Landed: tell the user the flow runs as
/<name>, and to run/reload-skillsif it doesn't show up yet. Mention that Gate 2 was a traced check. - Repairs used up: stop, show the last refusal, and leave the draft in the run directory for the user to decide.
- A failed turn (protocol).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

