一键导入
openspec-apply-change
Implement tasks from an OpenSpec change. Use when the user wants to start implementing, continue implementation, or work through tasks.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Implement tasks from an OpenSpec change. Use when the user wants to start implementing, continue implementation, or work through tasks.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Check codebase for architectural violations (factory bypass, raw assign, scope compliance, service layer). TRIGGER when the user discusses creating Core Data objects in production code, adding new entity creation sites, or before PR creation on milestones that touch the service/model layer.
Create a git commit following project conventions. Enforces PREFIX-#.# prefix, imperative mood, no Co-Authored-By. TRIGGER when the user says "commit this", "commit the changes", "let's commit", "make a commit", "save this progress", "check in the code", "snapshot this", "git commit", or any request to create a git commit.
Update all core documentation files after completing a milestone. Use when marking any M#.#.# as COMPLETE. Ensures documentation stays synchronized. TRIGGER when the user says "milestone done", "mark milestone complete", "finish milestone", "this is done", "wrap up this milestone", "close out milestone", "mark it complete", or any indication that a milestone has been completed.
Set up a new milestone for development. Creates feature branch, updates current-story.md, and creates branch-specific next-prompt file with implementation guidance. TRIGGER when the user says "new milestone", "start a new milestone", "create milestone", "begin feature", "next milestone", "set up milestone", or any request to start a new development milestone.
Archive a completed change in the experimental workflow. Use when the user wants to finalize and archive a change after implementation is complete.
Run the mandatory session startup checklist. Reads context docs, checks git status, checks active OpenSpec changes, reports current milestone and branch. TRIGGER when the user says "start session", "begin session", "let's get started", "starting work", "resume session", "pick up where I left off", "what should I work on", or at the start of every Claude Code session.
| name | openspec-apply-change |
| description | Implement tasks from an OpenSpec change. Use when the user wants to start implementing, continue implementation, or work through tasks. |
| license | MIT |
| compatibility | Requires openspec CLI. |
| metadata | {"author":"openspec","version":"1.0","generatedBy":"1.2.0"} |
Implement tasks from an OpenSpec change.
Input: Optionally specify a change name. If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
Steps
Select the change
If a name is provided, use it. Otherwise:
openspec list --json to get available changes and use the AskUserQuestion tool to let the user selectAlways announce: "Using change: " and how to override (e.g., /opsx:apply <other>).
Check status to understand the schema
openspec status --change "<name>" --json
Parse the JSON to understand:
schemaName: The workflow being used (e.g., "spec-driven")Get apply instructions
openspec instructions apply --change "<name>" --json
This returns:
Handle states:
state: "blocked" (missing artifacts): show message, suggest using openspec-continue-changestate: "all_done": congratulate, suggest archiveRead context files
Read the files listed in contextFiles from the apply instructions output.
The files depend on the schema being used:
Show current progress
Display:
Implement tasks (loop until done or blocked)
For each pending task:
bash .claude/skills/_shared/status-line.sh write "[<change-id>] task N/M — <short task title>"
- [ ] → - [x]Pause if:
On completion or pause, show status
Display:
bash .claude/skills/_shared/status-line.sh write "[<change-id>] all tasks complete — ready to archive"
bash .claude/skills/_shared/status-line.sh write "[<change-id>] paused — <blocker>"
Output During Implementation
## Implementing: <change-name> (schema: <schema-name>)
Working on task 3/7: <task description>
[...implementation happening...]
✓ Task complete
Working on task 4/7: <task description>
[...implementation happening...]
✓ Task complete
Output On Completion
## Implementation Complete
**Change:** <change-name>
**Schema:** <schema-name>
**Progress:** 7/7 tasks complete ✓
### Completed This Session
- [x] Task 1
- [x] Task 2
...
All tasks complete! Ready to archive this change.
Output On Pause (Issue Encountered)
## Implementation Paused
**Change:** <change-name>
**Schema:** <schema-name>
**Progress:** 4/7 tasks complete
### Issue Encountered
<description of the issue>
**Options:**
1. <option 1>
2. <option 2>
3. Other approach
What would you like to do?
Guardrails
Fluid Workflow Integration
This skill supports the "actions on a change" model: