Use when adding a new workflow skill to pi-thinkrail-workflow, changing an existing workflow skill's role, trigger, handoff, or structure, or checking a workflow skill against the workflow system's rules. Not for authoring general-purpose skills outside this package.
npx skills add https://github.com/JetBrains/thinkrail --skill writing-workflow-skills
The authoring checklist for workflow skills in packages/pi-thinkrail-workflow. It carries the *what
to do*; every *why* — the concept model, the three roles, the meta-rules cited as "(rule N)" below —
lives once in the workflow-system spec beside this directory, skills/SPEC.md. Read that spec
first; where this checklist and that spec disagree, the spec wins.
Workspace guard. This checklist edits packages/pi-thinkrail-workflow in the thinkrail repo. If
that package is not in the current workspace (a ThinkRail-managed project, where these skills are a
read-only staged cache), the family cannot be extended from here: say so in one line and stop — the
terminal state for foreign workspaces.
skills/SPEC.md: concept model, the three roles, meta-rules 1–15.Internal forks, branches, stages, and shared tails are sibling docs, planned with the choice
rules in the doc (or spine) before the fork; a doc is promoted to its own skill when it needs
independent addressability (an external caller, a genuine self-trigger, or a direct entry point
such as a /skill: command seed) — never for shape or size alone.
(one phase's steps), or concept (one topic's reusable rules/mental model — no steps, no
handoffs).
consumer stays a sibling file, not a concept skill.
successor, back to its caller, or a declared terminal state — an internally forking worker ends
by naming the sibling doc that continues the flow, with the terminal state declared in the doc
where the flow ends; a concept has no ending at all — it writes no ending section, control
simply returns to its reader. Know the exact wording before writing the body.
topology — stop: update skills/SPEC.md first, then come back here (rule 13).
topic for a concept — name the work or the insight, never the artifact or a role. Directory
name = frontmatter name.
skills/<name>/SKILL.md with frontmatter name + description. Nothing else changes —package.json's pi.skills already points at ./skills.
description = triggering conditions only, "Use when …" (plus a "Not for …" negative trigger ifthe boundary is confusable) — never a summary of the steps (rule 5). Skills are reached by
routing; a self-trigger description is for unmistakable triggers only (rule 4).
SKILL.md spine and each sibling doc. Internalworkflow nodes (branches, stages, shared tails) and heavy reference material live in sibling
docs inside skills/<name>/, named in the exact step that hands to them; the spine carries the
doc map, and each internal-node doc opens with a one-line contract (entry state, what it saves,
where control goes next).
steps, never force-load its files.
red flags for discipline violations, positive recipes for output shape.
resume state, scratch plans — declare them (rule 9): name their shape in the skill and put them
in the workspace's gitignored .thinkrail/context/ (the home for every temp doc), consume/delete
them when the work lands, and promote anything durable to specs before cleanup.
section.
(skills/choosing-a-workflow/SKILL.md) by default, or the nearest sub-router when the skill is
a branch under an already-routed workflow (fractal routing). Exception (rule 4): a skill outside
any router's work classification — self-trigger-only skills and concept skills — skips the
router line; that's a designed property of the skill, never a size call, and it is instead named
in skills/SPEC.md's family table as outside the routing table.
skills/SPEC.md's Workflow family table, including itsRouted from entry (which router routes to it — or that it sits outside the routing table).
skills/SPEC.md). When practical,still run a real request through the new or changed skill and watch it flow: the router (or
the description) triggers it, the body is followed, the ending fires as designed. For a
concept: a referencing skill (or its self-trigger) loads it and its rules are applied.
unverified by use until a run has beenobserved; update the row when one has.
description mentions any step of the workflow.skills/SPEC.md's) content instead of pointing at it.frontmatter) — internal nodes are sibling docs, not skills (rule 1).
router line is only for self-trigger-only skills and concept skills per rule 4 — size is never the
reason.
suspended as a done-gate, but an unobserved skill is still unverified by use, never "verified".
This checklist ends here — no successor skill. Done means: skills/<name>/SKILL.md exists and passes
the checks above, and the router line and family-table row are in place — the row honestly marked
unverified by use until a real request has been observed flowing through the skill (rule 14,
currently suspended as a done-gate).
Take jetbrains/writing-workflow-skills from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.