skill-optimization-guide
- Repo stars 175
- Author updated Live
- Author repo openyida
- Domain
- Other
- Compatible agents
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- Trust score
- 88 / 100 · community maintained
- Author / version / license
- @openyida · no license declared
- Token usage
- Lean
- Setup complexity
- Plug-and-play
- External API key
- Not required
- Operating systems
- Unspecified (assume cross-platform)
- Runtime requirements
- No special requirements
- Permissions
-
- Read-only
- Write / modify
- Network behavior
- Local-only
- Install commands
- 26 variants
Profile is derived at build time from SKILL.md and install vectors. Subject to drift from author intent.
Heads up: 未限定 allowed-tools,默认拥有全部工具权限。
---
name: skill-optimization-guide
description: 对技能包的 SKILL.md 进行结构优化,使其符合"导航枢纽"定位:精简、自包含、零冗余。 | 维度 | 目标 | 衡量标准 | |------|------|---------| | 精简…
category: other
runtime: no special runtime
---
# skill-optimization-guide output preview
## PART A: Task fit
- Use case: 对技能包的 SKILL.md 进行结构优化,使其符合"导航枢纽"定位:精简、自包含、零冗余。 | 维度 | 目标 | 衡量标准 | |------|------|---------| | 精简度 | SKILL.md ≤ 200 行 | 大模型单次读取不超载 | | 自包含 | 入口文件回答"怎么做"和"什么规则" | 不需跳转即可开始开发 | runs entirely locally. Works with Claude Code, Cursor, Cline and 23 more..
- Inputs: target material, constraints, expected output, and acceptance criteria.
- Evidence boundary: follow “触发条件 / 严格边界 / 优化目标” and do not present inference as author intent.
## PART B: Execution result
- **01** The card summarizes the use case; runtime output centers on “对技能包的 SKILL.md 进行结构优化,使其符合"导航枢纽"定位:精简、自包含、零冗余。 | 维度 | 目标 | 衡量标准 | |------|------|---------| | 精简度 | SKILL.md ≤ 200 行 | 大模型单次读取不超载 | | 自包含 | 入口文件回答"怎么做"和"什么规则" | 不需跳转即可开始开发 | runs entirely locally. Works with Claude Code, Cursor, Cline and 23 more.”.
- **02** When the source has headings, the agent prioritizes “触发条件 / 严格边界 / 优化目标” so the result follows the author’s structure.
- **03** Typical output includes task judgment, concrete steps, required commands or file edits, validation, and follow-up options.
- **04** Risk context follows the fingerprint: read files, write/modify files; mostly runs locally; usually needs no extra API key.
## Running Rules
- read files, write/modify files; mostly runs locally; usually needs no extra API key.
- Validate with a small sample before expanding scope.
- Return the result, validation criteria, and next iteration options. The source does not require a stable slash command. After installation, invoke the skill by name and describe the task.
Name target files or source material, expected output, forbidden changes, and whether network or shell access is allowed. Permission fingerprint: read files, write/modify files.
Start with a small task and check whether the result follows “触发条件 / 严格边界 / 优化目标”. Inspect diffs, logs, previews, or tests before expanding scope.
Confirm the final output includes a concrete result, evidence, and next action. If it stays generic, tighten inputs, boundaries, and acceptance criteria.
---
name: skill-optimization-guide
description: 对技能包的 SKILL.md 进行结构优化,使其符合"导航枢纽"定位:精简、自包含、零冗余。 | 维度 | 目标 | 衡量标准 | |------|------|---------| | 精简…
category: other
source: openyida/openyida
---
# skill-optimization-guide
## When to use
- 对技能包的 SKILL.md 进行结构优化,使其符合"导航枢纽"定位:精简、自包含、零冗余。 | 维度 | 目标 | 衡量标准 | |------|------|---------| | 精简度 | SKILL.md ≤ 200 行 |…
- Use it when the task has clear inputs, repeatable steps, and validation criteria.
## What to provide
- Target material, scope, expected result, and forbidden changes.
- Whether network, commands, file writes, or external services are allowed.
## Execution rules
- Organize steps around “触发条件 / 严格边界 / 优化目标” and keep inference separate from source facts.
- read files, write/modify files; mostly runs locally; usually needs no extra API key.
- Validate with a small sample before expanding the task.
## Output requirements
- Return the deliverable, key evidence, validation method, and next action.
- Mark missing information as unknown; do not invent commands, platforms, or dependencies. The author source anchors workflow facts; repository files anchor sources and commands; Fluxly only adds fit, limitations, and quality judgment.
skill "skill-optimization-guide" {
input -> user goal + target files + boundaries + acceptance criteria
context -> 触发条件 / 严格边界 / 优化目标
rules -> SKILL.md triggers / order / output contract
runtime -> no special runtime | read files, write/modify files | mostly runs locally
guardrails -> usually needs no extra API key + small-sample validation + diff/log review
output -> copyable result + checklist + next iteration
} 技能文档优化指南
对技能包的 SKILL.md 进行结构优化,使其符合"导航枢纽"定位:精简、自包含、零冗余。
触发条件
- 用户要求优化某个技能包的文档结构、精简行数
- SKILL.md 超过 200 行,需要瘦身
- 多个章节存在重复内容,需要合并或抽取
- 完整代码块需要迁移到 references 或 samples
- 用户提到"技能优化"、"SKILL 瘦身"、"文档精简"
不适用场景(不要触发):
- 技能包的功能开发或 bug 修复 → 直接编辑对应文件
- 静态诊断评分 →
skill-static-diagnosis - 运行时测试、接口联调 → 不在本技能范围
严格边界
- 本技能只修改文档结构,不修改技能的业务逻辑
- 抽取内容到 references 时,必须同步在 SKILL.md 中添加引用链接
- 不得删除信息,只能迁移——SKILL.md 删除的内容必须在 references 中保留
- 修改前必须先读取目标文件确认内容,避免破坏已有结构
优化目标
| 维度 | 目标 | 衡量标准 |
|---|---|---|
| 精简度 | SKILL.md ≤ 200 行 | 大模型单次读取不超载 |
| 自包含 | 入口文件回答"怎么做"和"什么规则" | 不需跳转即可开始开发 |
| 零冗余 | 同一信息只在一个地方详细展开 | 任意两文件重叠率 ≤ 15% |
| 可验证 | 规则数、规则内容、代码示例三者对齐 | 模拟阅读零矛盾 |
执行步骤
Step 1:现状评估
- 统计目标 SKILL.md 行数(
wc -l) - 识别重复章节——以下模式是合并信号:
- "核心约束" + "严格禁止" + "严格要求" + "编码注意事项" → 合并为"核心规则"
- 同一规则在多个章节出现 → 只保留一处
- 检查与 references 的内容重叠:
- SKILL.md 有完整代码示例 → 移到 references 或 samples
- SKILL.md 有详细规范解释 → 移到 references,SKILL.md 只留摘要+引用
Step 2:执行优化
按优先级处理:
- 删除完整代码块:替换为
openyida sample命令引用或 references 链接 - 合并重复章节:多个约束/规则章节合并为统一的"核心规则"
- 抽取详细内容:JSON Schema、Prompt 模板、字段类型表等 →
references/*.md - 补全引用链接:每处抽取都必须在原位添加
> 📖 详见 [references/xxx.md]引用
Step 3:验证
- 确认行数 ≤ 200
- 确认所有 references 链接路径正确
- 确认无信息丢失(抽取的内容在 references 中完整保留)
异常处理
| 异常场景 | 处理方式 |
|---|---|
| SKILL.md 已经 ≤ 200 行 | 告知用户无需优化,或仅做结构微调 |
| 无法判断哪些内容应抽取 | 优先抽取完整代码块和 JSON 示例,保留流程步骤和规则摘要 |
| references 目录不存在 | 先创建 references/ 目录再写入文件 |
| 抽取后 SKILL.md 仍超 200 行 | 进一步合并重复章节,或将使用示例也抽取到 references/examples.md |
SKILL.md 的导航枢纽原则
SKILL.md 是导航枢纽,不是内容倾倒场:
| 内容类型 | SKILL.md 中保留 | 详细内容放在 |
|---|---|---|
| 规则 | 名称 + 一句话描述 | references/*.md |
| 代码 | openyida sample 命令 |
samples/*.js |
| API | 速查表(方法名+说明+必填参数) | yida-api.md |
| 流程 | 完整保留(bash 步骤) | — |
| JSON Schema | 引用链接 | references/*.md |
| Prompt 模板 | 引用链接 | references/*.md |
完成检查清单
- SKILL.md ≤ 200 行
- SKILL.md 无完整代码块(只有 bash 命令和速查表)
- 所有抽取内容在 references 中完整保留
- 所有引用链接路径正确可达
- 参考文档导航表完整(含跨 skill 共享文档)
参考文档
| 文档 | 覆盖范围 | 何时阅读 |
|---|---|---|
| 优化方法论 | 三层职责模型、规则分级标准、代码去重规范、验证方法、反模式案例 | 首次执行优化前必读 |
Decide Fit First
Design Intent
How To Use It
Boundaries And Review