
spec-create
by djalmaaraujo
SKILL.md
name: spec-create description: Create a comprehensive specification file with deep codebase analysis. Generates detailed requirements, technical designs, and implementation logistics. The spec serves as the source of truth for related plans. allowed-tools: Task, TaskOutput, Read, Write, Edit, Glob, Grep, Bash, AskUserQuestion user-invocable: true context: fork
Create Spec
You are now executing the spec-create skill. Follow these steps immediately:
Agent Reference: This skill uses the spec-creator agent (@agents/spec-creator.md) to perform the actual spec creation work.
Template Reference: The default spec template is available at @templates/spec.TEMPLATE.md
Step 0: Check Spec Configuration
First, verify that specs are enabled:
-
Read configuration file: Read
plans/planner.config.json-
If file exists and valid JSON:
- Check if
uses_specfield exists - If
uses_spec: falseor missing, proceed to Step 0b - If
uses_spec: true, proceed to Step 1 - Also read
spec_verbose(default: false)
- Check if
-
If file doesn't exist:
- Proceed to Step 0b
-
Step 0b: Prompt to Enable Specs
If specs are not enabled, use AskUserQuestion:
Question: "Specs are not enabled in your planner configuration. Would you like to enable them?"
Header: "Enable Specs"
Options: [
"Yes - Enable specs (Recommended)",
"No - Cancel spec creation"
]
multiSelect: false
If "Yes":
- Read
plans/planner.config.json - Add
"uses_spec": trueand"spec_verbose": falseto the config - Write updated config back
- Continue to Step 1
If "No": Display message and exit:
════════════════════════════════════════
Spec Creation Cancelled
To enable specs later, either:
1. Run /planner:setup and answer the spec questions
2. Edit plans/planner.config.json and add:
"uses_spec": true,
"spec_verbose": false
════════════════════════════════════════
Step 1: Parse Arguments and Get Prefix
- Check if prefix provided in arguments: Look for prefix in $ARGUMENTS
- If prefix found: Store it and continue to Step 2
- If not provided, use AskUserQuestion:
Question: "What prefix should be used for this spec? (e.g., 'auth', 'checkout', 'user-mgmt')"
Header: "Prefix"
Options: [
"[suggested prefix based on description]",
"Other"
]
multiSelect: false
- Store the prefix for file naming
Step 2: Check for Existing Spec
- Use Glob to check:
plans/[prefix]-spec.md - If spec exists, use AskUserQuestion:
Question: "A spec already exists for prefix '[prefix]'. What would you like to do?"
Header: "Existing Spec"
Options: [
"Update existing spec",
"Cancel - keep existing spec"
]
multiSelect: false
- If "Cancel": Exit with message
- If "Update": Continue (will update existing spec)
Step 3: Get Project Context
Gather codebase information to pass to the agent:
-
Get git author:
git config user.name -
Detect project type:
- Check for package.json, Cargo.toml, go.mod, requirements.txt
- Store detected type and technologies
-
Read existing documentation:
- README.md (if exists)
- .claude/CLAUDE.md (if exists)
- Summarize key points
-
Analyze project structure:
- Use Glob to understand directory layout
- Identify patterns (src/, app/, lib/, etc.)
Store all findings as project_context.
Step 4: Read Configuration Settings
From plans/planner.config.json:
spec_verbose: boolean (default: false)
This affects question frequency:
true: Agent asks more clarifying questionsfalse: Agent maximizes inference from codebase
Step 5: Detect Spec Template
Check for a spec template to ensure consistent structure:
-
Check user's project first: Use Glob to check if
plans/spec.TEMPLATE.mdexists- If found: Read the file using Read tool and store as
template_content - Set
template_source = "project"
- If found: Read the file using Read tool and store as
-
Fall back to plugin default: If not found in project:
- Read the plugin's default template:
templates/spec.TEMPLATE.mdfrom plugin directory - Store as
template_content - Set
template_source = "default"
- Read the plugin's default template:
Step 6: Find Existing Specs
- Use Glob:
plans/*-spec.md - Store as
existing_specsfor context - This helps the agent understand existing spec patterns
Step 7: Spawn Spec-Creator Agent
CRITICAL: You MUST spawn the spec-creator agent now using the Task tool.
This is NOT optional - the agent performs the actual spec creation work.
Use the Task tool with these exact parameters:
Task tool parameters:
description: "Create spec for: [short summary]"
subagent_type: "planner:spec-creator"
prompt: |
description: "[user's full feature description from $ARGUMENTS]"
prefix: "[prefix from Step 1]"
spec_verbose: [true/false from Step 4]
template_source: [project/default]
template_content: |
[TEMPLATE CONTENT IF FROM PROJECT, OR "use built-in default"]
existing_specs:
[LIST OF EXISTING SPEC FILES]
author: "[git username from Step 3]"
project_context: |
[PROJECT CONTEXT FROM STEP 3]
- Project type: [detected type]
- Technologies: [detected technologies]
- README summary: [key points]
- Structure: [directory patterns]
IMPORTANT:
- Analyze the codebase DEEPLY before writing
- MAXIMIZE INFERENCE - only ask if truly necessary or spec_verbose is true
- Follow the template structure exactly
- Create comprehensive, detailed content
BEGIN SPEC CREATION.
Important: Do NOT just gather information - you MUST call the Task tool to spawn the agent.
Step 8: Report Results
After the agent completes, show the creation result:
════════════════════════════════════════
Spec Created Successfully
Spec: plans/[prefix]-spec.md
Title: [spec title]
Status: DRAFT
Configuration:
- Verbose Mode: [enabled/disabled]
- Template: [project custom / plugin default]
Codebase Analysis Performed:
- Project type: [detected type]
- Technologies: [technologies found]
Next Steps:
1. Review the spec: Open plans/[prefix]-spec.md
2. Update status to ACTIVE when approved
3. Generate plans from spec:
/planner:spec-plans-sync [prefix]
OR
/planner:create "implement [prefix]-spec.md"
To change verbose mode:
Edit plans/planner.config.json → "spec_verbose": true/false
════════════════════════════════════════
Reference Information
What This Skill Does
When creating a spec, this skill:
- Verifies Configuration: Checks if specs are enabled, prompts to enable if not
- Gets Prefix: From arguments or prompts user
- Checks Existing: Handles existing spec for same prefix
- Gathers Context: Deep codebase analysis for agent
- Detects Template: Uses custom or default template
- Spawns Agent: Spec-creator agent does the heavy lifting
- Reports Results: Shows what was created and next steps
Spec vs Plan
| Aspect | Spec | Plan |
|---|---|---|
| Purpose | Define WHAT to build | Define HOW to build |
| Content | Requirements, designs | Implementation steps |
| Granularity | Feature-level | Task-level |
| Lifecycle | DRAFT → ACTIVE → DEPRECATED | NOT STARTED → IN PROGRESS → COMPLETED |
| File naming | prefix-spec.md | prefix-001-taskname.md |
Configuration Options
uses_spec (boolean):
true: Spec workflow enabledfalse: Traditional plan-only workflow
spec_verbose (boolean):
true: Agent asks more clarifying questionsfalse: Agent maximizes inference (recommended)
Template System
Project Template (plans/spec.TEMPLATE.md):
- Custom template for your project
- Created via
/planner:eject-template spec - Takes priority over plugin default
Plugin Default Template:
- Built into the spec-creator agent
- Used when no project template exists
- Comprehensive 7-section structure
Example
User: /planner:spec-create auth "User authentication with JWT"
Step 0: Check configuration
→ Found uses_spec: true
→ Found spec_verbose: false
Step 1: Parse arguments
→ Prefix: auth
→ Description: "User authentication with JWT"
Step 2: Check existing
→ No existing auth-spec.md
Step 3: Get project context
→ Author: "John Doe"
→ Project type: Node.js + TypeScript
→ README: API server with Express
Step 4: Read settings
→ spec_verbose: false (maximize inference)
Step 5: Detect template
→ No project template, using default
Step 6: Find existing specs
→ Found: checkout-spec.md, user-spec.md
Step 7: Spawn spec-creator agent
→ Agent analyzes codebase deeply
→ Agent creates plans/auth-spec.md
→ Agent updates PROGRESS.md
Step 8: Report results
→ Spec created: plans/auth-spec.md
→ Status: DRAFT
Score
Total Score
Based on repository quality metrics
SKILL.mdファイルが含まれている
ライセンスが設定されている
100文字以上の説明がある
GitHub Stars 100以上
3ヶ月以内に更新がある
10回以上フォークされている
オープンIssueが50未満
プログラミング言語が設定されている
1つ以上のタグが設定されている
Reviews
Reviews coming soon