npx skills add https://github.com/afterthought/saas-controller --skill openspec-apply-change根据 OpenSpec 变更实现任务。
输入 : 可选指定变更名称。如果省略,检查是否可以从对话上下文中推断。如果模糊或存在歧义,你必须提示可用的变更。
步骤
如果提供了名称,则使用它。否则:
* 如果用户提到了变更,则从对话上下文中推断
* 如果只有一个活跃的变更存在,则自动选择
* 如果存在歧义,运行 `openspec list --json` 以获取可用变更,并使用 **AskUserQuestion 工具** 让用户选择
始终宣布:"使用变更:" 以及如何覆盖(例如,/opsx:apply <其他>)。
检查状态以了解模式
openspec status --change "<名称>" --json
解析 JSON 以了解:
* `schemaName`: 正在使用的工作流(例如,"spec-driven")
* 哪个工件包含任务(对于 spec-driven 通常是 "tasks",检查其他模式的状态)
3. 获取应用说明
openspec instructions apply --change "<名称>" --json
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
If a name is provided, use it. Otherwise:
* Infer from conversation context if the user mentioned a change
* Auto-select if only one active change exists
* If ambiguous, run `openspec list --json` to get available changes and use the **AskUserQuestion tool** to let the user select
Always 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")
* Which artifact contains the tasks (typically "tasks" for spec-driven, check status for others)
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
这将返回:
* 上下文文件路径(因模式而异 - 可能是 proposal/specs/design/tasks 或 spec/tests/implementation/docs)
* 进度(总计、完成、剩余)
* 任务列表及其状态
* 基于当前状态的动态说明
处理状态:
* 如果 `state: "blocked"`(缺少工件):显示消息,建议使用 openspec-continue-change
* 如果 `state: "all_done"`:表示祝贺,建议归档
* 否则:继续执行实现
4. 读取上下文文件
从应用说明输出中读取 contextFiles 列出的文件。文件取决于所使用的模式:
* **spec-driven** : proposal, specs, design, tasks
* 其他模式:遵循 CLI 输出中的 contextFiles
5. 显示当前进度
显示:
* 正在使用的模式
* 进度:"N/M 个任务已完成"
* 剩余任务概览
* 来自 CLI 的动态说明
6. 实现任务(循环直到完成或阻塞)
对于每个待处理任务:
* 显示正在处理哪个任务
* 进行所需的代码更改
* 保持更改最小化且专注于任务
* 在任务文件中标记任务完成:`- [ ]` → `- [x]`
* 继续下一个任务
在以下情况下暂停:
* 任务不明确 → 请求澄清
* 实现过程中发现设计问题 → 建议更新工件
* 遇到错误或阻塞 → 报告并等待指导
* 用户中断
7. 在完成或暂停时,显示状态
显示:
* 本次会话完成的任务
* 总体进度:"N/M 个任务已完成"
* 如果全部完成:建议归档
* 如果暂停:解释原因并等待指导
实现期间的输出
## 正在实现: <变更名称> (模式: <模式名称>)
正在处理任务 3/7: <任务描述>
[...正在实现...]
✓ 任务完成
正在处理任务 4/7: <任务描述>
[...正在实现...]
✓ 任务完成
完成时的输出
## 实现完成
**变更:** <变更名称>
**模式:** <模式名称>
**进度:** 7/7 个任务完成 ✓
### 本次会话完成
- [x] 任务 1
- [x] 任务 2
...
所有任务完成!准备归档此变更。
暂停时的输出(遇到问题)
## 实现已暂停
**变更:** <变更名称>
**模式:** <模式名称>
**进度:** 4/7 个任务完成
### 遇到的问题
<问题描述>
**选项:**
1. <选项 1>
2. <选项 2>
3. 其他方法
你想怎么做?
防护措施
流畅的工作流集成
此技能支持"对变更执行操作"模型:
每周安装次数
1
仓库
首次出现
1 天前
安全审计
安装于
zencoder1
amp1
cline1
openclaw1
opencode1
cursor1
3. Get apply instructions
openspec instructions apply --change "<name>" --json
This returns:
* Context file paths (varies by schema - could be proposal/specs/design/tasks or spec/tests/implementation/docs)
* Progress (total, complete, remaining)
* Task list with status
* Dynamic instruction based on current state
Handle states:
* If `state: "blocked"` (missing artifacts): show message, suggest using openspec-continue-change
* If `state: "all_done"`: congratulate, suggest archive
* Otherwise: proceed to implementation
4. Read context files
Read the files listed in contextFiles from the apply instructions output. The files depend on the schema being used:
* **spec-driven** : proposal, specs, design, tasks
* Other schemas: follow the contextFiles from CLI output
5. Show current progress
Display:
* Schema being used
* Progress: "N/M tasks complete"
* Remaining tasks overview
* Dynamic instruction from CLI
6. Implement tasks (loop until done or blocked)
For each pending task:
* Show which task is being worked on
* Make the code changes required
* Keep changes minimal and focused
* Mark task complete in the tasks file: `- [ ]` → `- [x]`
* Continue to next task
Pause if:
* Task is unclear → ask for clarification
* Implementation reveals a design issue → suggest updating artifacts
* Error or blocker encountered → report and wait for guidance
* User interrupts
7. On completion or pause, show status
Display:
* Tasks completed this session
* Overall progress: "N/M tasks complete"
* If all done: suggest archive
* If paused: explain why and wait for guidance
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:
Weekly Installs
1
Repository
First Seen
1 day ago
Security Audits
Installed on
zencoder1
amp1
cline1
openclaw1
opencode1
cursor1
agent-browser 浏览器自动化工具 - Vercel Labs 命令行网页操作与测试
150,000 周安装
前端动画设计指南:提升用户体验的微交互与动效策略
38,600 周安装
跨平台设计适配指南:移动端、桌面端、平板、打印及邮件适配策略与实施方法
38,800 周安装
前端打磨(Polish)终极指南:提升产品细节与用户体验的系统化检查清单
39,900 周安装
Web应用测试指南:使用Python Playwright自动化测试本地Web应用
39,500 周安装
Azure Cloud Migrate:AWS Lambda到Azure Functions迁移工具 - 微软官方评估与代码迁移
38,700 周安装
Excel财务建模规范与xlsx文件处理指南:专业格式、零错误公式与数据分析
42,900 周安装