plugins/linear-spec-plugin/skills/build-stories/SKILL.md
Break down a single Linear spec issue into executable story sub-issues. Reads the spec body, the spec architecture document, and the deliverable architecture, then creates one ordered sub-issue per story under the spec issue. Adapts to project type. Use after /architect-version.
npx skillsauth add jaisonerick/spec-plugin build-storiesInstall 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.
Your task: break a spec into ordered stories sized for a single AI agent session, and create them as sub-issues under the spec issue in Linear.
Scripts live in ${CLAUDE_PLUGIN_DIR}/scripts/linear/. Required: LINEAR_API_KEY. If it isn't set, fetch it from 1Password: export LINEAR_API_KEY="$(op read op://Environments/Linear/credential)".
Created shape:
Issue Spec vX.Y — short name (parent)
├─ Sub-issue 001 — engineer — ...
├─ Sub-issue 002 — designer — ...
└─ Sub-issue 003 — engineer — ...
The numeric prefix on the title (NNN — agent — ...) makes ordering and agent-type visible at a glance — Linear has no story-index document, the parent's child list is the index.
Argument is an identifier or free text. If text:
node "${CLAUDE_PLUGIN_DIR}/scripts/linear/search.js" --type issue --query "<text>" --label "type/spec" --limit 5
Then:
node "${CLAUDE_PLUGIN_DIR}/scripts/linear/resolve-spec.js" "<identifier>" --require-spec-label
Capture: issue.id, issue.identifier, issue.description, project.id, team.key, existing sub-issues.
If the spec issue already has sub-issues, ask via AskUserQuestion:
resolve-spec.js). Pay special attention to Definition of Done — the final story or stories must directly satisfy it.project.documents by title Spec vX.Y — Architecture. Use list-documents.js --title-match to confirm. Read its content.Architecture on the same project) for cross-cutting decisions.Context: line) for project type and code repository path.Break the spec into stories following these principles:
Every story specifies its agent — the agent type that will execute it:
For code projects:
engineer — Backend, data layer, API endpoints, integrations, tests, wiring UI. Runs /execute-task.designer — Visual UI creation: new pages, components, layouts, design system. Runs /interface-design.For non-code projects:
engineer — The default executor. Runs /execute-task for any deliverable type (documents, analyses, research outputs).The orchestrator uses this field directly as subagent_type when spawning agents.
For features with UI, use paired stories:
agent: designer) — Creates visual components/layoutsagent: engineer) — Wires design into codebaseNot every UI story needs pairing. Use judgment.
Each engineer story must include testing acceptance criteria proportional to complexity:
Include a ## Testing Guidance section in each code story.
Each story should include clear acceptance criteria that can be verified by reading/reviewing the output:
001 — ..., 010 — ..., 020 — ...).Before creating any sub-issues, present the proposed story list to the user as a numbered table (number, agent, title, depends-on). Iterate via AskUserQuestion until they approve.
For each approved story, create a sub-issue under the spec issue. Stage the body to /tmp/linear-spec/<spec-id>/NNN-slug.md and run:
cat /tmp/linear-spec/<spec-id>/NNN-slug.md | \
node "${CLAUDE_PLUGIN_DIR}/scripts/linear/create-sub-issue.js" "<spec-identifier>" \
--title "NNN — <agent> — <story title>" \
--state "Backlog"
Story body template (sub-issue description):
**Agent**: `engineer` | `designer`
**Spec**: <link to parent spec issue, e.g. DIN-142>
## Summary
One paragraph describing what this story delivers.
## Prerequisites
- What must exist before starting (prior story identifiers, inputs, access)
## Deliverables
- What exists after completion (new files, endpoints, documents, analyses)
## Acceptance Criteria
- [ ] Concrete, verifiable condition 1
- [ ] Concrete, verifiable condition 2
## Implementation Guidance
Specific guidance on how to produce the deliverable. For code: files to create/modify, patterns to follow. For non-code: sources to use, structure to follow, quality standards.
## Testing Guidance (code projects)
What to test, at what level, and any fixtures needed.
## Architecture Context
Inline the relevant decisions from the spec architecture so the executor doesn't need to cross-reference.
## References
- [Spec architecture document](<architecture doc URL>)
- Parent spec: <DIN-XXX>
Capture each created sub-issue's identifier and URL — return them as a list to the user.
Present:
/orchestrate <spec-identifier> to execute the spec, or /execute-task <story-identifier> for a single story."development
Review UI code for Web Interface Guidelines compliance. Use when asked to "review my UI", "check accessibility", "audit design", "review UX", or "check my site against best practices".
tools
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
development
Convert documents and files to Markdown using markitdown. Use when converting PDF, Word (.docx), PowerPoint (.pptx), Excel (.xlsx, .xls), HTML, CSV, JSON, XML, images (with EXIF/OCR), audio (with transcription), ZIP archives, YouTube URLs, or EPubs to Markdown format for LLM processing or text analysis.
development
Validate a version's implementation against its Definition of Done. For code projects: runs automated tests against the live application. For non-code projects: reviews deliverables against acceptance criteria. Runs incrementally on re-runs. Ends with human validation guidance.