From specforge
Convert an existing design/spec file into a SpecForge spec in the store. Use when the user asks to "convert <file> to a spec", "import this design doc", or "turn this markdown/HTML into a SpecForge spec". Handles two cases: an existing SpecForge-style .html is ingested as-is; a .md or freeform design doc is re-authored into a full house-style HTML spec. Attaches the result to this session and lints before finishing.
How this skill is triggered — by the user, by Claude, or both
Slash command
/specforge:convert-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
Bring an existing file into the SpecForge store. `${CLAUDE_PLUGIN_ROOT}` is the
Bring an existing file into the SpecForge store. ${CLAUDE_PLUGIN_ROOT} is the
installed plugin directory.
$ARGUMENTS). Read it and decide:
.md, or a freeform .html/design doc → re-author into a house-style
spec (step 2B).research (a findings report),
design (a design doc, no plan), design-impl (design + a plan), or impl (a
build plan). Default to design-impl when unsure. Pass it as --type below.node "${CLAUDE_PLUGIN_ROOT}/lib/specforge-cli.mjs" import "<file>" --title "<title>" --type <type>
Prints { id, htmlPath, url, status, type } — the file is copied into the store,
attached to this session, daemon ensured. Lint htmlPath (step 3). If lint fails
because it isn't house-style, fall back to 2B (author into the same htmlPath).
Read the house rules: ${CLAUDE_PLUGIN_ROOT}/templates/house-rules.md.
Scaffold a fresh store spec from the template:
node "${CLAUDE_PLUGIN_ROOT}/lib/specforge-cli.mjs" create --title "<title>" --type <type>
It prints { id, htmlPath, url, type }. Author into htmlPath.
Map the source onto the type's sections exactly as the create-spec skill
describes (design / research / design-impl / impl) — adapt sections to the
content; keep stable unique ids, the theme, and the floating TOC in sync. For
impl types build impl-plan as Stages → Tasks (data-sf-stage/data-sf-task/
data-sf-status, one stage = one PR, each task a verify: note) mirrored into
task-tracker, and leave the Runtime stubs. Preserve the author's intent; don't
invent scope.
Keep every <section id="…">, the theme CSS, and the floating <nav class="toc">
(update TOC links to match the sections you keep).
node "${CLAUDE_PLUGIN_ROOT}/lib/lint-spec.mjs" <htmlPath>
Fix and re-run until PASS. Do not finish on a failing lint.
url. The spec is attached to this session; browser review
comments are delivered back here automatically. Mention the original file is
left untouched (its path is recorded as the spec's origin).node "${CLAUDE_PLUGIN_ROOT}/lib/specforge-cli.mjs" wait-batch.
On its { ready, pending } return, run review-spec for each pending spec then
relaunch it; on timeout, just relaunch. One watcher covers every spec here.npx claudepluginhub nitinj/specforge --plugin specforgeProvides CDSS development patterns for drug interaction checking, dose validation, clinical scoring (NEWS2, qSOFA), and alert classification integrated into EMR workflows.