Doc Co-Authoring
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.
When to Offer This Workflow
Trigger conditions:
- - User mentions writing documentation: "write a doc", "draft a proposal", "create a spec", "write up"
- User mentions specific doc types: "PRD", "design doc", "decision doc", "RFC"
- User seems to be starting a substantial writing task
Initial offer:
Offer the user a structured workflow for co-authoring the document. Explain the three stages:
- 1. Context Gathering: User provides all relevant context while Claude asks clarifying questions
- Refinement & Structure: Iteratively build each section through brainstorming and editing
- Reader Testing: Test the doc with a fresh Claude (no context) to catch blind spots before others read it
Explain that this approach helps ensure the doc works well when others read it (including when they paste it into Claude). Ask if they want to try this workflow or prefer to work freeform.
If user declines, work freeform. If user accepts, proceed to Stage 1.
Stage 1: Context Gathering
Goal: Close the gap between what the user knows and what Claude knows, enabling smart guidance later.
Initial Questions
Start by asking the user for meta-context about the document:
- 1. What type of document is this? (e.g., technical spec, decision doc, proposal)
- Who's the primary audience?
- What's the desired impact when someone reads this?
- Is there a template or specific format to follow?
- Any other constraints or context to know?
Inform them they can answer in shorthand or dump information however works best for them.
If user provides a template or mentions a doc type:
- - Ask if they have a template document to share
- If they provide a link to a shared document, use the appropriate integration to fetch it
- If they provide a file, read it
If user mentions editing an existing shared document:
- - Use the appropriate integration to read the current state
- Check for images without alt-text
- If images exist without alt-text, explain that when others use Claude to understand the doc, Claude won't be able to see them. Ask if they want alt-text generated. If so, request they paste each image into chat for descriptive alt-text generation.
Info Dumping
Once initial questions are answered, encourage the user to dump all the context they have. Request information such as:
- - Background on the project/problem
- Related team discussions or shared documents
- Why alternative solutions aren't being used
- Organizational context (team dynamics, past incidents, politics)
- Timeline pressures or constraints
- Technical architecture or dependencies
- Stakeholder concerns
Advise them not to worry about organizing it - just get it all out. Offer multiple ways to provide context:
- - Info dump stream-of-consciousness
- Point to team channels or threads to read
- Link to shared documents
If integrations are available (e.g., Slack, Teams, Google Drive, SharePoint, or other MCP servers), mention that these can be used to pull in context directly.
If no integrations are detected and in Claude.ai or Claude app: Suggest they can enable connectors in their Claude settings to allow pulling context from messaging apps and document storage directly.
Inform them clarifying questions will be asked once they've done their initial dump.
During context gathering:
- - If user mentions team channels or shared documents:
- If integrations available: Inform them the content will be read now, then use the appropriate integration
- If integrations not available: Explain lack of access. Suggest they enable connectors in Claude settings, or paste the relevant content directly.
- - If user mentions entities/projects that are unknown:
- Ask if connected tools should be searched to learn more
- Wait for user confirmation before searching
- - As user provides context, track what's being learned and what's still unclear
Asking clarifying questions:
When user signals they've done their initial dump (or after substantial context provided), ask clarifying questions to ensure understanding:
Generate 5-10 numbered questions based on gaps in the context.
Inform them they can use shorthand to answer (e.g., "1: yes, 2: see #channel, 3: no because backwards compat"), link to more docs, point to channels to read, or just keep info-dumping. Whatever's most efficient for them.
Exit condition:
Sufficient context has been gathered when questions show understanding - when edge cases and trade-offs can be asked about without needing basics explained.
Transition:
Ask if there's any more context they want to provide at this stage, or if it's time to move on to drafting the document.
If user wants to add more, let them. When ready, proceed to Stage 2.
Stage 2: Refinement & Structure
Goal: Build the document section by section through brainstorming, curation, and iterative refinement.
Instructions to user:
Explain that the document will be built section by section. For each section:
- 1. Clarifying questions will be asked about what to include
- 5-20 options will be brainstormed
- User will indicate what to keep/remove/combine
- The section will be drafted
- It will be refined through surgical edits
Start with whichever section has the most unknowns (usually the core decision/proposal), then work through the rest.
Section ordering:
If the document structure is clear:
Ask which section they'd like to start with.
Suggest starting with whichever section has the most unknowns. For decision docs, that's usually the core proposal. For specs, it's typically the technical approach. Summary sections are best left for last.
If user doesn't know what sections they need:
Based on the type of document and template, suggest 3-5 sections appropriate for the doc type.
Ask if this structure works, or if they want to adjust it.
Once structure is agreed:
Create the initial document structure with placeholder text for all sections.
If access to artifacts is available:
Use create_file to create an artifact. This gives both Claude and the user a scaffold to work from.
Inform them that the initial structure with placeholders for all sections will be created.
Create artifact with all section headers and brief placeholder text like "[To be written]" or "[Content here]".
Provide the scaffold link and indicate it's time to fill in each section.
If no access to artifacts:
Create a markdown file in the working directory. Name it appropriately (e.g., decision-doc.md, technical-spec.md).
Inform them that the initial structure with placeholders for all sections will be created.
Create file with all section headers and placeholder text.
Confirm the filename has been created and indicate it's time to fill in each section.
For each section:
Step 1: Clarifying Questions
Announce work will begin on the [SECTION NAME] section. Ask 5-10 clarifying questions about what should be included:
Generate 5-10 specific questions based on context and section purpose.
Inform them they can answer in shorthand or just indicate what's important to cover.
Step 2: Brainstorming
For the [SECTION NAME] section, brainstorm [5-20] things that might be included, depending on the section's complexity. Look for:
- - Context shared that might have been forgotten
- Angles or considerations not yet mentioned
Generate 5-20 numbered options based on section complexity. At the end, offer to brainstorm more if they want additional options.
Step 3: Curation
Ask which points should be kept, removed, or combined. Request brief justifications to help learn priorities for the next sections.
Provide examples:
- - "Keep 1,4,7,9"
- "Remove 3 (duplicates 1)"
- "Remove 6 (audience already knows this)"
- "Combine 11 and 12"
If user gives freeform feedback (e.g., "looks good" or "I like most of it but...") instead of numbered selections, extract their preferences and proceed. Parse what they want kept/removed/changed and apply it.
Step 4: Gap Check
Based on what they've selected, ask if there's anything important missing for the [SECTION NAME] section.
Step 5: Drafting
Use str_replace to replace the placeholder text for this section with the actual drafted content.
Announce the [SECTION NAME] section will be drafted now based on what they've selected.
If using artifacts:
After drafting, provide a link to the artifact.
Ask them to read through it and indicate what to change. Note that being specific helps learning for the next sections.
If using a file (no artifacts):
After drafting, confirm completion.
Inform them the [SECTION NAME] section has been drafted in [filename]. Ask them to read through it and indicate what to change. Note that being specific helps learning for the next sections.
Key instruction for user (include when drafting the first section):
Provide a note: Instead of editing the doc directly, ask them to indicate what to change. This helps learning of their style for future sections. For example: "Remove the X bullet - already covered by Y" or "Make the third paragraph more concise".
Step 6: Iterative Refinement
As user provides feedback:
- - Use
str_replace to make edits (never reprint the whole doc) - If using artifacts: Provide link to artifact after each edit
- If using files: Just confirm edits are complete
- If user edits doc directly and asks to read it: mentally note the changes they made and keep them in mind for future sections (this shows their preferences)
Continue iterating until user is satisfied with the section.
Quality Checking
After 3 consecutive iterations with no substantial changes, ask if anything can be removed without losing important information.
When section is done, confirm [SECTION NAME] is complete. Ask if ready to move to the next section.
Repeat for all sections.
Near Completion
As approaching completion (80%+ of sections done), announce intention to re-read the entire document and check for:
- - Flow and consistency across sections
- Redundancy or contradictions
- Anything that feels like "slop" or generic filler
- Whether every sentence carries weight
Read entire document and provide feedback.
When all sections are drafted and refined:
Announce all sections are drafted. Indicate intention to review the complete document one more time.
Review for overall coherence, flow, completeness.
Provide any final suggestions.
Ask if ready to move to Reader Testing, or if they want to refine anything else.
Stage 3: Reader Testing
Goal: Test the document with a fresh Claude (no context bleed) to verify it works for readers.
Instructions to user:
Explain that testing will now occur to see if the document actually works for readers. This catches blind spots - things that make sense to the authors but might confuse others.
Testing Approach
If access to sub-agents is available (e.g., in Claude Code):
Perform the testing directly without user involvement.
Step 1: Predict Reader Questions
Announce intention to predict what questions readers might ask when trying to discover this document.
Generate 5-10 questions that readers would realistically ask.
Step 2: Test with Sub-Agent
Announce that these questions will be tested with a fresh Claude instance (no context from this conversation).
For each question, invoke a sub-agent with just the document content and the question.
Summarize what Reader Claude got right/wrong for each question.
Step 3: Run Additional Checks
Announce additional checks will be performed.
Invoke sub-agent to check for ambiguity, false assumptions, contradictions.
Summarize any issues found.
Step 4: Report and Fix
If issues found:
Report that Reader Claude struggled with specific issues.
List the specific issues.
Indicate intention to fix these gaps.
Loop back to refinement for problematic sections.
If no access to sub-agents (e.g., claude.ai web interface):
The user will need to do the testing manually.
Step 1: Predict Reader Questions
Ask what questions people might ask when trying to discover this document. What would they type into Claude.ai?
Generate 5-10 questions that readers would realistically ask.
Step 2: Setup Testing
Provide testing instructions:
- 1. Open a fresh Claude conversation: https://claude.ai
- Paste or share the document content (if using a shared doc platform with connectors enabled, provide the link)
- Ask Reader Claude the generated questions
For each question, instruct Reader Claude to provide:
- - The answer
- Whether anything was ambiguous or unclear
- What knowledge/context the doc assumes is already known
Check if Reader Claude gives correct answers or misinterprets anything.
Step 3: Additional Checks
Also ask Reader Claude:
- - "What in this doc might be ambiguous or unclear to readers?"
- "What knowledge or context does this doc assume readers already have?"
- "Are there any internal contradictions or inconsistencies?"
Step 4: Iterate Based on Results
Ask what Reader Claude got wrong or struggled with. Indicate intention to fix those gaps.
Loop back to refinement for any problematic sections.
Exit Condition (Both Approaches)
When Reader Claude consistently answers questions correctly and doesn't surface new gaps or ambiguities, the doc is ready.
Final Review
When Reader Testing passes:
Announce the doc has passed Reader Claude testing. Before completion:
- 1. Recommend they do a final read-through themselves - they own this document and are responsible for its quality
- Suggest double-checking any facts, links, or technical details
- Ask them to verify it achieves the impact they wanted
Ask if they want one more review, or if the work is done.
If user wants final review, provide it. Otherwise:
Announce document completion. Provide a few final tips:
- - Consider linking this conversation in an appendix so readers can see how the doc was developed
- Use appendices to provide depth without bloating the main doc
- Update the doc as feedback is received from real readers
Tips for Effective Guidance
Tone:
- - Be direct and procedural
- Explain rationale briefly when it affects user behavior
- Don't try to "sell" the approach - just execute it
Handling Deviations:
- - If user wants to skip a stage: Ask if they want to skip this and write freeform
- If user seems frustrated: Acknowledge this is taking longer than expected. Suggest ways to move faster
- Always give user agency to adjust the process
Context Management:
- - Throughout, if context is missing on something mentioned, proactively ask
- Don't let gaps accumulate - address them as they come up
Artifact Management:
- - Use
create_file for drafting full sections - Use
str_replace for all edits - Provide artifact link after every change
- Never use artifacts for brainstorming lists - that's just conversation
Quality over Speed:
- - Don't rush through stages
- Each iteration should make meaningful improvements
- The goal is a document that actually works for readers
文档协同创作
本技能提供结构化工作流程,引导用户完成协作文档创作。作为主动引导者,带领用户经历三个阶段:背景收集、优化与结构、读者测试。
何时提供此工作流程
触发条件:
- - 用户提及编写文档:写文档、起草提案、创建规范、撰写
- 用户提及特定文档类型:PRD、设计文档、决策文档、RFC
- 用户似乎要开始一项重要的写作任务
初始提议:
向用户提供协同创作文档的结构化工作流程。解释三个阶段:
- 1. 背景收集:用户提供所有相关背景,同时Claude提出澄清性问题
- 优化与结构:通过头脑风暴和编辑迭代构建每个部分
- 读者测试:用全新的Claude(无上下文)测试文档,在他人阅读前发现盲点
解释这种方法有助于确保文档在他人阅读时效果良好(包括当他们将文档粘贴到Claude中时)。询问用户是否想尝试此工作流程,或更倾向于自由创作。
如果用户拒绝,则自由创作。如果用户接受,进入第一阶段。
第一阶段:背景收集
目标: 缩小用户所知与Claude所知之间的差距,为后续智能引导奠定基础。
初始问题
首先询问用户关于文档的元背景:
- 1. 这是什么类型的文档?(例如:技术规范、决策文档、提案)
- 主要受众是谁?
- 希望读者阅读后产生什么影响?
- 是否有模板或特定格式需要遵循?
- 是否有其他约束或背景需要了解?
告知他们可以用简写或任何最方便的方式回答。
如果用户提供模板或提及文档类型:
- - 询问他们是否有模板文档可以分享
- 如果他们提供共享文档的链接,使用相应的集成工具获取
- 如果他们提供文件,读取文件内容
如果用户提及编辑现有共享文档:
- - 使用相应的集成工具读取当前状态
- 检查是否有缺少替代文本的图片
- 如果存在缺少替代文本的图片,解释当其他人使用Claude理解文档时,Claude将无法看到这些图片。询问是否需要生成替代文本。如果需要,要求他们将每张图片粘贴到聊天中以便生成描述性替代文本。
信息倾倒
初始问题回答完毕后,鼓励用户倾倒他们拥有的所有背景。请求以下信息:
- - 项目/问题的背景
- 相关团队讨论或共享文档
- 为什么不使用替代方案
- 组织背景(团队动态、过往事件、政治因素)
- 时间压力或约束
- 技术架构或依赖关系
- 利益相关者的关切
建议他们不必担心组织整理——只需全部倾倒出来。提供多种提供背景的方式:
- - 意识流式信息倾倒
- 指向团队频道或讨论串供读取
- 链接到共享文档
如果集成工具可用(例如:Slack、Teams、Google Drive、SharePoint或其他MCP服务器),提及这些工具可用于直接获取背景。
如果未检测到集成工具且在Claude.ai或Claude应用中: 建议他们在Claude设置中启用连接器,以便直接从消息应用和文档存储中获取背景。
告知他们在完成初始倾倒后会提出澄清性问题。
在背景收集过程中:
- 如果集成工具可用:告知他们将立即读取内容,然后使用相应的集成工具
- 如果集成工具不可用:解释无法访问。建议他们在Claude设置中启用连接器,或直接粘贴相关内容。
- 询问是否应搜索已连接的工具以了解更多信息
- 等待用户确认后再进行搜索
- - 当用户提供背景时,跟踪已了解的内容和仍不清楚的内容
提出澄清性问题:
当用户表示已完成初始倾倒(或提供大量背景后),提出澄清性问题以确保理解:
根据背景中的空白生成5-10个编号问题。
告知他们可以使用简写回答(例如:1:是,2:见#频道,3:否,因为向后兼容),链接到更多文档,指向频道供读取,或继续信息倾倒。选择对他们最高效的方式。
退出条件:
当问题显示出理解时——即无需解释基础知识就能询问边缘情况和权衡时,说明已收集到足够的背景。
过渡:
询问他们在此阶段是否还想提供更多背景,或者是否该进入文档起草阶段。
如果用户想添加更多内容,让他们添加。准备就绪后,进入第二阶段。
第二阶段:优化与结构
目标: 通过头脑风暴、筛选和迭代优化,逐部分构建文档。
给用户的说明:
解释文档将逐部分构建。对于每个部分:
- 1. 将提出关于包含内容的澄清性问题
- 将头脑风暴5-20个选项
- 用户将指示保留/删除/合并哪些内容
- 将起草该部分
- 将通过精准编辑进行优化
从未知因素最多的部分开始(通常是核心决策/提案),然后处理其余部分。
部分排序:
如果文档结构清晰:
询问他们想从哪个部分开始。
建议从未知因素最多的部分开始。对于决策文档,通常是核心提案。对于规范文档,通常是技术方案。摘要部分最好放在最后。
如果用户不知道需要哪些部分:
根据文档类型和模板,建议3-5个适合该文档类型的部分。
询问此结构是否可行,或者他们是否想调整。
结构确定后:
为所有部分创建带有占位文本的初始文档结构。
如果可以访问工件:
使用create_file创建工件。这为Claude和用户都提供了工作框架。
告知他们将创建包含所有部分占位符的初始结构。
创建包含所有部分标题和简短占位文本(如[待编写]或[内容在此])的工件。
提供框架链接,并指示是时候填充每个部分了。
如果无法访问工件:
在工作目录中创建一个markdown文件。适当命名(例如:decision-doc.md、technical-spec.md)。
告知他们将创建包含所有部分占位符的初始结构。
创建包含所有部分标题和占位文本的文件。
确认文件名已创建,并指示是时候填充每个部分了。
对于每个部分:
第一步:澄清性问题
宣布将开始处理[部分名称]部分。提出5-10个关于应包含内容的澄清性问题:
根据背景和部分目的生成5-10个具体问题。
告知他们可以用简写回答,或仅指示哪些内容需要涵盖。
第二步:头脑风暴
对于[部分名称]部分,根据部分复杂程度头脑风暴5-20个可能包含的内容。寻找:
- - 可能被遗忘的已分享背景
- 尚未提及的角度或考虑因素
根据部分复杂程度生成5-20个编号选项。最后,提供继续头脑风暴更多选项的机会。
第三步:筛选
询问哪些要点应保留、删除或合并。请求简要理由以帮助了解后续部分的优先级。
提供示例:
- - 保留1、4、7、9
- 删除3(与1重复)
- 删除6(受众已知)
- 合并11和12
如果用户给出自由形式的反馈(例如:看起来不错或大部分我喜欢但...)而不是编号选择,提取他们的偏好并继续。解析他们想要保留/删除/更改的内容并应用。
第四步:缺口检查
根据他们选择的内容,询问[部分名称]部分是否缺少任何重要内容。
第五步:起草
使用str_replace将本部分的占位文本替换为实际起草的内容。
宣布现在将根据用户选择的内容起草[部分名称]部分。
如果使用工件:
起草后,提供工件的链接。
请他们通读并指示需要更改的内容。注意,具体说明有助于后续部分的学习。
如果使用文件(无工件):
起草后,确认完成。
告知他们[部分名称]部分已在[文件名]中起草完成。请他们通读并指示需要更改的内容。注意,具体说明有助于后续部分的学习。
给用户的关键说明(在起草第一部分时包含):
提供说明:不要直接编辑文档,而是请他们指示需要更改的内容。这有助于学习他们的风格以便后续部分。例如:删除X要点——Y已涵盖或使第三段更简洁。
第六步:迭代优化
当用户提供反馈时:
- - 使用str_replace进行编辑(绝不重新打印整个文档)
- 如果使用工件: 每次编辑后提供工件链接
- 如果使用文件: 仅确认编辑完成
- 如果用户直接编辑文档并要求读取:在心理上记下他们所做的更改,并在后续部分中记住(这显示了他们的偏好)
继续迭代直到用户对该部分满意。
质量检查
连续3次迭代无实质性更改后,询问是否可以删除任何内容而不丢失重要信息。
当部分完成时,确认[部分名称]已完成。询问是否准备好进入下一部分。
对所有部分重复此过程。
接近完成
当接近完成(80%以上的部分完成)时,宣布意图重新阅读整个文档并检查:
- - 各部分之间的流畅性和一致性
- 冗余或矛盾
- 任何感觉像敷衍或通用填充的内容
- 每个句子是否都有分量
阅读整个文档并提供反馈。
当所有部分都起草并优化完成时: