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.
Add this skill
npx mdskills install anthropics/doc-coauthoringComprehensive structured workflow with clear stage-by-stage instructions and smart integration handling
1---2name: doc-coauthoring3description: 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.4---56# Doc Co-Authoring Workflow78This 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.910## When to Offer This Workflow1112**Trigger conditions:**13- User mentions writing documentation: "write a doc", "draft a proposal", "create a spec", "write up"14- User mentions specific doc types: "PRD", "design doc", "decision doc", "RFC"15- User seems to be starting a substantial writing task1617**Initial offer:**18Offer the user a structured workflow for co-authoring the document. Explain the three stages:19201. **Context Gathering**: User provides all relevant context while Claude asks clarifying questions212. **Refinement & Structure**: Iteratively build each section through brainstorming and editing223. **Reader Testing**: Test the doc with a fresh Claude (no context) to catch blind spots before others read it2324Explain 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.2526If user declines, work freeform. If user accepts, proceed to Stage 1.2728## Stage 1: Context Gathering2930**Goal:** Close the gap between what the user knows and what Claude knows, enabling smart guidance later.3132### Initial Questions3334Start by asking the user for meta-context about the document:35361. What type of document is this? (e.g., technical spec, decision doc, proposal)372. Who's the primary audience?383. What's the desired impact when someone reads this?394. Is there a template or specific format to follow?405. Any other constraints or context to know?4142Inform them they can answer in shorthand or dump information however works best for them.4344**If user provides a template or mentions a doc type:**45- Ask if they have a template document to share46- If they provide a link to a shared document, use the appropriate integration to fetch it47- If they provide a file, read it4849**If user mentions editing an existing shared document:**50- Use the appropriate integration to read the current state51- Check for images without alt-text52- 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.5354### Info Dumping5556Once initial questions are answered, encourage the user to dump all the context they have. Request information such as:57- Background on the project/problem58- Related team discussions or shared documents59- Why alternative solutions aren't being used60- Organizational context (team dynamics, past incidents, politics)61- Timeline pressures or constraints62- Technical architecture or dependencies63- Stakeholder concerns6465Advise them not to worry about organizing it - just get it all out. Offer multiple ways to provide context:66- Info dump stream-of-consciousness67- Point to team channels or threads to read68- Link to shared documents6970**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.7172**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.7374Inform them clarifying questions will be asked once they've done their initial dump.7576**During context gathering:**7778- If user mentions team channels or shared documents:79 - If integrations available: Inform them the content will be read now, then use the appropriate integration80 - If integrations not available: Explain lack of access. Suggest they enable connectors in Claude settings, or paste the relevant content directly.8182- If user mentions entities/projects that are unknown:83 - Ask if connected tools should be searched to learn more84 - Wait for user confirmation before searching8586- As user provides context, track what's being learned and what's still unclear8788**Asking clarifying questions:**8990When user signals they've done their initial dump (or after substantial context provided), ask clarifying questions to ensure understanding:9192Generate 5-10 numbered questions based on gaps in the context.9394Inform 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.9596**Exit condition:**97Sufficient context has been gathered when questions show understanding - when edge cases and trade-offs can be asked about without needing basics explained.9899**Transition:**100Ask 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.101102If user wants to add more, let them. When ready, proceed to Stage 2.103104## Stage 2: Refinement & Structure105106**Goal:** Build the document section by section through brainstorming, curation, and iterative refinement.107108**Instructions to user:**109Explain that the document will be built section by section. For each section:1101. Clarifying questions will be asked about what to include1112. 5-20 options will be brainstormed1123. User will indicate what to keep/remove/combine1134. The section will be drafted1145. It will be refined through surgical edits115116Start with whichever section has the most unknowns (usually the core decision/proposal), then work through the rest.117118**Section ordering:**119120If the document structure is clear:121Ask which section they'd like to start with.122123Suggest 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.124125If user doesn't know what sections they need:126Based on the type of document and template, suggest 3-5 sections appropriate for the doc type.127128Ask if this structure works, or if they want to adjust it.129130**Once structure is agreed:**131132Create the initial document structure with placeholder text for all sections.133134**If access to artifacts is available:**135Use `create_file` to create an artifact. This gives both Claude and the user a scaffold to work from.136137Inform them that the initial structure with placeholders for all sections will be created.138139Create artifact with all section headers and brief placeholder text like "[To be written]" or "[Content here]".140141Provide the scaffold link and indicate it's time to fill in each section.142143**If no access to artifacts:**144Create a markdown file in the working directory. Name it appropriately (e.g., `decision-doc.md`, `technical-spec.md`).145146Inform them that the initial structure with placeholders for all sections will be created.147148Create file with all section headers and placeholder text.149150Confirm the filename has been created and indicate it's time to fill in each section.151152**For each section:**153154### Step 1: Clarifying Questions155156Announce work will begin on the [SECTION NAME] section. Ask 5-10 clarifying questions about what should be included:157158Generate 5-10 specific questions based on context and section purpose.159160Inform them they can answer in shorthand or just indicate what's important to cover.161162### Step 2: Brainstorming163164For the [SECTION NAME] section, brainstorm [5-20] things that might be included, depending on the section's complexity. Look for:165- Context shared that might have been forgotten166- Angles or considerations not yet mentioned167168Generate 5-20 numbered options based on section complexity. At the end, offer to brainstorm more if they want additional options.169170### Step 3: Curation171172Ask which points should be kept, removed, or combined. Request brief justifications to help learn priorities for the next sections.173174Provide examples:175- "Keep 1,4,7,9"176- "Remove 3 (duplicates 1)"177- "Remove 6 (audience already knows this)"178- "Combine 11 and 12"179180**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.181182### Step 4: Gap Check183184Based on what they've selected, ask if there's anything important missing for the [SECTION NAME] section.185186### Step 5: Drafting187188Use `str_replace` to replace the placeholder text for this section with the actual drafted content.189190Announce the [SECTION NAME] section will be drafted now based on what they've selected.191192**If using artifacts:**193After drafting, provide a link to the artifact.194195Ask them to read through it and indicate what to change. Note that being specific helps learning for the next sections.196197**If using a file (no artifacts):**198After drafting, confirm completion.199200Inform 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.201202**Key instruction for user (include when drafting the first section):**203Provide 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".204205### Step 6: Iterative Refinement206207As user provides feedback:208- Use `str_replace` to make edits (never reprint the whole doc)209- **If using artifacts:** Provide link to artifact after each edit210- **If using files:** Just confirm edits are complete211- 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)212213**Continue iterating** until user is satisfied with the section.214215### Quality Checking216217After 3 consecutive iterations with no substantial changes, ask if anything can be removed without losing important information.218219When section is done, confirm [SECTION NAME] is complete. Ask if ready to move to the next section.220221**Repeat for all sections.**222223### Near Completion224225As approaching completion (80%+ of sections done), announce intention to re-read the entire document and check for:226- Flow and consistency across sections227- Redundancy or contradictions228- Anything that feels like "slop" or generic filler229- Whether every sentence carries weight230231Read entire document and provide feedback.232233**When all sections are drafted and refined:**234Announce all sections are drafted. Indicate intention to review the complete document one more time.235236Review for overall coherence, flow, completeness.237238Provide any final suggestions.239240Ask if ready to move to Reader Testing, or if they want to refine anything else.241242## Stage 3: Reader Testing243244**Goal:** Test the document with a fresh Claude (no context bleed) to verify it works for readers.245246**Instructions to user:**247Explain 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.248249### Testing Approach250251**If access to sub-agents is available (e.g., in Claude Code):**252253Perform the testing directly without user involvement.254255### Step 1: Predict Reader Questions256257Announce intention to predict what questions readers might ask when trying to discover this document.258259Generate 5-10 questions that readers would realistically ask.260261### Step 2: Test with Sub-Agent262263Announce that these questions will be tested with a fresh Claude instance (no context from this conversation).264265For each question, invoke a sub-agent with just the document content and the question.266267Summarize what Reader Claude got right/wrong for each question.268269### Step 3: Run Additional Checks270271Announce additional checks will be performed.272273Invoke sub-agent to check for ambiguity, false assumptions, contradictions.274275Summarize any issues found.276277### Step 4: Report and Fix278279If issues found:280Report that Reader Claude struggled with specific issues.281282List the specific issues.283284Indicate intention to fix these gaps.285286Loop back to refinement for problematic sections.287288---289290**If no access to sub-agents (e.g., claude.ai web interface):**291292The user will need to do the testing manually.293294### Step 1: Predict Reader Questions295296Ask what questions people might ask when trying to discover this document. What would they type into Claude.ai?297298Generate 5-10 questions that readers would realistically ask.299300### Step 2: Setup Testing301302Provide testing instructions:3031. Open a fresh Claude conversation: https://claude.ai3042. Paste or share the document content (if using a shared doc platform with connectors enabled, provide the link)3053. Ask Reader Claude the generated questions306307For each question, instruct Reader Claude to provide:308- The answer309- Whether anything was ambiguous or unclear310- What knowledge/context the doc assumes is already known311312Check if Reader Claude gives correct answers or misinterprets anything.313314### Step 3: Additional Checks315316Also ask Reader Claude:317- "What in this doc might be ambiguous or unclear to readers?"318- "What knowledge or context does this doc assume readers already have?"319- "Are there any internal contradictions or inconsistencies?"320321### Step 4: Iterate Based on Results322323Ask what Reader Claude got wrong or struggled with. Indicate intention to fix those gaps.324325Loop back to refinement for any problematic sections.326327---328329### Exit Condition (Both Approaches)330331When Reader Claude consistently answers questions correctly and doesn't surface new gaps or ambiguities, the doc is ready.332333## Final Review334335When Reader Testing passes:336Announce the doc has passed Reader Claude testing. Before completion:3373381. Recommend they do a final read-through themselves - they own this document and are responsible for its quality3392. Suggest double-checking any facts, links, or technical details3403. Ask them to verify it achieves the impact they wanted341342Ask if they want one more review, or if the work is done.343344**If user wants final review, provide it. Otherwise:**345Announce document completion. Provide a few final tips:346- Consider linking this conversation in an appendix so readers can see how the doc was developed347- Use appendices to provide depth without bloating the main doc348- Update the doc as feedback is received from real readers349350## Tips for Effective Guidance351352**Tone:**353- Be direct and procedural354- Explain rationale briefly when it affects user behavior355- Don't try to "sell" the approach - just execute it356357**Handling Deviations:**358- If user wants to skip a stage: Ask if they want to skip this and write freeform359- If user seems frustrated: Acknowledge this is taking longer than expected. Suggest ways to move faster360- Always give user agency to adjust the process361362**Context Management:**363- Throughout, if context is missing on something mentioned, proactively ask364- Don't let gaps accumulate - address them as they come up365366**Artifact Management:**367- Use `create_file` for drafting full sections368- Use `str_replace` for all edits369- Provide artifact link after every change370- Never use artifacts for brainstorming lists - that's just conversation371372**Quality over Speed:**373- Don't rush through stages374- Each iteration should make meaningful improvements375- The goal is a document that actually works for readers376
Full transparency — inspect the skill content before installing.