Install
mkdir -p .claude/skills/openspec-sync-specs && curl -L -o skill.zip "https://mcp.directory/api/skills/download/1786" && unzip -o skill.zip -d .claude/skills/openspec-sync-specs && rm skill.zipInstalls to .claude/skills/openspec-sync-specs
About this skill
将变更中的增量规范同步到主规范。
这是一个 Agent 驱动 的操作 - 你将读取增量规范并直接编辑主规范以应用更改。这允许智能合并(例如,添加场景而不复制整个需求)。
输入:可选指定变更名称。如果省略,检查是否可以从对话上下文中推断。如果模糊或不明确,你必须提示获取可用变更。
步骤
-
如果没有提供变更名称,提示选择
运行
openspec-cn list --json获取可用变更。使用 AskUserQuestion tool 让用户选择。显示具有增量规范(在
specs/目录下)的变更。重要提示:不要猜测或自动选择变更。始终让用户选择。
-
查找增量规范
在
openspec/changes/<name>/specs/*/spec.md中查找增量规范文件。每个增量规范文件包含如下部分:
## ADDED Requirements- 要添加的新需求## MODIFIED Requirements- 对现有需求的更改## REMOVED Requirements- 要移除的需求## RENAMED Requirements- 要重命名的需求(FROM:/TO: 格式)
如果没有找到增量规范,通知用户并停止。
-
对于每个增量规范,将更改应用到主规范
对于在
openspec/changes/<name>/specs/<capability>/spec.md处具有增量规范的每个 capability:a. 阅读增量规范 以了解预期的更改
b. 阅读主规范 于
openspec/specs/<capability>/spec.md(可能尚不存在)c. 智能地应用更改:
ADDED Requirements:
- 如果需求在主规范中不存在 → 添加它
- 如果需求已存在 → 更新它以匹配(视为隐式 MODIFIED)
MODIFIED Requirements:
- 在主规范中找到该需求
- 应用更改 - 这可能是:
- 添加新场景(不需要复制现有场景)
- 修改现有场景
- 更改需求描述
- 保留增量中未提及的场景/内容
REMOVED Requirements:
- 从主规范中移除整个需求块
RENAMED Requirements:
- 找到 FROM 需求,重命名为 TO
d. 创建新主规范 如果 capability 尚不存在:
- 创建
openspec/specs/<capability>/spec.md - 添加 Purpose 部分(可以简短,标记为 TBD)
- 添加 Requirements 部分以及 ADDED 需求
-
显示摘要
应用所有更改后,总结:
- 哪些 capability 已更新
- 做了什么更改(需求添加/修改/移除/重命名)
增量规范格式参考
## ADDED Requirements
### Requirement: New Feature
The system SHALL do something new.
#### Scenario: Basic case
- **WHEN** user does X
- **THEN** system does Y
## MODIFIED Requirements
### Requirement: Existing Feature
#### Scenario: New scenario to add
- **WHEN** user does A
- **THEN** system does B
## REMOVED Requirements
### Requirement: Deprecated Feature
## RENAMED Requirements
- FROM: `### Requirement: Old Name`
- TO: `### Requirement: New Name`
关键原则:智能合并
与程序化合并不同,你可以应用 部分更新:
- 要添加场景,只需将该场景包含在 MODIFIED 下 - 不要复制现有场景
- 增量代表 意图,而不是整体替换
- 使用你的判断力合理地合并更改
成功时的输出
## 规范已同步:<change-name>
已更新主规范:
**<capability-1>**:
- 添加需求:"New Feature"
- 修改需求:"Existing Feature"(添加了 1 个场景)
**<capability-2>**:
- 创建了新规范文件
- 添加需求:"Another Feature"
主规范现已更新。变更保持活动状态 - 在实现完成后归档。
护栏
- 在进行更改之前阅读增量规范和主规范
- 保留增量中未提及的现有内容
- 如果不清楚,询问澄清
- 在进行时显示你正在更改的内容
- 操作应该是幂等的 - 运行两次应给出相同的结果
More by studyzy
View all →You might also like
flutter-development
aj-geddes
Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.
drawio-diagrams-enhanced
jgtolentino
Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.
godot
bfollington
This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.
nano-banana-pro
garg-aayush
Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.
ui-ux-pro-max
nextlevelbuilder
"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."
rust-coding-skill
UtakataKyosui
Guides Claude in writing idiomatic, efficient, well-structured Rust code using proper data modeling, traits, impl organization, macros, and build-speed best practices.
Stay ahead of the MCP ecosystem
Get weekly updates on new skills and servers.