SkillFlow

A non-executable intent spec for agent skill workflows.

Steps, branches, and who acts in one file and one graph. Write the flow before the skill, or get it from a skill you have. Then check reports where the skill stops doing what the flow says.

npx skills add skovtunenko/skillflow
Intent specsteps, branches, and who actsflow.kdl
the skill implements itno runtime executes it
Skillyour agent runs itSKILL.md · scripts/
skillflow check finds where the skill and its spec differ.
release-notes.kdl
skillflow 1.0

context "Drafts release notes for a git tag and adds them to CHANGELOG.md." {
	input tag "the git tag to describe"

	output changelog "a new section in CHANGELOG.md"

	invariant by=human "nothing is published without the user's approval"
}

phase gather {
	step collect-changes by=code "Run collect.sh for the tag." {
		output changes "the commits since the last tag"

		catch {
			end "the tag does not exist"
		}
	}

	decide size "Is this a major release?" by=llm {
		when major {
			step ask-highlights by=llm "Ask which changes come first." {
				input highlights "the changes that the user wants at the top"
			}
		}

		when regular "The notes have no highlights."
	}
}

phase write {
	step draft by=llm "Group the changes by type. Revise until the user approves." {
		output draft "the release notes before approval"
	}

	gate approved "Did the user approve the draft?"

	step publish by=code "Add the notes to CHANGELOG.md." {
		output changelog
	}

	step announce by=human "Post the notes to the team channel."
}

Select a node to see its pair.

context
in tagout changelog
nothing is published without the user's approval
major
regular

Use cases

Before the skill exists, a flow is a draft. After that, the flow is the norm. Commands marked by=code run as a script and spend no tokens.

Design

the flow is a draft

Sketch a skill before you write it

Write the steps, the branches, and who acts with your agent, one question at a time.

skillflow author

Try options on the graph

Change the text, and the graph redraws at once. No model is involved.

skillflowctl edit

Understand

the flow explains

Map a skill that you did not write

Your agent reads the skill folder and writes its flow and its graph.

skillflow reverse

Review a skill with a domain expert

The expert comments on nodes of a page, not on SKILL.md. Your agent applies the comments that you accept.

skillflowctl pageskillflow review

Maintain

the flow is the norm

Find drift after an edit

Each node gets ✅, ❌, or ❓, with the file and the line as evidence.

skillflow check

Fix drift on the side you choose

For each difference, you choose: change the skill, or change the flow.

skillflow sync

Why the language exists

Nobody can review a workflow that is spread across prose. In SKILL.md, steps, branches, and who acts are mixed into paragraphs. A flow file gives each one a line. A skill is prompts and code, so each node names who acts.

SKILL.md
Run `scripts/collect.sh <tag>`. If it exits with a non-zero code, the tag does not exist: tell the user and stop.

Load the style-guide skill. Group the changes by type: features first, then fixes.
flow.kdl
step collect-changes by=code "Run collect.sh for the tag." {
	catch {
		end "the tag does not exist"
	}
}

step draft by=llm skill=style-guide "Group the changes by type: features first, then fixes."
skill
promptsSoftware 3.0SKILL.mdreferences/by=llm
a model runs them
codeSoftware 1.0scripts/by=code
runs as written
assetsdataassets/templates and data that the steps read; no executor
in the skill folder
a modelSoftware 2.0your agentits weights run the prompts
younot software the userby=human
you decide and approve
at run time
Software 1.0, 2.0, 3.0: terms of Andrej Karpathy, from his talk Software Is Changing (Again), 2025. The mapping to the parts of a skill is SkillFlow's.
1A model cannot unload text

Text that enters the context stays there until the session resets or the conversation is compacted.

2So the flow shows where a skill loads

skill=style-guide on the step draft loads the style guide. Every node after draft runs with it.

Why not another tool

Other tools specify a feature, draw a picture, or run the workflow. SkillFlow specifies the workflow of one skill, names who acts at each step, and checks the skill against it.

