skills/spec-init/SKILL.md
Use when starting a new project or product and you want a docs-first plan before writing code — scaffolds an empty, product-neutral spec-driven-development cascade (product vision, MVP PRD, target tech-stack) for a human to fill, then hands off to brainstorm. Emits skeletons only; it never authors product content and never overwrites existing docs.
npx skillsauth add oprogramadorreal/optimus-claude skills/spec-initInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are scaffolding a docs-first cascade: a small set of empty, human-fillable steering documents that capture product direction before any code exists. This is optimus's bootstrap for spec-driven development.
What you produce (three skeletons under the project root, all product- and tool-neutral):
docs/product/product-context.md — the long-term product vision.docs/product/mvp-prd.md — the first product slice (MVP PRD).docs/product/tech-stack.md — the target technology stack.The boundary — do not cross it. You emit empty skeletons with TODO markers for a human to fill. You author no product content — no personas, no metrics/KPIs, no business-value prose, no technology choices. optimus is an engineering tool; the cascade is product/PM territory that a human owns. The engineering build spec is authored later by /optimus:brainstorm (in docs/specs/), not here. See $CLAUDE_PLUGIN_ROOT/references/sdd-mapping.md for the full contract.
$CLAUDE_PLUGIN_ROOT/skills/init/references/multi-repo-detection.md and scaffold at the appropriate level (workspace root vs. a subproject) rather than blindly in the current folder.For each of the three target files, check whether it already exists:
exists → skipped.If all three already exist, the cascade is already scaffolded: report that and skip to Step 4.
$CLAUDE_PLUGIN_ROOT/skills/spec-init/references/cascade-templates.md.docs/product/) and write the matching template block verbatim to its target path. Do not fill in the TODO markers — that is the human's job.docs/specs/ — the buildable spec is authored later by /optimus:brainstorm or dropped in by a human, in docs/specs/; see the contract;.claude/ (settings, hooks, .optimus-version, or docs) — agent/project setup is /optimus:init's job, not this skill's;Summarize what was created vs. skipped.
Tell the user to fill the TODO sections top-down (vision → MVP PRD → target stack), and state the precedence (the canonical rule lives in $CLAUDE_PLUGIN_ROOT/references/sdd-mapping.md and is restated in each scaffolded doc's header) so they know how the docs relate: higher docs set long-term direction; the active build spec governs what to build right now — when they conflict about current work, the active build spec wins.
Close with the handoff tip. This is not a continuation skill (the human fills the docs out-of-band and /optimus:brainstorm gathers its own context), so use the default — Variant C in $CLAUDE_PLUGIN_ROOT/references/skill-handoff.md:
Next step: fill in the cascade's
TODOsections (vision → MVP PRD → target stack). Then run/optimus:brainstormto design the first build — it reads the cascade as steering and writes the engineering spec todocs/specs/.Tip: for best results, start a fresh conversation for the next skill — each skill gathers its own context from scratch.
development
Iterative test-coverage improvement loop — dispatches `/optimus:unit-test` (unit-test phase) and `/optimus:refactor` with testability focus (refactor phase) into fresh subagent contexts per cycle, applies tests, runs the test suite, bisects refactor failures, and continues until coverage plateaus or the cycle cap (default 5, hard cap 10). Use to drive coverage up on a codebase that has untestable barriers — the loop alternates between writing tests and unblocking testability so a single skill cannot stall.
development
Iterative project-wide refactoring — runs `/optimus:refactor` in a fresh subagent context per iteration, applies fixes, runs tests, bisects failures, and continues until convergence or the iteration cap (default 8, hard cap 20). Supports `testability` or `guidelines` focus to prioritize finding categories. Each iteration runs in an isolated subagent so context does not accumulate. Requires a test command in .claude/CLAUDE.md. Use for thorough guideline alignment or testability cleanup before /optimus:unit-test.
development
Iterative auto-fix code review — runs `/optimus:code-review` in a fresh subagent context per iteration, applies fixes, runs tests, bisects failures, and continues until convergence or the iteration cap (default 8, hard cap 20). Each iteration runs in an isolated subagent so context does not accumulate. Requires a test command in .claude/CLAUDE.md. Use when single-pass review leaves issues or for thorough cleanup before a release.
development
Implements an approved spec by having Claude design and run its own Claude Code dynamic workflow (real parallel subagents) — you hand it the goal and constraints, it chooses the orchestration. Test-first is enforced as a quality bar (tests accompany or precede code and the suite is left green), not as supervised Red-Green-Refactor. A peer of /optimus:tdd for spec implementation; prefer it for large or parallelizable specs where one linear pass is slow. Requires /optimus:init and a spec (auto-detects docs/specs/ or docs/jira/, or pass a path). Uses meaningfully more tokens than a normal session. Use when a spec is ready to build and you want fan-out implementation instead of turn-by-turn TDD cycles.