Sketch a skill before you write it
Write the steps, the branches, and who acts with your agent, one question at a time.
skillflow authorSteps, 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/skillflowflow.kdlSKILL.md · scripts/skillflow check finds where the skill and its spec differ.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.
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.
Write the steps, the branches, and who acts with your agent, one question at a time.
skillflow authorChange the text, and the graph redraws at once. No model is involved.
skillflowctl editYour agent reads the skill folder and writes its flow and its graph.
skillflow reverseThe expert comments on nodes of a page, not on SKILL.md. Your agent applies the comments that you accept.
skillflowctl pageskillflow reviewEach node gets ✅, ❌, or ❓, with the file and the line as evidence.
skillflow checkFor each difference, you choose: change the skill, or change the flow.
skillflow syncNobody 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.
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.
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.mdreferences/by=llmscripts/by=codeassets/templates and data that the steps read; no executoryour agentits weights run the promptsthe userby=humanText that enters the context stays there until the session resets or the conversation is compacted.
skill=style-guide on the step draft loads the style guide. Every node after draft runs with it.
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.
| SkillFlow | Prose in SKILL.md | Spec-driven toolsOpenSpec, Spec Kit, Kiro | DiagramMermaid | BPMN 2.0 | Workflow runtimeLangGraph, Step Functions | |
|---|---|---|---|---|---|---|
| What it describes | The workflow of one skill | Instructions, with no required form | Requirements, design, and tasks of a change | Nodes and edges | A business process | A program that the runtime executes |
| Who acts at each step | Yesby=llm, by=code, by=human | No | Nono field per step | No | Partlya person or a service; no model | Partlyin the code; no declared field |
| A parser rejects a wrong spec | Yesthe validator | Partlythe frontmatter only | PartlyOpenSpec checks the file structure | Partlythe syntax only | YesXML Schema | Yes |
| Checks the implementation against the spec | Yescheck: ✅ ❌ ❓ per node, with file and line | Noit is the implementation | PartlyOpenSpec: an AI review of the code. Spec Kit, Kiro: — | — | No | Nothe code is the spec |
| Runs with no engine | Yesyour agent runs the skill as it is | Yes | Yes | Yes | Partlyan executable model needs an engine | Nothe runtime executes it |
| New syntax to learn | YesKDL 2.0 and a small set of nodes | None | None: Markdown | Mermaid syntax | The notation and its XML | The API of the runtime |
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.
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.
skillflow reversea skill that has no flow file, or a skill that moved ahead of its flowtruththe skill, as it works nowgivesa flow fileskillflow authora flow for a new skill, or a flow edited in dialoguetruthyour documents and answersgivesa new or edited flow fileskillflow checkto know whether the skill still matches its flowtruthnone: it compares the twogivesa report; no file changesskillflow syncto bring the flow and the skill back in line, after checktruthfor each difference, the side you choosegivesedits to the flow or to the skillskillflow explainthe flow explained, shown as a page, or two versions comparedtruththe flow filegivesan explanation, a page, or a comparisonskillflow 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 chooseskillflow helphow to use SkillFlow, or how to write a flowgivesan answer about SkillFlowskillflowctl is a script in the skill folder. No model, no network, no tokens: the same flow gives the same output.
pageformats and validates the flow, then writes its HTML pagelintchecks the format and validates the flow; writes nothingeditserves 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 0Adds 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>/ Write a flow step by step, then use it. Each step adds one construct and marks the lines and cards that it changed.
A step is one action: a name, who acts, and its intent.
skillflow 1.0
step draft by=llm "Group the changes by type. Revise until the user approves."A script collects and saves; the model writes; a person posts.
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."catch says what happens when a step fails; end stops the flow.
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."A gate waits for the user; approved and revise are implied.
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."decide asks one question; each when is one outcome.
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."A phase names a part of the work; the steps keep their order.
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."
}context, input, output, and invariant make the contract of the skill.
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."
}This is the flow at the top of the page. Change it in the Playground, or read how to write a good flow.
In the chat, not in a terminal: SkillFlow is a skill.
skillflow reverse my-skillskillflow check my-skillskillflow helpEach message spends model tokens. All modes.
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.
SkillFlow's own flow, in the real editor. Change the text and the graph redraws. It runs in your browser and sends nothing.
One flow file describes exactly one skill.
flow.kdlrelease-notes/SKILL.md · scripts/ · references/The flow file is the source of truth; the skill implements it.
flow.kdlrelease-notes/Sync works in both directions: flow to skill, or skill to flow.
flow.kdlrelease-notes/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."Each step and decision names who acts: by=llm, by=code, or by=human.
by=llm | by=code | by=human |
|---|---|---|
| the model, subagents included | a bundled script or a fixed command whose result needs no judgment | the user, who decides or acts |
contextFacts 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."phaseA named group of steps.
phase gather "Find what changed since the last tag." {
step collect-changes by=code
step draft by=llm
}stepOne action, and who does it.
step draft by=llm "Group the changes by type."decide + whenA 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."
}gateA person approves; approved and revise are implied.
gate approved "Did the user approve the draft?"catchWhat happens when a step fails.
step collect-changes by=code {
catch {
end "the tag does not exist"
}
}endAn early exit: the flow stops here.
gate approved "Did the user approve the draft?" {
when rejected {
end "the user stopped without approval"
}
}invariantA 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?"A flow file is a KDL 2.0.0 document.
A parser returns the tree; the validator checks it.
Names hold the structure; strings hold the intent.
The parser rejects almost-right text, like true from KDL 1.
SkillFlow ships its KDL parser, with no dependencies.
| KDL 2.0 · chosen | Structured Markdown | Markdoc | |
|---|---|---|---|
| Skeleton for a script | Nodes, arguments, properties, and child blocks; a parser returns the tree | Own conventions and an own parser; only a linter catches "almost right" text | Tags {% tag %} on Markdown nodes |
| Parsers | In Python and JavaScript; SkillFlow ships one with no dependencies | None for these conventions | Official one in JavaScript only |
| Editor support | VS Code: the KDL extension of kdl-org | Built into most editors | — |
| Schema | No final schema language for 2.0; SkillFlow's validator checks the node vocabulary | — | — |
| Stability | 2.0.0 is final, released 2024-12-21 | — | Version 0.x |
| Reading by a domain expert | Brackets and quotes are visible | Reads as a document | — |
| Prose inside a node | In """ strings, without Markdown highlighting | Natural, under a list item | — |
| Written by a model | A model may write KDL 1 forms, such as true for #true; the parser rejects them | Models write it with confidence; a linter catches drift from the conventions | — |
MIT, with the notices of each third-party part. Each page that SkillFlow renders shows them in its Help view.
Copyright (c) 2026 Sergiy Kovtunenko
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
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.