kcanom/pi-skill-system-creator/skill-system-creator
Claude Code and agent skill by kcanom/pi-skill-system-creator
- community
Checking that the SKILL.md file is still in the repository.
Creates, extends, and audits skill chain systems for pi. A skill chain is a sequence of skills that work together as phases of a larger workflow — each skill passes state to the next via a shared file on disk so the workflow survives across separate skill invocations (separate sessions, separate context windows). Use this when the user wants to design a new multi-skill workflow ("I want a chain that does A then B then C"), add a phase to an existing chain, fix broken YAML front matter in any sk…
Install
npx vskill@latest install kcanom/pi-skill-system-creator/skill-system-creatorSKILL.md
The same SKILL.md was published earlier as kcanom/pi-skill-system-creator/skill-system-creator.
Skill System Creator
Creates and manages skill chain systems — sequences of skills where each phase hands off to the next, passing state through a shared file so the chain survives across separate skill invocations.
This is NOT a general skill creator. It only handles multi-skill chains. For single-file skills, use skill-creator.
Files in this skill:
SKILL.md— this file (rules, templates, procedures)EXAMPLE.md— a complete worked example: a real 3-phasedemo-*chain with filled-in
state transitions. Read it when generating a new chain to pattern-match against.
validate-chain.py— standalone validator: YAML checks, handoff-graph walk, cycle /
orphan / dead-end detection. Prefer running it over improvising audit code.
What a Skill Chain Is
A skill chain is a group of skills where:
- Each skill is one phase of a larger workflow
- State flows between phases via a shared state file on disk
- Each skill tells the user what to invoke next using a standard handoff line
- The chain can be invoked as a whole (orchestrator) or step-by-step (pipeline)
Two Chain Patterns
| Pattern | Best for | Example | |
|---|---|---|---|
| Orchestrator — one master skill runs all phases in one session | Short workflows (< 7 steps), tight feedback loops, need for speed | a single skill with internal Phase 1..N sections | |
| Pipeline — separate skills, each invoked independently | Long workflows, human review between phases, shared state across sessions | e.g. myapp-scan → myapp-plan → myapp-implement → myapp-verify |
Anatomy of a Chain Skill
Every skill in a chain must have three things:
- Clean YAML front matter — pi must be able to parse it
- Phase identity — what phase this is, what comes before/after
- Handoff instruction — clear text telling the user/assistant what to invoke next
YAML Front Matter Rules
These rules prevent the two errors that most commonly break skill front matter.
Rule 1: Use > for long descriptions
A single-line double-quoted description is also fine as long as it contains no unescaped inner double quotes. Prefer > whenever the description is long or might contain quotes/colons.
Rule 2: Keep front matter minimal
Only name and description are required. Do not add compatibility or other fields unless the skill genuinely needs them.
Rule 3: One skill = one file at ~/.pi/agent/skills/<name>/SKILL.md
No nested directories unless the skill also needs scripts or reference docs — and even then, keep SKILL.md at the root of the skill's directory.
Shared State Contract
Every chain must define ONE shared state file that all phases read and write. This is what makes the chain survive across separate invocations and separate context windows.
State file location
For a chain called my-chain targeting the user's project, put the state file at the root of the project being worked on — never inside ~/.pi/agent/skills/:
State file format
The header is real YAML frontmatter (wrapped in --- fences), so phases can validate it mechanically with a YAML parser instead of line-grepping:
chain_version is stamped by phase 1 and must match the version the chain's skills declare (put Chain version: N near the top of each phase's SKILL.md body). When you edit a chain in a way that changes the state format or status names, bump the version in every phase. A phase that finds a mismatched chain_version must abort — the state file was written by an older/incompatible edition of the chain and its sections may not mean what this phase expects.
Rules
- Write the state file at the start of every phase — before any work, so if the
session is interrupted, the next invocation knows what was happening.
- Update `status` at the end of every phase — this is how the next skill knows it
can proceed.
- Every skill reads the state file first — to confirm the previous phase completed.
- Do NOT rely on conversation context — it can be lost between skill invocations
or compacted away. The state file is the source of truth.
- Write atomically — never edit the state file in place with a partial write. Write
the full new contents to a temp file in the same directory, then rename it over the real state file: ``bash cat > .my-chain-state.md.tmp <<'EOF' <full new state file contents> EOF mv .my-chain-state.md.tmp .my-chain-state.md ` A rename is a single filesystem operation — if the phase is interrupted mid-write, the old (still-valid) state file survives untouched instead of being left half-written. Never sed -i` or append-in-place edit the live state file.
- Validate the state file before trusting it — a phase must not act on a state file
it hasn't sanity-checked. Before doing any work:
- Confirm the YAML frontmatter parses and contains
task,started,status, and
chain_version.
- Confirm
chain_versionmatches the version this phase's SKILL.md declares — abort
on mismatch (state written by an incompatible edition of the chain).
- Confirm
statusis one of the values this chain's phases actually produce — not a
typo, not a stale value from a chain that was since edited to use different status names.
- Confirm required fields for the current phase are present (e.g., if phase 3 needs
## Phase 2 — <name> output, that section must actually exist in the file).
- If any check fails, abort with a specific error naming what was expected vs. what
was found. Do NOT guess or proceed on a malformed state file — that silently corrupts every phase after it.
- One active session per chain per project — chains assume a single session is
driving them. Atomic writes protect against interrupted writes, not against two sessions (e.g., a background agent plus an interactive one) running phases concurrently. Guard with a lock file next to the state file:
- At phase start, check for
.<chain-name>-state.lock. If it exists, abort with
"Another session appears to be running this chain (lock file present). Remove .<chain-name>-state.lock if that's stale."
- Create the lock file before doing work; delete it after the state update succeeds.
- The lock is advisory, not bulletproof — its job is to catch the common accident,
not to be a distributed mutex.
Handoff Protocol
Every skill MUST end with a clear handoff. This is the text that tells the user (or the assistant, in an unattended run) what to invoke next. Make it impossible to miss.
End-of-skill handoff template
Place this at the very end of every SKILL.md, after the closing ---:
The quoted block (>) is important — it stands out visually. The assistant reads it and outputs it verbatim, so the user can copy or type it to trigger the next skill.
For orchestrator-style chains
The master skill does NOT hand off — it runs everything internally. But it still updates the state file after each internal phase so that if a crash happens, the chain can resume.
Human-in-the-loop vs. autonomous continuation
The default handoff template assumes a human is in the loop: the assistant stops and waits for the user to invoke the next skill. That's correct whenever the chain wants review between phases (the whole point of choosing "pipeline" over "orchestrator").
Some chains, however, are meant to run unattended (e.g., invoked from a scheduled job, a background agent, or another orchestrating skill with no human watching). For those, say so explicitly in the phase's SKILL.md — don't leave it implicit:
When generating a chain, ask the user which mode they want (or ask per-phase, if some phases need review and others don't) — don't assume. Default to human-in-the-loop (stop-and-wait) when unspecified, since that's the safer failure mode.
Creating a New Chain
When the user asks you to create a new skill chain system, follow these steps:
Step 1 — Capture Intent
Ask:
- What's the overall workflow? (e.g., "scan a project, plan changes, implement them, verify")
- How many phases? (2–7 is ideal. If > 7, suggest splitting into sub-chains.)
- Orchestrator or pipeline? (see comparison table above)
- What state needs to flow between phases? (e.g., a scan result, a plan, a diff)
- What should each phase be called? (e.g., "scanner", "planner", "implementer", "verifier")
Step 2 — Define the State File
Design the shared state format. What fields does each phase produce? What fields does the next phase consume? Write this as a template before generating any skill files.
Step 3 — Generate Each Skill File
For each phase, generate ~/.pi/agent/skills/<chain-name>-<phase-name>/SKILL.md.
Collision check first. Before writing anything, check whether each target directory already exists:
If any target directory exists, STOP and ask the user — it may be an unrelated skill that happens to share the name, or a previous version of this chain. Never silently overwrite an existing SKILL.md.
Each file must follow this structure (.<chain-name>-state.md below is a placeholder — substitute the real chain name, e.g. .deploy-check-state.md; never leave a literal placeholder or example name in a generated skill):
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/skill-system-creator/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/kcanom/pi-skill-system-creator/skill-system-creator)