kcanom/pi-skill-system-creator/skill-system-creator

Claude Code and agent skill by kcanom/pi-skill-system-creator

Trust tier 2
  • community
LLM review pending
Source check pending

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-creator

SKILL.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-phase demo-* 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
PatternBest forExample
Orchestrator — one master skill runs all phases in one sessionShort workflows (< 7 steps), tight feedback loops, need for speeda single skill with internal Phase 1..N sections
Pipeline — separate skills, each invoked independentlyLong workflows, human review between phases, shared state across sessionse.g. myapp-scan → myapp-plan → myapp-implement → myapp-verify
Anatomy of a Chain Skill

Every skill in a chain must have three things:

  1. Clean YAML front matter — pi must be able to parse it
  2. Phase identity — what phase this is, what comes before/after
  3. 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
yaml
# ✅ GOOD — folded block scalar, no escaping issues
description: >
Does X and Y. Use this when the user says Z. The text can contain
"quotes", colons: fine, or any other characters because YAML does
not try to parse a block scalar's content. It folds newlines into
spaces so keep each line under 80 chars for readability.
# ❌ BAD — double-quoted with unescaped inner quotes
description: "Does X. Use when user says "this phrase" or "that phrase"."
# ^ YAML sees this as the closing quote — everything after is garbage
# ❌ BAD — empty string with dangling continuation
description: ""
This text is not valid YAML. The description is already closed by "".

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
yaml
---
name: my-skill
description: >
One paragraph that tells the assistant WHEN to trigger this skill. Include trigger
phrases people would actually say. Be a little "pushy" — pi under-triggers by
default, so say "use this whenever..." even if the user doesn't explicitly name
the skill.
---

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/:

.my-chain-state.md
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:

markdown
---
task: "<original task description>"
started: <ISO 8601 timestamp>
status: phase-1-done | phase-2-done | complete
chain_version: 1
---
## Phase 1 — <name>
**Output**: <what this phase produced>
**Key decisions**: <anything the next phase needs to know>
## Phase 2 — <name>
...

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
  1. 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.

  1. Update `status` at the end of every phase — this is how the next skill knows it

can proceed.

  1. Every skill reads the state file first — to confirm the previous phase completed.
  2. Do NOT rely on conversation context — it can be lost between skill invocations

or compacted away. The state file is the source of truth.

  1. 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.

  1. 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_version matches the version this phase's SKILL.md declares — abort

on mismatch (state written by an incompatible edition of the chain).

  • Confirm status is 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.

  1. 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 ---:

markdown
## Handoff
After completing this phase, output exactly:
> Phase N complete. State written to `.<chain-name>-state.md`.
> Run `/<chain-name>-<next-phase>` to begin Phase N+1.
Do not start the next phase. Do not offer to continue. Output only the handoff line
and stop.

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:

markdown
## Handoff
**This chain runs unattended.** After completing this phase, do NOT stop and wait.
Immediately proceed to invoke `<chain-name>-<next-phase>` in the same turn, then report
the combined result once the full chain (or the current unattended segment) completes.
Still update the state file exactly as in the human-in-the-loop case — an unattended
run can still be interrupted, and the state file is what lets a later invocation resume
correctly.

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:

  1. What's the overall workflow? (e.g., "scan a project, plan changes, implement them, verify")
  2. How many phases? (2–7 is ideal. If > 7, suggest splitting into sub-chains.)
  3. Orchestrator or pipeline? (see comparison table above)
  4. What state needs to flow between phases? (e.g., a scan result, a plan, a diff)
  5. 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:

bash
ls -d ~/.pi/agent/skills/<chain-name>-* 2>/dev/null

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):

markdown
---
name: <chain-name>-<phase-name>
description: >
Phase N of N in the <chain-name> chain. <What this phase does, when to trigger it.>
Include both standalone trigger phrases and chain-context triggers. Trigger:
"<chain-name>-<phase-name>", "phase N of <chain-name>", or when the previous phase
says "run <chain-name>-<phase-name> next".
---
# <Chain Name>: <Phase Display Name>
Chain version: 1

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

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
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/kcanom/pi-skill-system-creator/skill-system-creator/badge)](https://verified-skill.com/skills/kcanom/pi-skill-system-creator/skill-system-creator)

Something wrong with this skill or its page? Tell us.