1
0
Files
Skill/openspec/changes/archive/2026-02-25-optimize-skills-structure/proposal.md
2026-02-25 17:36:42 +08:00

31 lines
1.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
## Why
当前 skills 的 SKILL.md 文件内容较长200-300 行未遵循渐进式披露Progressive Disclosure原则。根据 skill 编写指南应采用三层结构YAML 前置元数据(触发判断)→ SKILL.md 正文(核心指令)→ references/(详细文档)。这样可以减少 token 消耗,提高 Claude 的响应效率。
## What Changes
- **结构优化**:为每个 skill 创建 `references/` 目录,将详细文档、示例、错误处理等内容从 SKILL.md 正文移至 references/
- **SKILL.md 精简**:保留核心工作流程和关键指令,将详细说明改为链接到 references/ 中的文档
- **Description 优化**:确保 description 同时包含「做什么」和「何时使用」两部分,便于 Claude 判断是否加载
- **lyxy-runner-python/js 保持宽泛**:这两个 runner skill 的 description 需要保持宽泛,以便匹配所有 Python/JS 处理任务
## Capabilities
### New Capabilities
- `skill-progressive-disclosure`: 定义 skill 渐进式披露的三层结构规范,包括 YAML 前置元数据、SKILL.md 正文、references/ 目录的职责划分和内容组织方式
### Modified Capabilities
(无现有 spec 需要修改)
## Impact
- **文件结构变更**:每个 skill 目录新增 `references/` 子目录
- **SKILL.md 重构**4 个 skills 的 SKILL.md 文件需要精简,详细内容迁移到 references/
- `skills/lyxy-runner-python/SKILL.md`
- `skills/lyxy-runner-js/SKILL.md`
- `skills/lyxy-reader-office/SKILL.md`
- `skills/lyxy-kb/SKILL.md`
- **向后兼容**:功能不变,仅优化文档结构,**无破坏性变更**