Read in the official documentation of each tool on 2026-12-05. — means that the documentation does not say.
SkillFlowProse in SKILL.mdSpec-driven toolsOpenSpec, Spec Kit, KiroDiagramMermaidBPMN 2.0Workflow runtimeLangGraph, Step Functions
What it describesThe workflow of one skillInstructions, with no required formRequirements, design, and tasks of a changeNodes and edgesA business processA program that the runtime executes
Who acts at each stepYesby=llm, by=code, by=humanNoNono field per stepNoPartlya person or a service; no modelPartlyin the code; no declared field
A parser rejects a wrong specYesthe validatorPartlythe frontmatter onlyPartlyOpenSpec checks the file structurePartlythe syntax onlyYesXML SchemaYes
Checks the implementation against the specYescheck: ✅ ❌ ❓ per node, with file and lineNoit is the implementationPartlyOpenSpec: an AI review of the code. Spec Kit, Kiro: ——NoNothe code is the spec
Runs with no engineYesyour agent runs the skill as it isYesYesYesPartlyan executable model needs an engineNothe runtime executes it
New syntax to learnYesKDL 2.0 and a small set of nodesNoneNone: MarkdownMermaid syntaxThe notation and its XMLThe API of the runtime

Modes

Tokens go only to the modes that need judgment. Your agent runs them as a skill. Drawing the graph and editing the flow by hand run as a script: the same flow gives the same result, with no tokens.

by=llm

Say a mode to your agent

SkillFlow is a skill. The model reads the skill and its flow and judges what differs, so each mode spends tokens. In sync it asks you which side wins.

  1. skillflow reversea skill that has no flow file, or a skill that moved ahead of its flowtruththe skill, as it works nowgivesa flow file
  2. skillflow authora flow for a new skill, or a flow edited in dialoguetruthyour documents and answersgivesa new or edited flow file
  3. skillflow checkto know whether the skill still matches its flowtruthnone: it compares the twogivesa report; no file changes
  4. skillflow syncto bring the flow and the skill back in line, after checktruthfor each difference, the side you choosegivesedits to the flow or to the skill
  5. skillflow explainthe flow explained, shown as a page, or two versions comparedtruththe flow filegivesan explanation, a page, or a comparison
  6. skillflow reviewto act on the comments that a reviewer left on a flow pagetruththe reviewer's commentsgivesedits to the flow or to the skill, for the rows you choose
  7. skillflow helphow to use SkillFlow, or how to write a flowgivesan answer about SkillFlow
by=code

Run a command yourself

skillflowctl is a script in the skill folder. No model, no network, no tokens: the same flow gives the same output.

  1. pageformats and validates the flow, then writes its HTML page
  2. lintchecks the format and validates the flow; writes nothing
  3. editserves an editor on your computer; the graph follows the text
$ skillflowctl lint release-notes.kdl
unchanged release-notes.kdl
OK release-notes.kdl
  phases 2 · steps 5 · decisions 2 · ends 1 · executors: code 2, human 2, llm 3 · ❓ 0
  tools: -
  invariants: code 0 · human 1 · llm 0 · unstated 0

Install

Adds SkillFlow to Claude Code, Codex, Cursor, and more, through skills.sh or kasetto. Claude Code and Codex can also install it as a plugin. Needs Node.js 22 or later.

Then type skillflow help in a new session of your agent.

npx skills add skovtunenko/skillflow
kst add https://github.com/skovtunenko/skillflow --skill skillflow --project
claude plugin marketplace add skovtunenko/skillflow
claude plugin install skillflow@skillflow
codex plugin marketplace add skovtunenko/skillflow
codex plugin add skillflow@skillflow
git clone https://github.com/skovtunenko/skillflow
cp -R skillflow/skills/skillflow <skills-folder>/

Tutorial

Write a flow step by step, then use it. Each step adds one construct and marks the lines and cards that it changed.

Step 1 of 7

Start with one step

A step is one action: a name, who acts, and its intent.

flow.kdl+2
skillflow 1.0

step draft by=llm "Group the changes by type. Revise until the user approves."
Step 2 of 7

Name who acts

A script collects and saves; the model writes; a person posts.

