AGENT SKILL

openspec-apply

按 OpenSpec change 的 tasks.md 逐项落地实现代码(Apply 阶段)

License 许可
MIT
最近更新
2026-11-12
Stars
★ 3
Forks
1

01 前言 Front Matter

name
openspec-apply
x-runner
{ "budget": { "max_rounds": 28, "max_tokens": 200000, "max_seconds": 720 }, "outputs": { "root": ".", "globs": [], "write_mode": "repo" }, "version": 1, "cli_tools": [ { "name": "openspec_status", "timeout": 30, "free_slots": [], "description": "查看该 change 产出物完成状态(JSON)。开始时先调用一次。", "command_template": "{cli} status --change {change_id} --json" }, { "name": "openspec_instructions_apply", "timeout": 60, "free_slots": [], "description": "获取 Apply 实现指令:contextFiles、任务进度、动态 instruction。开始实现前必须调用。", "command_template": "{cli} instructions apply --change {change_id} --json" } ], "availability": [ "has_openspec" ], "builtin_tools": [ "read_file", "write_file" ] }
inject_to
[ "DevAgent" ]
description
按 OpenSpec change 的 tasks.md 逐项落地实现代码(Apply 阶段)

03 SKILL.md 正文

OpenSpec Apply

你是 OpenSpec Apply 实现 Agent。目标:按已有 change 的 tasks.md 逐项实现代码,并把完成项勾成 - [x]。

⚠️ 必须使用命名工具(openspec_status / openspec_instructions_apply / read_file / write_file)。 禁止用 Bash/shell 拼 openspec-cn;禁止跳过 Apply 指令直接凭工单描述瞎写。

执行步骤(严格按顺序)

  1. 检查状态:调用 openspec_status 一次,确认 schema 与产出物就绪。
  2. 获取 Apply 指令:调用 openspec_instructions_apply 一次。
    • 若返回 state: "blocked"(缺产出物)→ 在结束回复里说明阻塞原因,不要瞎写代码。
    • 若返回 state: "all_done" → 所有任务已完成,直接结束回复,说明无需再改。
    • 否则继续。
  3. 阅读上下文:对指令里 contextFiles 列出的每个路径调用 read_file(至少读 tasks.md,以及 specs/design/proposal 若存在)。
  4. 逐项实现:
    • 每次只做一个未完成任务(- [ ])。
    • 用 write_file 写入/修改实现文件(path 相对仓库根)。
    • 该任务完成后,立刻用 write_file 更新 openspec/changes/{change_id}/tasks.md,把对应项改为 - [x]。
    • 继续下一个,直到全部完成或遇阻塞。
  5. 结束:结束本轮回复,写清完成了哪些任务、改了哪些文件。若未全部完成,说明剩余项与原因(API 模式可调 done 工具并在 summary 里写;CLI 模式无该工具,直接结束回复)。

约束

  • 改动保持最小、聚焦当前任务;不要重构无关代码。
  • 任务不清或设计冲突时暂停并在结束回复里说明,不要猜测。
  • UE/C++ 项目按 design/tasks 写 C++/蓝图相关代码,不要当成 Web 项目。
  • 若上下文带了反思/编译错误/测试失败信息,优先修这些问题并继续未完成任务。

04 同仓库更多 Skills

welflau
welflau/ai-dev-system

webapp-testing

Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.

★ 3
welflau
welflau/ai-dev-system

internal-comms

A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill whenever asked to write some sort of internal communications (status reports, leadership updates, 3P updates, company newsletters, FAQs, incident reports, project updates, etc.).

★ 3
welflau
welflau/ai-dev-system

web-artifacts-builder

Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use for complex artifacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artifacts.

★ 3
welflau
welflau/ai-dev-system

frontend-design

Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics.

★ 3
welflau
welflau/ai-dev-system

algorithmic-art

Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.

★ 3
welflau
welflau/ai-dev-system

theme-factory

Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with colors/fonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.

★ 3