doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision docs, or similar structured content. This workflow helps users efficiently transfer context, refine content through iteration, and verify the doc works for readers. Trigger when user mentions writing docs, creating proposals, drafting specs, or similar documentation tasks.
1实现原理 · 为什么它能做到
宣称的「引导共创」不靠任何代码,而是纯 prompt 编排:模型以 active guide 角色按三段式交互协议(Context Gathering / Refinement & Structure / Reader Testing)驱动用户,能力完全由结构化对话指令实现
This skill provides a structured workflow for guiding users through collaborative document creation. Act as an active guide, walking users through three stages: Context Gathering, Refinement & Structure, and Reader Testing.
Stage 1 先把「用户脑内知识」搬进对话上下文:5 个元问题 + 鼓励自由倾倒 + 按缺口生成 5-10 条澄清问题,并用可判定的退出条件防止过早开写
**Goal:** Close the gap between what the user knows and what Claude knows, enabling smart guidance later.
Stage 2 把起草拆成每节固定 6 步(澄清→头脑风暴 5-20 项→编号策展→缺口检查→起草→迭代),用「数字编号取舍」协议把用户的含糊反馈变成可执行指令
Generate 5-20 numbered options based on section complexity. At the end, offer to brainstorm more if they want additional options.
起草与迭代全程走宿主编辑工具(create_file 建 artifact 骨架 / str_replace 做手术刀式编辑),刻意「never reprint the whole doc」,避免长文档逐次全量重写造成的漂移
- Use `str_replace` to make edits (never reprint the whole doc)
Stage 3 Reader Testing 是该 skill 最独特的机制:用「零上下文的新 Claude 子代理」模拟真实读者,验证文档脱离作者语境后仍自洽——把『读者视角』变成可自动执行的检查
**Goal:** Test the document with a fresh Claude (no context bleed) to verify it works for readers.
用户主权贯穿全程:开头可拒、中途可跳、随时可退回 freeform,流程只做引导不绑架,且有明确的『用户拥有文档』边界
If user declines, work freeform. If user accepts, proceed to Stage 1.
2核心能力
3外部依赖
| Kind | Dependency / Endpoint |
|---|---|
| api | create_file(宿主内建 artifact 工具,非外部 API) |
| api | str_replace(宿主内建编辑工具,非外部 API) |
| api | sub-agents(Claude Code 运行时能力,非外部 API;skill 未指定具体 task 工具名) |
| api | 集成连接器 Slack/Teams/Google Drive/SharePoint/MCP 服务器 —— 条件性:仅在『If integrations are available』时提及,由宿主提供、无绑定端点 |
| network | claude.ai —— 仅作为用户手动 Reader Testing 的文字入口(用户自行打开新会话,skill/agent 不发起网络调用) |
4管控建议与判定依据
- 本地工作目录: 文件读写与工件输出: 对共创文档执行 str_replace 编辑 —— SKILL.md L188/L208
5第二遍独立确认
- [ok] 目录内仅 SKILL.md、无脚本/引用/模板等资源 — git ls-files doc-coauthoring/ 只返回 doc-coauthoring/SKILL.md
- [ok] description 引用逐字一致 — L3 原文与 meta.official_desc 完全一致
- [ok] create_file / str_replace 调用点真实存在 — L135、L188、L208、L367-368 均实存,且 L367-368 收尾 Tips 再次强调同一工具对
- [ok] claude.ai 网络提及 — 全文件唯一 http(s) 命中为 L303;L72/L290 仅文字提及 Claude.ai 产品名,无调用语义
- [ok] Slack/Teams/Google Drive/SharePoint/MCP 集成语 — L70 实存且为条件式(If integrations are available),属宿主能力提示而非 skill 自带 API
- [ok] sub-agent Reader Testing 机制 — L251-253(无需用户参与的自动路径)、L265、L273 实存,L290 起手动路径对照完整
- [ok] 无凭证读取 — grep api key/token/secret/password/credential/env/export/keychain 全文件零命中
- [ok] 无脚本执行面 — grep bash/python/subprocess/curl/wget/exec( 全文件零命中;SKILL.md 内无代码块
6结论
930944490c8451b9…