flow.kdl+3
skillflow 1.0

step collect-changes by=code "Run collect.sh for the tag."

step draft by=llm "Group the changes by type. Revise until the user approves."

step publish by=code "Add the notes to CHANGELOG.md."

step announce by=human "Post the notes to the team channel."
Step 3 of 7

Plan the failure

catch says what happens when a step fails; end stops the flow.

flow.kdl+5−1
skillflow 1.0

step collect-changes by=code "Run collect.sh for the tag." {
	catch {
		end "the tag does not exist"
	}
}

step draft by=llm "Group the changes by type. Revise until the user approves."

step publish by=code "Add the notes to CHANGELOG.md."

step announce by=human "Post the notes to the team channel."
Step 4 of 7

Let a person approve

A gate waits for the user; approved and revise are implied.

flow.kdl+1
skillflow 1.0

step collect-changes by=code "Run collect.sh for the tag." {
	catch {
		end "the tag does not exist"
	}
}

step draft by=llm "Group the changes by type. Revise until the user approves."

gate approved "Did the user approve the draft?"

step publish by=code "Add the notes to CHANGELOG.md."

step announce by=human "Post the notes to the team channel."
Step 5 of 7

Fork the path

decide asks one question; each when is one outcome.

flow.kdl+6
skillflow 1.0

step collect-changes by=code "Run collect.sh for the tag." {
	catch {
		end "the tag does not exist"
	}
}

decide size "Is this a major release?" by=llm {
	when major {
		step ask-highlights by=llm "Ask which changes come first."
	}

	when regular "The notes have no highlights."
}

step draft by=llm "Group the changes by type. Revise until the user approves."

gate approved "Did the user approve the draft?"

step publish by=code "Add the notes to CHANGELOG.md."

step announce by=human "Post the notes to the team channel."
major
regular
Step 6 of 7

Group into phases

A phase names a part of the work; the steps keep their order.

flow.kdl+4
skillflow 1.0

phase gather {
	step collect-changes by=code "Run collect.sh for the tag." {
		catch {
			end "the tag does not exist"
		}
	}

	decide size "Is this a major release?" by=llm {
		when major {
			step ask-highlights by=llm "Ask which changes come first."
		}

		when regular "The notes have no highlights."
	}
}

phase write {
	step draft by=llm "Group the changes by type. Revise until the user approves."

	gate approved "Did the user approve the draft?"

	step publish by=code "Add the notes to CHANGELOG.md."

	step announce by=human "Post the notes to the team channel."
}
major
regular
Step 7 of 7

State the data and the rules

context, input, output, and invariant make the contract of the skill.

flow.kdl+15−3
skillflow 1.0

context "Drafts release notes for a git tag and adds them to CHANGELOG.md." {
	input tag "the git tag to describe"

	output changelog "a new section in CHANGELOG.md"

	invariant by=human "nothing is published without the user's approval"
}

phase gather {
	step collect-changes by=code "Run collect.sh for the tag." {
		output changes "the commits since the last tag"

		catch {
			end "the tag does not exist"
		}
	}

	decide size "Is this a major release?" by=llm {
		when major {
			step ask-highlights by=llm "Ask which changes come first." {
				input highlights "the changes that the user wants at the top"
			}
		}

		when regular "The notes have no highlights."
	}
}

phase write {
	step draft by=llm "Group the changes by type. Revise until the user approves." {
		output draft "the release notes before approval"
	}

	gate approved "Did the user approve the draft?"

	step publish by=code "Add the notes to CHANGELOG.md." {
		output changelog
	}

	step announce by=human "Post the notes to the team channel."
}
context
in tagout changelog
nothing is published without the user's approval
major
regular

This is the flow at the top of the page. Change it in the Playground, or read how to write a good flow.

Use your flow

  1. Ask your agent

    In the chat, not in a terminal: SkillFlow is a skill.

    • skillflow reverse my-skill
      Your agent reads the skill and writes its flow file.
    • skillflow check my-skill
      It reports where the skill no longer matches its flow.
    • skillflow help
      It answers how to use SkillFlow and how to write a flow.

    Each message spends model tokens. All modes.

  2. Or run it yourself

    A script in the skill folder. No agent, no tokens.

    .claude/skills/skillflow/skillflowctl page my-skill

    Claude Code keeps the skills of a project in .claude/skills; another agent or a plugin uses its own folder. With no command, the script shows a menu.

