From ank
Turn a rough product idea (or the output of /ank:third-degree) into a single, opinionated SPEC.md that serves as the source of truth for an entire product or feature. Use whenever the user invokes /ank:spec, says "let's design this", "draft a spec", "write the design doc", "turn this into a tech spec", or otherwise signals they want the idea crystallised into a reviewable document before tasks or code. The skill produces ONE file (SPEC.md at repo root for product-level specs, or docs/spec/<slug>.md for feature-level) and then HARD STOPS, waiting for explicit approval before any downstream skill (/ank:tasks) runs.
How this skill is triggered — by the user, by Claude, or both
Slash command
/ank: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
The user has an idea — either fresh, or already pressure-tested via `/ank:third-degree`. Your job is to **freeze that idea into a single SPEC.md** that's sharp enough to drive task breakdown and implementation without further interrogation.
The user has an idea — either fresh, or already pressure-tested via /ank:third-degree. Your job is to freeze that idea into a single SPEC.md that's sharp enough to drive task breakdown and implementation without further interrogation.
You are not writing tasks. You are not writing code. You are not even sketching the package layout in chat — you put it in the file.
/ank:third-degree → /ank:spec → /ank:tasks → (build with Claude Code) → /ank:review-board
(interview) (this) (issues + (implementation) (post-feature
scaffold) walkthrough)
If the conversation already contains a third-degree summary, use it as the analysis input — do not re-interview. If it doesn't, do the deep analysis pass yourself (Stage 1 below) but resist the urge to ask more than 2-3 clarifying questions. The spec itself is the place to surface assumptions, via the Open Questions section.
| Scope | Path | Trigger |
|---|---|---|
| Product-level (the whole thing) | ./SPEC.md at repo root | Default. Use when the idea defines a new product, library, service, or app. |
| Feature-level (one slice) | ./docs/spec/<slug>.md | Use when the user explicitly says "feature spec" or the work is scoped inside an existing product that already has a SPEC.md. |
If SPEC.md already exists at root and the user is starting fresh, ask once whether to overwrite or write the new one to docs/spec/<slug>.md. Never silently overwrite.
The required section list below is the union of what a strong library/SDK spec and a strong SaaS/app spec each need. Different products lean on different sections:
A strong spec borrows discipline from both shapes regardless of product type. Even a SaaS spec benefits from a sharp Is/Isn't; even a library benefits from naming its target user.
Synthesize the idea into a short structured analysis. Cover:
Print the analysis in chat. Stop and let the user redirect. Do not write the file yet. If they say "looks right, draft it" (or equivalent — "go", "ship the spec", "lgtm"), move to Stage 2.
Before drafting, resolve which conditional sections apply. If not obvious from Stage 1, ask once via AskUserQuestion with concrete options:
Use Stage 1's analysis to skip this step entirely when the answer is clear (e.g., user said "I want to build a CLI" → no UI, no DB, no pricing).
Write the file. Use descriptive section names with numbers (## 1. Problem & users, ## 2. Is / Isn't, …). Plain Markdown, no HTML, no inline images.
main.py example. For a CLI: a command session. For a SaaS: the canonical user journey in 4-6 steps. The reader should understand the product after reading this section alone.✅ Resolved: prefix with a one-line rationale. The decision log lives in the spec, not in chat.| Section | Trigger | Shape |
|---|---|---|
| Tech stack rationale | ≥2 candidate technologies for any layer where the choice isn't obvious | Table with "Layer / Choice / Why not the alternative" columns; one row per non-obvious decision |
| Data model | Persistent storage present | Table-by-table SQL where the schema matters; fold payload shapes (JSONB, message envelopes) into the module that owns them rather than top-level |
| API endpoints | HTTP/RPC routes exposed | Flat list grouped by resource; one route per line (GET /api/foo/:id) |
| Frontend / UX architecture | UI present | Project structure tree + one canonical layout (ASCII or prose) + visual treatment rules |
| Pricing / business model | Commercial product | Tier table with price + key limits per tier |
| Success metrics | Always recommended; required if commercial | PMF/adoption signals for SaaS; install count / adoption metrics for libraries |
| Glossary | Spec >10 printed pages OR introduces ≥5 domain terms | Flat term:definition list |
| Reference mapping | Spec is a rewrite/extraction of prior art | Old-concept → new-equivalent table |
Place conditional sections after the required nine, in the order listed.
After writing the file:
Confirm the file path in chat: Written: SPEC.md (or docs/spec/<slug>.md).
List the section headings in the order they appear, so the user knows what to scroll to.
Call out any assumption you had to make that surfaced in an Open Question — one line each.
Stop. Do not run /ank:tasks. Do not propose tasks. Do not write code. Do not touch other files.
End your message with:
Review the spec and reply with "approved" to lock it in (then run
/ank:taskswhen ready), or send edits and I'll revise.
Anything other than explicit approval ("approved", "lgtm", "ship it", "lock it in") is treated as edits — revise the file and stop again. Repeat until approved.
docker-compose.yml, dependency lists belong in TASKS.md Phase 0, not in the spec. The spec says what gets built; tasks say how to set it up.Common requests to refuse:
/ank:tasks. The hard stop is the point.If you find yourself thinking through tradeoffs in chat ("we could either A or B…"), stop and put the tradeoff in the spec — usually as an Open Question with the two branches, or as a Design Principle if you've decided. Conversation-only reasoning evaporates; the spec is the durable artifact.
Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub ananthanandanan/skills --plugin ank