一键导入
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 页面并帮你完成安装。
Scans a project's current practice, classifies each convention by how it is best enforced, and routes it to the fittest mechanism - config, project doc, rule, a project skill, or a paste-ready pointer. Use when setting up an existing project so the first agent execution follows its conventions, or when asked to establish, capture, or align project conventions.
Runs a post-task retrospective - detects user corrections, failures, and repeated mistakes, stages lessons as candidates, and proposes consent-gated improvements routed to their fittest destination (project rule, entry-file fact, memory, backlog, or skill update). Use when a task is complete or about to be marked done, before committing or closing out, or when the user says done, wrap up, or ship it.
Audits any skills directory on three layers - format against shared authoring conventions, content facts (commands, APIs, versions) against live documentation, and rules that never changed the model's behavior - reporting per-layer findings with sources. Use when asked to audit, review, or check whether skills are outdated, stale, bloated, or still correct.
Sets up and re-syncs a project's entry-file harness block — the wiring that brings retro in — plus cross-agent interop glue, with idempotent, diff-first, marker-managed writes; retro owns the learning loop. Use when setting up AI collaboration for a new or existing project, or when re-syncing the managed block after the skills were updated. Optional — projects bootstrap without it.
Creates, edits, or removes a single project rule in the agent's native rule format, enforcing a non-discoverability admission filter and a hard rule budget with provenance stamping. Use when the user asks to add, change, or delete a project rule, or when another skill hands over a drafted rule.
Archive a completed change in the experimental workflow. Use when the user wants to finalize and archive a change after implementation is complete.
| 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 | {"internal":true,"author":"openspec","version":"1.0","generatedBy":"1.5.0"} |
Implement tasks from an OpenSpec change.
Store selection: If the user names a store (a store is a standalone OpenSpec repo registered on this machine) or the work lives in one, run openspec store list --json to discover registered store ids, then pass --store <id> on the commands that read or write specs and changes (new change, status, instructions, list, show, validate, archive, doctor, context). Other commands do not take the flag. Hints printed by commands already carry the flag; keep it on follow-ups. Without a store, commands act on the nearest local openspec/ root.
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")planningHome, changeRoot, and actionContext: planning scope and edit constraintsGet apply instructions
openspec instructions apply --change "<name>" --json
This returns:
contextFiles: artifact ID -> array of concrete file paths (varies by schema - could be proposal/specs/design/tasks or spec/tests/implementation/docs)Handle states:
state: "blocked" (missing artifacts): show message, suggest using openspec-continue-changestate: "all_done": congratulate, suggest archiveRead context files
Read every file path listed under 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:
- [ ] → - [x]Pause if:
On completion or pause, show status
Display:
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: