Skip to content

docs: slim SKILL.md via progressive disclosure#10

Open
LearnPrompt wants to merge 1 commit into
mainfrom
chore/skill-md-diet
Open

docs: slim SKILL.md via progressive disclosure#10
LearnPrompt wants to merge 1 commit into
mainfrom
chore/skill-md-diet

Conversation

@LearnPrompt

Copy link
Copy Markdown
Owner

为什么

SKILL.md 的 frontmatter description 有 1219 字符,超过 Agent Skills 规范的 1024 字符上限,且 description 是每个会话都注入上下文的部分。正文 259 行中约 40% 是可按需加载的参考资料(CLI 示例、索引、历史指引)。

改了什么

  • description 1219 → 674 字符:只留定位 + 触发时机 + 何时不用;渲染器验证清单、实现细节移出
  • requires-skills 压成单行:验证日期、showcase 路径等证据移入 references/renderer-verification.md
  • Local demo(68 行 5 个 bash 块)→ docs/local-demo.md
  • Operational references 30 条 → 8 条运行时常用,完整注释版索引并入 docs/index.md
  • Renderer-specific guidance(规则 14–17,自标 kept for history)→ references/renderer-guidance.md
  • SKILL.md 259 → 161 行(触发时约 4.3k → 2.6k tokens)
  • test_skill_frontmatter_is_valid_yaml 改为断言 1024 字符上限 + 触发词("presentation checkup"、"演讲体检"),把规范约束固化为回归测试
  • docs/v0.9.x-backlog.md:三个任务标注已完成(经 v1.0.0/v1.1.0 落地),修正从未建过的 feat/v0.9-next 分支引用

核心指令(Positioning、AST theory、output contract、OPC workflow、invariants、working rules)原样保留,无行为变更。

验证

  • 122 tests 全绿(python3 -m pytest -q
  • python3 scripts/smoke_check.py 通过
  • SKILL.md 与 docs/index.md 中所有相对路径引用逐一确认存在
  • 新 description 实测 674 字符,YAML 解析正常

🤖 Generated with Claude Code

- frontmatter description 1219 → 674 chars (Agent Skills spec caps it
  at 1024); requires-skills entries reduced to one-liners, verification
  evidence moved to references/renderer-verification.md
- Local demo CLI examples moved to docs/local-demo.md
- Operational references shrunk to the runtime-critical shortlist;
  full annotated index merged into docs/index.md
- renderer-specific guidance (rules 14-17) moved to
  references/renderer-guidance.md
- SKILL.md 259 → 161 lines (~4.3k → ~2.6k tokens on trigger)
- test_skill_frontmatter_is_valid_yaml now pins the 1024-char cap and
  the checkup trigger phrases instead of the old description text
- docs/v0.9.x-backlog.md: mark all three tasks shipped (v1.0.0/v1.1.0),
  correct the never-created feat/v0.9-next branch reference

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant