From specforge
Author a new house-style spec into the SpecForge store. Use when the user asks to "write a spec", "create a design doc", "draft a spec for <x>", "research <x>", or "plan to implement <x>". Picks the spec type (design | research | design-impl | impl), scaffolds the right shell, and authors the type's sections — light/dark HTML, stable section ids, a floating TOC; impl types also get a Stages/Tasks plan, a live task tracker, and impl-time stubs. Lints the universal basics before done.
How this skill is triggered — by the user, by Claude, or both
Slash command
/specforge:create-specThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Generate a new SpecForge spec in the global store (`~/.specforge/specs/<id>/`),
Generate a new SpecForge spec in the global store (~/.specforge/specs/<id>/),
honoring house rules, and lint it before declaring done. The daemon serves it and
injects the review layer at serve time.
${CLAUDE_PLUGIN_ROOT} is the installed plugin directory (the SpecForge repo root).
${CLAUDE_PLUGIN_ROOT}/templates/house-rules.md.node "${CLAUDE_PLUGIN_ROOT}/lib/specforge-cli.mjs" create --title "<title>" --type <type>
Prints { id, htmlPath, url, status, type }. It has started/reused the daemon,
copied the right shell to htmlPath (impl types → the full Stages/tracker/Runtime
shell; design/research → a chrome-only doc shell), and attached the spec to this
session. Author into htmlPath — that file IS the spec.
Replace every {{ … }} placeholder ({{TITLE}}, {{DATE}} = today YYYY-MM-DD,
{{STATUS}} = draft, {{OWNER}}). The skeletons below are a starting point —
adapt them to the actual problem (add, drop, reorder, rename sections as the
topic calls for). Whatever sections you keep:
<section> with a stable, unique id (anchors + comments depend
on them). Keep the theme CSS (light/dark vars, [data-theme],
prefers-color-scheme, --maxw) — the review layer drives theme + width.<nav class="toc"> as the floating left sidebar and keep its
<a href="#…"> entries in sync with the sections you end up with.design — tldr · overview (problem / motivation) · goals (goals &
non-goals) · design (the core: architecture, components, alternatives,
tradeoffs — use panels / tables / diagrams) · decisions · open-questions.
No build plan.
research — repurpose the doc shell's sections: tldr (headline finding) ·
question (objective) · background · method (scope + sources consulted) ·
findings (the bulk, organized by sub-question; cite evidence) · analysis
(synthesis) · recommendations · open-questions (gaps) · sources. Rename the
section headings + ids accordingly and update the TOC to match.
design-impl (impl shell) — author tldr · overview · goals · design ·
decisions · open-questions, then build impl-plan as Stages → Tasks using the
data-sf-stage / data-sf-task / data-sf-status markup (one stage = one PR,
each task a verify: note) and mirror it into the task-tracker snapshot table.
Leave impl-decisions / deviations / tradeoffs as the empty stubs (filled
during implementation).
impl (impl shell) — keep the design prose light: tldr · overview (scope +
link to the design if it lives elsewhere) · a brief design (prerequisites /
context). Focus on impl-plan (Stages → Tasks) + the task-tracker snapshot, and
keep the Runtime stubs. Trim goals / decisions if they add nothing.
node "${CLAUDE_PLUGIN_ROOT}/lib/lint-spec.mjs" <htmlPath>
Checks the universal basics — a title, a lifecycle status, unique section ids, and
the light/dark theme contract (per-type sections are recommended, not enforced).
Fix and re-run until PASS. Don't finish on a failing lint.
url (open it to review). Edits to htmlPath live-reload.node "${CLAUDE_PLUGIN_ROOT}/lib/specforge-cli.mjs" wait-batch.
Its completion wakes the session with { ready, pending } — on ready, run the
review-spec flow for each pending spec, then relaunch it; on timeout
(ready:false), just relaunch. One watcher covers every spec attached here.Provides CDSS development patterns for drug interaction checking, dose validation, clinical scoring (NEWS2, qSOFA), and alert classification integrated into EMR workflows.
npx claudepluginhub nitinj/specforge --plugin specforge