This skill activates when the user mentions creating proposals, specs, changes, or plans for new features, breaking changes, or architectural updates in an OpenSpec project. It provides comprehensive guidance on the OpenSpec spec-driven development workflow, including the three-stage process (Create → Implement → Archive), CLI commands, spec format conventions, and decision trees for when to create proposals versus direct fixes. Trigger phrases include: "create a proposal", "write a spec", "plan a change", "add a feature", "breaking change", "architecture change", "openspec workflow", "spec-driven development".
Guides spec-driven development through OpenSpec's three-stage workflow for proposals, specs, and archival.
/plugin marketplace add LaelLuo/claude-code-marketplace/plugin install openspec-workflow@openspec-marketplaceThis skill inherits all available tools. When active, it can use any tool Claude has access to.
references/cli-reference.mdreferences/spec-format.mdreferences/troubleshooting.mdGuide Claude Code through spec-driven development using OpenSpec's three-stage workflow. This skill ensures proposals are created before implementation, specs are properly formatted, and changes are archived after deployment.
Use OpenSpec workflow when:
Skip OpenSpec workflow for:
Before starting:
openspec list and openspec list --specsopenspec/project.mdrg -n "Requirement:|Scenario:" openspec/specsCreate proposal:
change-id (kebab-case, verb-led: add-, update-, remove-, refactor-)mkdir -p openspec/changes/<change-id>/specs/<capability>
proposal.md - Why, what changes, impacttasks.md - Implementation checklistdesign.md - Technical decisions (only if needed, see criteria below)specs/<capability>/spec.md - Delta changesWhen to create design.md:
Create design.md only if ANY of these apply:
Otherwise, omit design.md to keep proposals lean.
Validate before sharing:
openspec validate <change-id> --strict
Fix all errors before requesting approval. Common issues:
#### Scenario: with 4 hashtags)Approval gate: Do NOT start implementation until proposal is reviewed and approved.
Implementation steps:
proposal.md - Understand what's being builtdesign.md (if exists) - Review technical decisionstasks.md - Get implementation checklist- [x] after completionTrack as TODOs: Use TodoWrite to track each task and mark complete as you go.
After deployment, archive the change:
openspec archive <change-id> --yes
This will:
changes/<name>/ → changes/archive/YYYY-MM-DD-<name>/specs/ (source of truth)For tooling-only changes (no spec updates):
openspec archive <change-id> --skip-specs --yes
Use these headers in changes/<id>/specs/<capability>/spec.md:
## ADDED Requirements - New capabilities## MODIFIED Requirements - Changed behavior (paste full updated requirement)## REMOVED Requirements - Deprecated features## RENAMED Requirements - Name changes onlyCritical: MODIFIED requirements When using MODIFIED:
openspec/specs/<capability>/spec.md## MODIFIED Requirements and editCommon mistake: Using MODIFIED to add new concerns without including previous text. This causes data loss. If not changing existing requirement, use ADDED instead.
### Requirement: Feature Name
The system SHALL/MUST provide [capability].
#### Scenario: Success case
- **WHEN** user performs action
- **THEN** expected result
#### Scenario: Error case
- **WHEN** invalid input provided
- **THEN** error message shown
Critical rules:
### Requirement: (3 hashtags) for requirement headers#### Scenario: (4 hashtags) for scenario headersIf change affects multiple capabilities, create multiple delta files:
openspec/changes/add-2fa-notify/
├── proposal.md
├── tasks.md
└── specs/
├── auth/
│ └── spec.md # ADDED: Two-Factor Authentication
└── notifications/
└── spec.md # ADDED: OTP Email Notification
Essential commands:
openspec list # List active changes
openspec list --specs # List specifications
openspec show <item> # Display change or spec
openspec validate <item> # Validate changes or specs
openspec archive <change-id> --yes # Archive after deployment
Useful flags:
--json - Machine-readable output--strict - Comprehensive validation--yes / -y - Skip confirmation prompts--skip-specs - Archive without spec updatesFor detailed CLI reference, see references/cli-reference.md.
"Change must have at least one delta"
changes/<name>/specs/ exists with .md files"Requirement must have at least one scenario"
#### Scenario: format (4 hashtags)Silent scenario parsing failures
#### Scenario: Nameopenspec show <change> --json --deltas-onlyValidation failures
--strict flag for comprehensive checksopenspec show <change> --json | jq '.deltas'For more troubleshooting, see references/troubleshooting.md.
New request?
├─ Bug fix restoring spec behavior? → Fix directly
├─ Typo/format/comment? → Fix directly
├─ New feature/capability? → Create proposal
├─ Breaking change? → Create proposal
├─ Architecture change? → Create proposal
└─ Unclear? → Create proposal (safer)
Only add complexity with:
file.ts:42 format for code locationsspecs/auth/spec.mduser-auth, payment-captureadd-two-factor-authadd-, update-, remove-, refactor--2, -3, etc.changes/ - Proposed, not yet builtspecs/ - Built and deployed (source of truth)archive/ - Completed changesproposal.md - Why and whattasks.md - Implementation stepsdesign.md - Technical decisions (optional)spec.md - Requirements and behavior# 1) Explore current state
openspec list
openspec list --specs
# 2) Choose change id and scaffold
CHANGE=add-two-factor-auth
mkdir -p openspec/changes/$CHANGE/specs/auth
printf "## Why\n...\n\n## What Changes\n- ...\n\n## Impact\n- ...\n" > openspec/changes/$CHANGE/proposal.md
printf "## 1. Implementation\n- [ ] 1.1 ...\n" > openspec/changes/$CHANGE/tasks.md
# 3) Add deltas
cat > openspec/changes/$CHANGE/specs/auth/spec.md << 'EOF'
## ADDED Requirements
### Requirement: Two-Factor Authentication
Users MUST provide a second factor during login.
#### Scenario: OTP required
- **WHEN** valid credentials are provided
- **THEN** an OTP challenge is required
EOF
# 4) Validate
openspec validate $CHANGE --strict
references/cli-reference.md for all commands and flagsreferences/spec-format.md for detailed format rulesreferences/troubleshooting.md for error solutionsRemember: Specs are truth. Changes are proposals. Keep them in sync.
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.