spec
Spec
Structured execution spec for: $ARGUMENTS
Objective
Transform any starting point — raw text, a brainstorm report, a GitHub issue, a conversation — into a structured execution spec. Produces 3-7 prioritized workstreams with complexity ratings, dependencies, and testable acceptance criteria. Optionally creates GitHub issues from the workstreams.
Parameters
Flags
| Flag | Inverse | Behavior |
|---|---|---|
-s / --save |
-S / --no-save |
Save spec to .claude/output/spec/{slug}/spec.md |
-i / --issues |
-I / --no-issues |
Create GitHub issues from workstreams (implies -s) |
-a / --auto |
-A / --no-auto |
Skip Q&A, make reasonable assumptions |
-e / --economy |
-E / --no-economy |
No subagents, direct tools only |
-f <path> / --from <path> |
— | Prior context — file, GitHub issue (#N), or URL as foundational input. Non-Markdown sources (PDF, DOCX, PPTX, audio, YouTube) → pre-process with /markitdown -s and pass the saved path |
Lowercase enables, uppercase disables. All flags default OFF. Flags are removed from input; remainder becomes {idea}. {slug} is kebab-case from {idea}, max 5 words.
Requirements
gh(GitHub CLI), authenticated viagh auth login— required by-iand by-fwith a GitHub issue reference (#N) or URL. Other flags work withoutgh.
Examples
/spec -s add user authentication with OAuth
/spec -s -f .claude/output/brainstorm/auth-strategy/brainstorm.md "OAuth authentication" # from prior brainstorm
/spec -s -f "#42" "implement payment refunds" # from GitHub issue
/spec -s -a redesign the billing system # skip Q&A
/spec -s -a -i migrate from REST to GraphQL # auto + create issues
/spec -s -e add search functionality # no subagents
Pipeline
/brainstorm -s "topic" → brainstorm.md
/spec -s -f brainstorm.md "..." → spec.md ← you are here
/apex -f spec.md implement WS-1 → code
Spec is the structural bridge. It reads context (a brainstorm, an issue, a conversation), produces workstreams with acceptance criteria, and hands off to /apex — which then implements one workstream at a time.
Output
When {save_mode} = true:
.claude/output/spec/{slug}/
└── spec.md # The structured spec document
If {issues_mode} = true, a ## GitHub Issues section is appended to spec.md after creation, mapping each workstream to its issue number.
Subagent strategy
Discovery (step-01) uses adaptive agent launching unless {economy_mode} = true.
Available subagent types:
Explore— find existing patterns, files, architecture (read-only, fast, context-isolated)general-purpose— research approaches, library docs, web search
Launch count scales with context:
| Scenario | Agents | Composition |
|---|---|---|
| Simple idea, no codebase | 0-1 | Model handles directly; 1x general-purpose only if external research needed |
| Feature in existing codebase | 2-3 | 1x Explore (related code) + 1x Explore (patterns) |
| Complex feature, multiple areas | 3-5 | 2x Explore (different areas) + 1-2x general-purpose |
| Major system, many unknowns | 4-6 | 2x Explore + 2-3x general-purpose |
Why subagents matter here: exploration reports typically produce far more raw output than the final spec needs. Running exploration in subagents keeps the main context clean — the skill sees only the distilled findings, not the file contents scanned to produce them. Launch all chosen agents in a single message so they run in parallel.
Don't over-launch. If the idea is simple or the codebase is small, skip subagents entirely — direct tool use is faster.
State variables
Persist throughout all steps:
| Variable | Type | Description |
|---|---|---|
{idea} |
string | Feature/idea description (flags removed) |
{slug} |
string | Kebab-case identifier, max 5 words |
{auto_mode} |
boolean | Skip Q&A |
{save_mode} |
boolean | Save spec to file |
{issues_mode} |
boolean | Create GitHub issues (forces save) |
{economy_mode} |
boolean | No subagents |
{from_file} |
string | Path to prior context (if -f provided) |
{output_dir} |
string | .claude/output/spec/{slug}/ |
{output_file} |
string | {output_dir}spec.md |
Entry point
FIRST ACTION: parse flags and proceed. Do not load step-01 until init is done.
- Parse flags — lowercase enables, uppercase disables,
-fconsumes next arg as{from_file}, remainder becomes{idea}. - Apply implications — if
{issues_mode}= true, force{save_mode}= true. - Generate identifiers —
{slug}= kebab-case from{idea}(max 5 words);{output_dir}=.claude/output/spec/{slug}/;{output_file}={output_dir}spec.md. - Create output dir — if
{save_mode}= true,mkdir -p {output_dir}. - Show compact summary — one line + one table, then proceed immediately:
> Spec: {idea}
| Variable | Value |
|----------|-------|
| `{slug}` | {slug} |
| `{from_file}` | {path or —} |
| `{auto_mode}` | true/false |
| `{save_mode}` | true/false |
| `{issues_mode}` | true/false |
| `{economy_mode}` | true/false |
→ Discovering...
Keep output minimal: no verbose parsing logs, no separators, no explanations. Load steps/step-01-discover.md immediately after the table.
Steps
Progressive loading — load only the current step file:
| Step | File | Purpose |
|---|---|---|
| 01 | steps/step-01-discover.md |
Context gathering: prior docs, codebase, Q&A |
| 02 | steps/step-02-specify.md |
Write the structured spec document |
| 03 | steps/step-03-issues.md |
Create GitHub issues from workstreams (only with -i) |
Supporting files
templates/spec.md— the canonical spec document format used by step-02scripts/setup-labels.sh— idempotent GitHub label creation (used by step-03)scripts/validate_spec.py— schema + dependency-graph validator (used by step-02; requires Python 3.7+)
Rules
- Never implement. Spec produces a document, not code changes.
- Load one step at a time. Each step file declares its
next_step. - Persist state variables across all steps.
- ULTRA THINK before decomposing work into workstreams.
- Always include concrete acceptance criteria — every workstream, every time.
- Validate before finalizing. Run
python3 ${CLAUDE_SKILL_DIR}/scripts/validate_spec.py {output_file}after writing — exit 0 required. Rewrite flagged workstreams until the schema clears (3-7 workstreams; Priority/Complexity set; deps resolve; no cycles).
Success criteria
- Spec document produced in the canonical format (see
templates/spec.md) - 3-7 workstreams with priority, complexity, tasks, and acceptance criteria
- Dependencies mapped, execution order defined
- Output saved if
{save_mode}enabled - GitHub issues created if
{issues_mode}enabled - Clear bridge commands to
/apexshown at the end
More from coroboros/agent-skills
markitdown
Convert any document to Markdown with Microsoft's `markitdown` CLI — PDF, Word, Excel, PowerPoint, HTML, CSV, JSON, XML, ZIP, EPub, images (OCR/EXIF), audio (transcription), and YouTube URLs. Use whenever the user wants to extract text from a binary document, transcribe audio, OCR an image, scrape a YouTube transcript, or pre-process a file for an LLM context window — even when they just say "convert this pdf", "what's in this docx", "transcribe this mp3", or "get the text out of this".
13design-system
Govern the DESIGN.md — Google's open standard for design tokens (YAML frontmatter + eight prose sections). Auto-activates during UI edits to enforce token-only sourcing for colors, typography, spacing, and corner radius. Also exposes six CLI-backed subcommands — audit (lint + fix proposals), diff (regression check), export (Tailwind / DTCG), spec (canonical spec emission), migrate (port from legacy Stitch format), init (minimal scaffold). When a UI/UX change is requested, DESIGN.md is updated first, audited, then code propagates.
3award-design
Build award-winning websites (Awwwards SOTD 7.5+, FWA, CSSDA). Recommends the best design archetype for the brief, calibrates atmosphere, and produces a complete DESIGN.md. Applies anti-AI-slop rules and targets real judging criteria. Use when building landing pages, portfolios, product sites, or any web interface that needs to look exceptional — not for dashboards or internal tools.
3apex
Systematic implementation using APEX methodology (Analyze-Plan-Execute-eXamine) with parallel subagents and self-validation. Use when implementing features, fixing bugs, or making code changes that benefit from structured workflow.
1oneshot
Single-pass feature implementation using Explore → Code → Test. Ships focused changes at maximum speed, with a built-in circuit breaker that stops and recommends `/apex` or `/spec` when the task turns out more complex than it looked. Use this whenever the user wants a quick win on a single, focused task — even when they don't say "oneshot" (e.g. "just", "quickly", "small change", "#42", or a GitHub issue URL for a small fix).
1agent-creator
Create, configure, and orchestrate Claude Code subagents — specialized Claude instances with focused roles and limited tool access. Covers YAML frontmatter (name, description, tools, model, permissions, hooks, MCP servers), system prompt design, tool restriction patterns, background execution, and multi-agent orchestration. Use whenever the user mentions subagents, delegation, specialists, agent configs, `.claude/agents/`, the `/agents` command, or wants to parallelize work — even when they just say "background agent" or "delegate this".
1