creating-workflows
Skill4 starsChanged 4 months agoMITView on GitHub
REFERENCE ONLY — schema documentation for authoring devkit workflow YAML files (step types, variable interpolation, loops, parallel groups, examples). NOT a runnable workflow. Load this only when asked to write or modify a workflow YAML, never on natural-language task requests.
In this repository40 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- adrSkill
- auditSkill
- autoloopSkill
- browserSkill
- bugfixSkill
- changelogSkill
- clean-codeSkill
- deep-researchSkill
- doc-genSkill
- dont-reinventSkill
- drySkill
- executingSkill
- featureSkill
- gcliSkill
- harness-auditSkill
- healthSkill
- mega-prSkill
- onboardSkill
- pr-readySkill
- refactorSkill
- researchSkill
- scrapeSkill
- scratchpadSkill
- screenshotSkill
- self-auditSkill
- self-improveSkill
- self-lintSkill
- self-migrateSkill
- self-perfSkill
- self-testSkill
- setup-rulesSkill
- stuckSkill
- test-genSkill
- tri-debugSkill
- tri-dispatchSkill
- tri-reviewSkill
- tri-securitySkill
- yagniSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
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 98
Keep prompts focused. One task per step.
- Very specific: line 99
Use descriptive ids — they appear in logs and output references.
- Distinctive: line 100
Put complex multi-step logic in workflows, not in prompts.
- Distinctive: line 101
Test workflows with small inputs first.
≈ “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
Writing Workflows
Devkit workflows are YAML files in the workflows/ directory. Each workflow defines a sequence of steps executed in order, with optional loops, branches, and parallel groups.
Schema
name: string # Workflow display name
description: string # What this workflow does
budget: # Optional: token budget
limit: number # Max tokens (e.g., 300000)
downgrade: string # Model to downgrade to when approaching limit
steps:
- id: string # Unique step identifier
model: string # Model tier: "smart", "general", "fast"
prompt: string # Instruction (supports {{variable}} interpolation)
command: string # Shell command — runs directly, no LLM (mutually exclusive with prompt)
parallel: [ids] # Optional: run these step IDs concurrently
loop: # Optional: repeat this step
max: number # Maximum iterations
until: string # Stop condition (string match in output)
gate: string # Shell command run after each iteration — exit 0 keeps, non-zero reverts
branch: # Optional: first matching rule wins
- when: string # Sentinel word to look for in this step's output
goto: string # Step id to jump to
end: bool # Optional: workflow completes after this step (unless a branch matched)Step Fields
- id — Must be unique. Used for branch targets and output references.
- model — Which model tier runs this step. Pick based on task complexity.
- prompt — The instruction. Use
{{step-id}}to reference earlier outputs. Use{{input}}for workflow input. Mutually exclusive withcommand. - command — Shell command run directly (no LLM). Output is captured and available via
{{step-id}}. Costs $0. Mutually exclusive withprompt. - expect — Only for
commandsteps. Values:success(step fails if exit code is non-zero) orfailure(step fails if exit code is 0). Omit for the default behavior where all exit codes are informational. Enables bugfix reproduction gates: repro withexpect: failuremust fail before fix, verify withexpect: successmust pass after. - parallel — Lists step IDs to run concurrently. Listed steps are skipped in their sequential position and run only inside the dispatcher. Children must be plain prompt steps (no command, loop, branch, or end), and a branch may not
gotoa child. Over MCP, the agent reports results withdevkit_advanceoutputs: {"<child-id>": "<result>", ...}— one entry per child — so later steps can use{{child-id}}. - loop — Repeats with
maxiterations. Completes when thegate(if set) passes and theuntilsentinel (if set) appears in the iteration's output — a failing gate is never overridden by the sentinel. Over MCP, ifmaxis reached with the gate still failing the workflow halts (loop_exhausted); if only the sentinel is missing it continues with aLOOP EXHAUSTEDwarning. - loop.gate — Shell command run after each loop iteration. Exit 0 = keep changes and commit. Non-zero = revert changes via
git checkout. 3 consecutive gate failures trigger stuck detection and stop the loop. - branch — Routes execution conditionally: a list of
when/gotorules evaluated against the step's output; the first match jumps togoto, no match falls through. - end — Marks a terminal step. After it runs (and no branch rule matched) the workflow completes instead of falling through. Use it to stop a main path before an alternative path placed later in the file (e.g. a TINY
quick-fixreached only by branch).
Minimal Example
name: summarize-and-review
description: Summarize a document then review the summary
steps:
- id: summarize
model: general
prompt: |
Summarize in 3 bullet points:
${{input.document}}
- id: review
model: smart
prompt: |
Review this summary for accuracy:
Summary: ${{steps.summarize.output}}
Original: ${{input.document}}Command + Gate Example
name: lint-and-fix
description: Deterministic lint loop with gate enforcement
steps:
- id: baseline
command: "eslint src/ 2>&1 || true"
- id: fix
model: smart
prompt: |
Lint output: {{baseline}}
Fix ONE group of related issues.
loop:
max: 10
until: "exit code: 0"
gate: "eslint src/"
- id: report
command: "echo 'Lint session complete'"Key behaviors:
commandsteps run shell commands directly — no LLM tokens spent.gateruns after each loop iteration. Exit 0 keeps changes, non-zero reverts via git.- 3 consecutive gate failures stop the loop (stuck detection).
- Command output includes
exit code: Nfor downstream branching.
Tips
- Keep prompts focused. One task per step.
- Use descriptive
ids — they appear in logs and output references. - Put complex multi-step logic in workflows, not in prompts.
- Test workflows with small inputs first.
- Set token budgets for expensive workflows to prevent runaway costs.
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.

