chatbot-app/agentcore/skills/doc-coauthoring/SKILL.md
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.
npx skillsauth add aws-samples/sample-strands-agent-with-agentcore doc-coauthoringInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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.
Trigger conditions:
Initial offer: Offer the user a structured workflow for co-authoring the document. Explain the three stages:
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.
Goal: Close the gap between what the user knows and what you know, enabling smart guidance later.
Start by asking the user for meta-context about the document:
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:
If user mentions editing an existing shared document:
Once initial questions are answered, encourage the user to dump all the context they have. Request information such as:
Advise them not to worry about organizing it - just get it all out. Offer multiple ways to provide context:
If tools are available for fetching external content (web search, URL fetcher, etc.), mention that these can be used to pull in context directly. Otherwise, ask the user to paste the relevant content.
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 user mentions entities/projects that are unknown:
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, 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.
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:
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 the user wants a Word document, use the word-documents skill to create a .docx file with section headers and placeholder text. Otherwise, draft the structure directly in the conversation.
For each section:
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.
For the [SECTION NAME] section, brainstorm [5-20] things that might be included, depending on the section's complexity. Look for:
Generate 5-20 numbered options based on section complexity. At the end, offer to brainstorm more if they want additional options.
Ask which points should be kept, removed, or combined. Request brief justifications to help learn priorities for the next sections.
Provide examples:
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.
Based on what they've selected, ask if there's anything important missing for the [SECTION NAME] section.
Draft the section based on the curated points.
If working with a document file, update the relevant section. If working in conversation, present the drafted section clearly.
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".
As user provides feedback:
Continue iterating until user is satisfied with the section.
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.
As approaching completion (80%+ of sections done), announce intention to re-read the entire document and check for:
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.
Goal: Test the document with a fresh perspective (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.
Announce intention to predict what questions readers might ask when trying to discover this document.
Generate 5-10 questions that readers would realistically ask.
Approach the document as if reading it for the first time. For each predicted question:
Summarize what works well and what falls short for each question.
Review the document for:
Summarize any issues found.
If issues found: Report the specific problems discovered during reader testing.
List the specific issues.
Indicate intention to fix these gaps.
Loop back to refinement for problematic sections.
When the fresh-perspective review consistently produces correct answers and doesn't surface new gaps or ambiguities, the doc is ready.
When Reader Testing passes: Announce the doc has passed reader testing. Before completion:
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:
Tone:
Handling Deviations:
Context Management:
Document Management:
Quality over Speed:
development
Read and write files in the shared session workspace. Use this to access files created by any skill — code-agent outputs, office documents, images, and more. All within the same isolated session.
documentation
Create, modify, and manage Word documents.
documentation
Wikipedia article search and retrieval
development
Search the web using DuckDuckGo for current information, news, and research topics.