Playground

SkillFlow's own flow, in the real editor. Change the text and the graph redraws. It runs in your browser and sends nothing.

Basic principles

  1. One flow file describes exactly one skill.

    flow.kdlrelease-notes/SKILL.md · scripts/ · references/
  2. The flow file is the source of truth; the skill implements it.

    flow.kdlrelease-notes/
  3. Sync works in both directions: flow to skill, or skill to flow.

    flow.kdlrelease-notes/
  4. A flow states intent: steps, decisions, data, dialogue with the user, invariants, and failures, without low-level detail.

    step draft by=llm "Group the changes by type."
  5. Each step and decision names who acts: by=llm, by=code, or by=human.

The language by example

Executors, and who acts for each
by=llmby=codeby=human
the model, subagents includeda bundled script or a fixed command whose result needs no judgmentthe user, who decides or acts

context

Facts about the whole skill.

context "Drafts release notes for a git tag." {
	input tag "the git tag to describe"

	output "a new section in CHANGELOG.md"
}

step draft by=llm "Write the notes for the tag."

phase

A named group of steps.

phase gather "Find what changed since the last tag." {
	step collect-changes by=code
	step draft by=llm
}

step

One action, and who does it.

step draft by=llm "Group the changes by type."

decide + when

A fork of the path; each when is one outcome.

decide size "Is this a major release?" by=llm {
	when major {
		step ask-highlights by=llm
	}

	when regular "No highlights."
}

gate

A person approves; approved and revise are implied.

gate approved "Did the user approve the draft?"

catch

What happens when a step fails.

step collect-changes by=code {
	catch {
		end "the tag does not exist"
	}
}

end

An early exit: the flow stops here.

gate approved "Did the user approve the draft?" {
	when rejected {
		end "the user stopped without approval"
	}
}

invariant

A rule for the whole flow, and who keeps it.

context {
	invariant by=human "nothing is published without the user's approval"
}

gate approved "Did the user approve the draft?"

Why KDL

A flow file is a KDL 2.0.0 document.

  • The skeleton is data

    A parser returns the tree; the validator checks it.

  • Intent stays in strings

    Names hold the structure; strings hold the intent.

  • Mistakes fail loudly

    The parser rejects almost-right text, like true from KDL 1.

  • Nothing to install

    SkillFlow ships its KDL parser, with no dependencies.

— not compared
KDL 2.0 · chosenStructured MarkdownMarkdoc
Skeleton for a scriptNodes, arguments, properties, and child blocks; a parser returns the treeOwn conventions and an own parser; only a linter catches "almost right" textTags {% tag %} on Markdown nodes
ParsersIn Python and JavaScript; SkillFlow ships one with no dependenciesNone for these conventionsOfficial one in JavaScript only
Editor supportVS Code: the KDL extension of kdl-orgBuilt into most editors—
SchemaNo final schema language for 2.0; SkillFlow's validator checks the node vocabulary——
Stability2.0.0 is final, released 2024-12-21—Version 0.x
Reading by a domain expertBrackets and quotes are visibleReads as a document—
Prose inside a nodeIn """ strings, without Markdown highlightingNatural, under a list item—
Written by a modelA model may write KDL 1 forms, such as true for #true; the parser rejects themModels write it with confidence; a linter catches drift from the conventions—

Licenses

MIT, with the notices of each third-party part. Each page that SkillFlow renders shows them in its Help view.

SkillFlow project page

2026.12.02.1MIT License

Copyright (c) 2026 Sergiy Kovtunenko

License text of SkillFlow
MIT License

Copyright (c) 2026 Sergiy Kovtunenko

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Copyright (c) 2022- Bram Gotink

License text of @bgotink/kdl
MIT License

Copyright (c) 2022- Bram Gotink

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.