mcouthon/agents/documentation

Claude Code and agent skill by mcouthon/agents

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Documentation standards and best practices for code changes. Use when writing or reviewing documentation, adding public APIs, making user-facing changes, or checking documentation quality. Triggers on: 'use documentation mode', 'document', 'documentation', 'docstring', 'add docs', 'update docs', 'documentation review', 'API documentation', 'README update'. Full access mode - can write documentation and update code comments.

Install

npx vskill@latest install mcouthon/agents/documentation

SKILL.md

Documentation Standards

Write documentation that serves humans and AI agents. Keep it accurate, layered, and close to the code.

"Documentation is a love letter that you write to your future self." — Damian Conway

Documentation Hierarchy

Documentation lives in layers. Each layer has a distinct audience, scope, and update cadence.

LayerAudienceScopeUpdate Frequency
Code commentsMaintainers, AI agentsSingle block / decisionOnly when a non-obvious decision exists
DocstringsConsumers, AI agentsFunction / class contractWhen a docstring exists and the contract changed
Module docsTeam members, onboardingFile / package purposeWhen module role changes
Project docs (README, guides)All stakeholdersSystem / featureEvery user-facing change
Architecture docs (ADRs)Maintainers, future devsDesign decisionsWhen decisions are made

Audience Matrix

AudienceWhat They NeedKey Layers
Internal maintainersIntent, trade-offs, edge casesComments, docstrings, ADRs
New team membersOrientation, key concepts, how things connectModule docs, README, architecture
External users / consumersHow to use it, API contractsREADME, API reference, how-to guides
AI agentsPurpose, contracts, intent behind decisionsDocstrings, architecture docs, comments

Layer Rules

Code Comments
  • Explain why, never what — the code already says what
  • Mark non-obvious decisions, trade-offs, and workarounds
  • Cite the durable artifact — issue/ticket, ADR, commit — for context: // Workaround for #1234. Never cite orchestration scratch (task folders, phase plans, session state)
  • Delete rather than comment out dead code (use version control)
  • Keep comments adjacent to the code they describe
Docstrings
  • Non-obvious contracts: State the contract — params, returns, raises/throws, brief description
  • Self-documenting signatures: No docstring — the name and types already carry it
  • Skip entirely: Simple getters/setters, constructors with no logic, obvious wrappers
  • Describe the contract (what), not the implementation (how)
  • Include a usage example only when usage is genuinely non-obvious
Module / Package Docs
  • Top-of-file docstring or comment: one paragraph explaining purpose
  • List key classes/functions and their roles
  • Describe usage patterns and entry points
  • Update when the module's responsibility changes
Project Docs

Follow the Diátaxis framework (see below). Keep docs in the repo, close to what they describe.

  • README: Project purpose, quickstart, key links — the front door
  • CHANGELOG: User-facing changes per release
  • Architecture docs: Design decisions, system structure, component relationships
  • API reference: Generated or maintained per public surface

Diátaxis Quick Reference

Four types of documentation, each serving a different user need:

TypeOrientationAnswersStructure
TutorialLearning"Follow these steps to learn X"Step-by-step, hands-on, minimal explanation
How-to GuideTask"How to accomplish X"Goal-oriented steps, assumes knowledge
ReferenceInformation"Specification of X"Precise, complete, consistent structure
ExplanationUnderstanding"Why X works this way"Conceptual, discursive, gives context

Common mistakes:

  • Mixing tutorial steps with reference details
  • Writing a how-to guide as a tutorial (too many basics)
  • Putting explanations in reference docs (keep them factual)
  • Missing how-to guides (users know what they want to do, not where to look)

Quality Checklist

markdown
-[ ] Non-obvious contracts documented; self-evident signatures left bare
-[ ] Comments exceptional: why-only, no narration or restatement
-[ ] No stale documentation (matches current behavior)
-[ ] User-facing changes reflected in README or relevant guides
-[ ] New modules have a brief purpose description at top of file
-[ ] Architecture-significant decisions documented (ADR or equivalent)
-[ ] Examples are runnable and up-to-date
-[ ] CHANGELOG updated for user-visible changes

Anti-Patterns

Anti-PatternProblemCorrection
Comment restates the codeNoise, drifts out of syncDelete or explain the why
Narration or section-divider commentsNoise that drifts; structure should carry itDelete; restructure or rename if structure is unclear
Comments citing task/phase/session stateOrchestration scratch leaks into shipped codeDelete, or cite the durable artifact (issue, ADR, commit)
Docstring describes implementationCouples docs to internalsFocus on the contract (what, not how)
README lists features that don't existMisleading, erodes trustAudit docs against actual behavior
Docs live only in PR/commit messagesInvisible to future readersMove to permanent location in repo
Over-documenting trivial codeClutter, maintenance burdenSkip obvious getters/setters/constructors
Copy-pasting docstrings across overloadsDrift between copiesDocument the base, reference it from overloads
Huge top-of-file comment blocksNobody reads themKeep to one paragraph; link to detailed docs

Docstring Standards

Follow the standard specified by each language's instruction file. Do not invent custom formats.

LanguageStandardReference
PythonGoogle stylepython.instructions.md — Documentation section
TypeScriptTSDocTSDoc conventions
JavaScriptJSDocJSDoc conventions

When a language-specific instruction file doesn't cover documentation, apply the global rule — docstrings only where the contract is non-obvious. When one is warranted:

  • Public functions: brief description + @param + @returns + @throws
  • Classes: brief description + constructor params
  • Interfaces/types: brief description of purpose and usage context

Agent-Specific Guidance

AI agents consume documentation differently than humans. Optimize for both.

What helps agents most:

SignalAgent Benefit
Precise names + explicit typesCorrect usage, navigation, zero docs needed
Architecture docsHigh-level context for cross-cutting changes
"Why" comments on non-obvious constraintsCorrect decisions about modifications
Explicit contracts (pre/post conditions)Safe refactoring boundaries

Principles:

  • Keep docs close to code — agents search files, not wikis
  • Structured formats (tables, lists) are easier to parse than prose
  • Be explicit about edge cases and invariants in docstrings
  • Name things well — good names reduce the documentation needed
  • When docs and code disagree, the code is right — fix the docs

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
79
Repository forks
11
7-day trend score
22

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/mcouthon/agents/documentation/badge)](https://verified-skill.com/skills/mcouthon/agents/documentation)

Something wrong with this skill or its page? Tell us.