From spec-generator
Use this skill to generate versioned API specifications with auto-numbered IDs, structured task breakdowns, and git integration. Triggered by queries like "create a spec", "generate spec", "/stspec:c", or "new API specification".
How this skill is triggered — by the user, by Claude, or both
Slash command
/spec-generator:stspecThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Generate API specification files with automatic numbering, structured task breakdowns, git integration, and AI-assisted task refinement.
references/default-template.mdreferences/task-examples.mdreferences/template-guide.mdscripts/build.shscripts/stspec-cli/Cargo.lockscripts/stspec-cli/Cargo.tomlscripts/stspec-cli/README.mdscripts/stspec-cli/src/git.rsscripts/stspec-cli/src/main.rsscripts/stspec-cli/src/spec.rsscripts/stspec-cli/src/template.rsGenerate API specification files with automatic numbering, structured task breakdowns, git integration, and AI-assisted task refinement.
The skill provides an interactive workflow:
Collect required inputs:
.claude/spec-templates/. Defaults to built-in templateInvoke the spec generation binary with inputs:
project_root from .claude/settings.json or search upward for .git/spec/ directory and auto-incrementspec/SPEC-NNNNN-<title>/spec/SPEC-NNNNN-<title>/SPEC-NNNNN-<title>.mdAnalyze spec description and template structure to intelligently generate taskfiles:
spec/SPEC-NNNNN/taskfiles/XX-task-name.md (one file per subtask)Generate default taskfiles including:
Show user:
✓ Created SPEC-00042-user-auth
- File: spec/SPEC-00042-user-auth/SPEC-00042-user-auth.md
- Tasks: spec/SPEC-00042-user-auth/taskfiles/
- Branch: spec-00042-user-auth
Generated 6 taskfiles (sub-features, test plan, implementation, docs)
Present generated taskfiles and ask:
Allow iterative refinement through two paths:
Path 1: Direct Editing
.md files and provides signal to proceedPath 2: Feedback Prompts
Create git branch and request final confirmation:
spec-NNNNN-<title>spec-00042-user-auth?""Add SPEC-NNNNN: <title>".claude/settings.json (optional): Should contain project_root field pointing to repo root.claude/spec-templates/ (optional): Custom template files in Jekyll markdown format
.claude/spec-templates/rest-api.mdspec/
├── SPEC-NNNNN-shorttitle.md # Main specification file
└── SPEC-NNNNN/
├── 01-subfeature-oauth.md # Auto-generated subtasks
├── 02-subfeature-rate-limit.md
├── 03-test-plan.md
├── 04-implementation.md
└── 05-documentation.md
Each taskfile uses Jekyll frontmatter:
---
title: "OAuth2 Flow Implementation"
story_points: 8
status: "pending"
---
## Description
[Detailed task description]
## Acceptance Criteria
- Criterion 1
- Criterion 2
- Criterion 3
## Implementation Notes
[Any relevant notes]
The plugin provides a built-in API specification template with sections for:
Template applies Jekyll YAML frontmatter:
---
title: "{{ SPEC_TITLE }}"
spec_id: "{{ SPEC_ID }}"
version: "1.0.0"
description: "{{ SPEC_DESCRIPTION }}"
created_date: "{{ CREATED_DATE }}"
---
Store custom templates in .claude/spec-templates/:
.claude/
└── spec-templates/
├── rest-api.md # Template for REST APIs
├── graphql-api.md # Template for GraphQL APIs
└── microservice-spec.md # Template for microservices
Template format uses Jekyll markdown with placeholders:
{{ SPEC_TITLE }} - Specification title{{ SPEC_ID }} - SPEC-NNNNN number{{ SPEC_DESCRIPTION }} - Full description{{ CREATED_DATE }} - Current dateSelect template with: /stspec:c --description "..." --template rest-api
spec-NNNNN-<sanitized-title>spec-00042-user-auth"Add SPEC-NNNNN: <title>"project_rootWhen generating taskfiles:
Note: Taskfile content generation is handled by Claude AI within the plugin skill, not by the Rust binary. The binary creates the file structure and applies templates; the skill refines content.
After initial generation, support iterative refinement:
Example feedback:
Claude updates taskfiles and shows new versions for review.
For detailed information about template creation and task structure, see:
references/default-template.md - Complete default API spec templatereferences/template-guide.md - How to create custom templatesreferences/task-examples.md - Example taskfiles from various API types/stspec:c --description "User authentication API supporting OAuth2, JWT, and session-based auth"
Auto-generates title from first 50 chars: "User authentication API supporting OAuth2, JWT,"
/stspec:c --description "WebSocket real-time notifications system" --title "WebSocket Notifications"
Creates: SPEC-00043-websocket-notifications
/stspec:c --description "..." --template graphql-api
Uses template from .claude/spec-templates/graphql-api.md
stspec-cli) for deterministic file operationsproject_root from configuration for portabilitynpx claudepluginhub singam-tech-inc/spec-generator --plugin spec-generatorGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.