udocument
Use when writing or editing documentation — project docs, CLAUDE.md, READMEs, SKILL.md, docstrings, inline comments. Auto-triggers on `.md` files and…
by btseytlin★ 46 GitHub stars
Install udocument in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
About this skill
Document
Documentation explains how to use and maintain the system. Apply these rules to project docs, agent guidance, skills, docstrings, and comments.
Core rules
- Lead with the problem or purpose, then describe behavior and usage.
- Prefer one concrete example over repeated explanation.
- Remove stale descriptions of behavior that no longer exists. Do not add historical notes to preserve them.
- Document supported behavior, not aspirations.
- Use lists instead of tables unless the user requests a table.
- Write short, grammatical sentences. Remove framing and repeated instructions.
- State concrete constraints. "Dataset must not import training" is clearer than "respect boundaries".
- Consolidate duplicated guidance and link to its owner.
Project docs
Answer what the project does, why it exists, how to use it, and where related documentation lives. Include a minimal working example. Keep a README under 200 lines, moving detail into docs/ when needed.
Agent guidance
Put project-wide rules, constraints, style preferences, and pointers in CLAUDE.md or its equivalent. Per-task instructions belong in docs/tasks/<slug>.md.
Skills
- Preserve
nameanddescriptionfrontmatter. The description determines when an agent loads the skill. - Cover when to use it, the process, key rules, required output, and terminal state.
- Use descriptive headings. Aim for a body under about 150 lines without removing required behavior.
Docstrings
For a large class or module, explain its responsibility and boundaries:
class DatasetBuilder:
"""Build dataset shards from raw episodes.
Validate inputs, transform records, and checkpoint progress.
Training-time loading belongs in training/loader.py.
"""
For a small utility, one line is enough. Omit docstrings that merely repeat an internal helper's name.
Inline comments
Explain non-obvious reasons: a workaround, required ordering, hidden invariant, or surprising choice. Remove narration such as # increment counter, change-history notes, and placeholder apologies.
Keep a concrete historical cause when it explains a current constraint. "Guard against overflow that corrupted billing totals" explains a guard. "Added in the billing cleanup" does not.
Process
- Identify the audience and the question the document must answer.
- Choose a list, example, or paragraph that fits the content.
- Draft concise instructions grounded in the implementation.
- Remove text that adds no instruction or explanation. Do not cut to a percentage target.
- Include a concrete example where it helps the reader act.
- Check references and remove stale, aspirational, or duplicated claims.
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
FAQ
What does the udocument skill do?
Use when writing or editing documentation — project docs, CLAUDE.md, READMEs, SKILL.md, docstrings, inline comments. Auto-triggers on `.md` files and docstring edits. Enforces lead-with-why, kill stale content, lists over tables, no aspirational sentences.
How do I install the udocument skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the udocument skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
doc-coauthoring
AnthropicGuide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
academy-guide
AnthropicStop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
internal-comms
AnthropicA set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
skill-development
AnthropicThis skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…