/corneliu-skills:write-docsfrom corneliu-skills
Write structured technical documentation from session context — README sections, API guides, tutorials, changelogs. Use when the user says "document this", "write this up", "turn this into docs", "create a guide for this", wants to capture findings as documentation, or has finished exploratory work that needs a written artifact.
Ships in corneliu-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Turn session knowledge into structured, readable technical documentation. You are the controller — you plan the document, delegate sections to focused subagents, assemble the result, and polish it.
You've been working through something — debugging, setting up infrastructure, exploring an API, configuring a tool — and now the user wants a written artifact that captures what was learned. The documentation lives beyond this session: other people (or future-you) will read it cold.
digraph write_docs {
rankdir=TB;
"Gather context from session" [shape=box];
"Clarify scope with user" [shape=diamond];
"Propose structure (TOC)" [shape=box];
"User approves structure?" [shape=diamond];
"Dispatch section writers" [shape=box];
"Assemble draft" [shape=box];
"Self-review pass" [shape=box];
"Humanizer pass" [shape=box];
"Present to user" [shape=box];
"User feedback?" [shape=diamond];
"Revise" [shape=box];
"Write final file" [shape=box];
"Gather context from session" -> "Clarify scope with user";
"Clarify scope with user" -> "Propose structure (TOC)";
"Propose structure (TOC)" -> "User approves structure?";
"User approves structure?" -> "Propose structure (TOC)" [label="revise"];
"User approves structure?" -> "Dispatch section writers" [label="approved"];
"Dispatch section writers" -> "Assemble draft";
"Assemble draft" -> "Self-review pass";
"Self-review pass" -> "Humanizer pass";
"Humanizer pass" -> "Present to user";
"Present to user" -> "User feedback?";
"User feedback?" -> "Revise" [label="changes needed"];
"Revise" -> "Present to user";
"User feedback?" -> "Write final file" [label="approved"];
}
Before proposing structure, understand what you're documenting:
Extract from session context:
Ask the user (one at a time, skip what's obvious from context):
These four documentation types come from Divio's documentation system — pick the right one and the structure follows naturally:
Present a table of contents with one-line descriptions of what each section covers. Keep it lean — documentation that's too long doesn't get read.
Format your proposal like:
## Proposed structure
**File:** `docs/setup-guide.md`
**Type:** How-to guide
**Audience:** Team developers setting up locally
1. **Prerequisites** — what you need installed before starting
2. **Installation** — clone, install deps, configure env
3. **Configuration** — the three env vars and what they control
4. **Verification** — how to confirm it's working
5. **Troubleshooting** — the two gotchas we hit during setup
Estimated length: ~200 lines. Sound right?
Wait for approval. Adjust if the user wants sections added, removed, or reordered.
Dispatch one subagent per section (or group small related sections). Each subagent gets:
Subagent prompt template:
Write a documentation section. Return ONLY the markdown content (no fences wrapping it).
**Section:** [title]
**Brief:** [what to cover]
**Audience:** [who, what they know]
**Type:** [tutorial / how-to / explanation / reference]
**Source material:**
[paste the relevant facts, commands, code, decisions]
**Style rules:**
- Write for someone reading this cold — no "as we discussed" or "as mentioned above"
- Use second person ("you") for instructions
- Code blocks with language tags
- One idea per paragraph
- Short paragraphs (3-4 lines max)
- Prefer concrete examples over abstract descriptions
- If a step can fail, say what failure looks like and what to do
Parallelization: Independent sections can be dispatched in parallel. Sections that reference each other (e.g., "Configuration" needs to know what "Installation" set up) should be sequential — or give the later section the content from the earlier one.
Combine section outputs into one document. Then do two passes:
Self-review (do this yourself, inline):
Humanizer pass: Read the assembled draft through the lens of the humanizer skill. Specifically check for:
Fix issues inline. The goal is documentation that reads like a competent engineer wrote it, not an AI.
Show the full draft to the user. Don't ask "should I continue?" — present it and wait.
If the user has feedback:
When approved, write the final file to the agreed path.
Unless the user specifies otherwise:
bash, json, typescript, etc.)[text](url) not reference-styleFor short documents (under ~100 lines, 2-3 sections), skip the subagent dispatch — write it directly. The subagent pattern pays off when:
The final artifact is always a .md file written to disk. Confirm the path with the user before writing. Common locations:
docs/ in the project rootREADME.md (appended or replaced section)After writing, show the file path and a one-line summary of what was documented.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub corneliu-iancu/skills --plugin corneliu-skills14 skills in this plugin
/ask-better-questionsRefine questions and problems through 7 Socratic lenses to improve thinking, AI interactions, and decision-making. Use this skill when the user wants to ask better questions, refine a question, think through a problem from multiple angles, explore an idea, challenge their thinking, apply Socratic questioning, use the 7 lenses framework, stress-test a decision, or generally improve the quality of a question before asking it. Also use when the user seems stuck on a decision or is asking a surface-level question that would benefit from deeper exploration./brainstormingYou MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation./cavemanUltra-compressed communication mode. Cuts token usage ~75% by dropping filler, articles, and pleasantries while keeping full technical accuracy. Use when user says "caveman mode", "talk like caveman", "use caveman", "less tokens", "be brief", or invokes /caveman.
/diagnoseDisciplined diagnosis loop for hard bugs and performance regressions. Reproduce → minimise → hypothesise → instrument → fix → regression-test. Use when user says "diagnose this" / "debug this", reports a bug, says something is broken/throwing/failing, or describes a performance regression./grill-meInterview the user relentlessly about a plan or design until reaching shared understanding, resolving each branch of the decision tree. Use when user wants to stress-test a plan, get grilled on their design, or mentions "grill me"./humanizerRemove AI-writing patterns from text — makes writing sound natural and human. Use when editing or reviewing prose.