Create a feature specification document from existing research. Produces docs/features/[NNN]-[name].md using the spec-first template. Run this after completing research and before writing any code. Use when you're ready to define what you're building for a specific feature.
Scaffold a feature specification document at docs/features/[NNN]-[name].md.
The argument is the feature name in kebab-case: /feature user-authentication or /feature stripe-checkout.
Never write code before there is a feature spec. This skill is the gate between research and implementation.
Read docs/features/ to find the highest existing feature number.
The new feature gets the next sequential number (zero-padded to 3 digits: 001, 002, etc.).
If docs/features/ is empty or doesn't exist, start at 001.
Use a two-step discovery strategy:
Step 2a — Slug match first: Check if docs/research/[feature-slug].md exists. If yes, this is feature-scoped research written specifically for this feature — read it and include it.
Step 2b — Broader scan: Scan docs/research/ for any other files whose content is relevant (domain/technology research). Read their ## Summary sections to assess relevance.
Collect all relevant research files into a list. These will go in the frontmatter.
If no relevant research exists at all, warn:
"No research found for this feature. It is strongly recommended to run
/research [feature-slug]before writing a feature spec. Continue anyway?"
Create docs/features/[NNN]-[name].md using this template:
---