Logo van Documentation

Documentation

Community
mcouthon
documentation

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.

Add to TypingMind

Overzicht

Uitgevermcouthon
Repositoryagents
Skillnaamdocumentation
Sterren
79
Forks
11
Meegeleverde bestanden
Alleen instructies
LicentieMIT
Links
  • Instructies in Markdown

    Het model laadt het bestand SKILL.md alleen als dat nodig is. Dat kost dus alleen tokens als een verzoek daadwerkelijk bij de skill past.

  • Werkt met elk LLM

    AI-skills bestaan uit instructies in gewone Markdown, niet uit aanbiederspecifieke code. Daardoor werken ze met GPT, Claude, Gemini, Grok of een lokaal model.

  • Compleet zonder extra bestanden

    Alles wat het model nodig heeft, staat in de instructies — geen extra bestanden om te synchroniseren.

  • Open source

    Gepubliceerd door mcouthon op GitHub. Bekijk de bronbestanden voordat je de skill installeert.

Installatie

Installeer de AI-skill Documentation in TypingMind om deze met elk LLM te gebruiken, of voeg de skill toe aan een andere agent die SKILL.md kan lezen.

1

Installeren in TypingMind

TypingMind installeert een skill rechtstreeks vanuit de GitHub-map. De app leest SKILL.md, bundelt de bijbehorende bestanden en slaat het resultaat lokaal op.

  1. Open de app en ga naar Plug-ins → Skills.
  2. Kies "Installeren via GitHub".
  3. Plak de onderstaande URL van de skillmap en bevestig.
    https://github.com/mcouthon/agents/tree/main/generated/claude/skills/documentation
  4. Schakel de skill in voor elke chat waarin je de skill wilt kunnen gebruiken.
Plug-ins → Skills → Skill toevoegen → Via GitHub-URL. Plak vervolgens de map-URL en druk op Doorgaan.
2

Installeren in een andere agent

Elke agent die het Agent Skills-formaat kan lezen, kan deze skill gebruiken — kopieer de map naar de skillmap van die agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/mcouthon/agents.git /tmp/agents
mkdir -p .claude/skills
cp -r /tmp/agents/generated/claude/skills/documentation .claude/skills/documentation
Start Claude Code na het kopiëren opnieuw op, zodat de nieuwe skill wordt herkend.

Gebruik deze skill in TypingMind

Schakel Documentation in voor een chat naar keuze in TypingMind en het model doet de rest. De naam en beschrijving staan in de systeemprompt. Zodra een verzoek bij de skill past, laadt het model zelf de volledige instructies. Je hoeft de skill nooit handmatig aan te roepen. Pas als het model de skill daadwerkelijk gebruikt, kost dat tokens.

Het model laadt Documentation automatisch zodra een verzoek erbij past.

Werkt met elk AI-model

AI-skills zijn gewone Markdown-instructies in plaats van aanbiederspecifieke code. Daardoor is Documentation niet gebonden aan het model waarvoor de skill is geschreven. Installeer de skill één keer in TypingMind en gebruik deze met GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama of een lokaal model dat je zelf draait — allemaal met je eigen API-sleutels.

  • Alleen geladen wanneer nodig

    De systeemprompt bevat alleen de naam en beschrijving. De instructies worden bij het eerste bijpassende verzoek opgehaald, dus een ongebruikte skill kost niets.

  • Wissel van model tijdens een chat

    Omdat de skill uit instructies bestaat en niet uit code, blijft deze werken als je van model wisselt — het volgende model leest hetzelfde SKILL.md-bestand.

Skillinstructies

Dit is de inhoud van SKILL.md die het model laadt. Lees deze vóór de installatie — een skill bestaat uit instructies die je model zal volgen.

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 / decisionEvery code change
DocstringsConsumers, AI agentsFunction / class contractEvery signature change
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
  • Reference issue/ticket numbers for context: // Workaround for #1234
  • Delete rather than comment out dead code (use version control)
  • Keep comments adjacent to the code they describe

Docstrings

  • Public APIs: Complete — params, returns, raises/throws, brief description
  • Internal/private: Concise — one-line purpose; skip if trivially obvious
  • Skip entirely: Simple getters/setters, constructors with no logic, obvious wrappers
  • Describe the contract (what), not the implementation (how)
  • Include a usage example for non-trivial public APIs

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
- [ ] Public APIs have complete docstrings (params, returns, raises)
- [ ] Code comments explain "why", not "what"
- [ ] 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
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 these defaults:

  • 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:

Documentation ElementAgent Benefit
Docstrings with typed paramsNavigation, correct usage, type inference
Module-level purpose commentsUnderstanding component responsibility
Architecture docsHigh-level context for cross-cutting changes
"Why" commentsMaking correct 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

Veelgestelde vragen

Wat doet de AI-skill Documentation?

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.

Waarom Documentation gebruiken in TypingMind?

Omdat je deze skill één keer installeert en met elk model kunt gebruiken. Documentation bestaat uit gewone Markdown in plaats van aanbiederspecifieke code. Dezelfde skill werkt dus met GPT-5, Claude, Gemini, Grok of een lokaal model. Ook als je midden in een chat van model wisselt, blijft de skill werken. TypingMind werkt met je eigen API-sleutels, dus je betaalt aanbieders rechtstreeks in plaats van een abonnement per gebruikersplek af te sluiten. Je skills en chats blijven in je eigen opslag.

Hoe installeer ik Documentation in TypingMind?

Open Plug-ins → Skills → Installeren vanaf GitHub in TypingMind en plak https://github.com/mcouthon/agents/tree/main/generated/claude/skills/documentation. TypingMind leest het bestand SKILL.md en installeert het als een skill die je per chat kunt inschakelen.

Welke AI-modellen kunnen Documentation gebruiken?

Elk model dat je in TypingMind koppelt. AI-skills bestaan uit gewone Markdown-instructies in plaats van aanbiederspecifieke code. GPT, Claude, Gemini, Grok en lokale modellen kunnen deze skill dus allemaal laden wanneer een verzoek erbij past.

Hoeveel AI-modellen kan ik met Documentation gebruiken?

Zoveel als je wilt. Je kunt Documentation gebruiken met elk model dat skills ondersteunt, zoals GPT, Claude, Gemini, Grok, DeepSeek, Mistral of Llama. Allemaal in TypingMind met je eigen API-sleutels.

Is de AI-skill Documentation gratis?

Ja. Deze skill is door mcouthon op GitHub gepubliceerd onder de licentie MIT. Je betaalt alleen je eigen AI-aanbieder voor de tokens die je gebruikt.

Wat zijn AI-skills?

Een AI-skill is een herbruikbare bundel instructies die een AI-model leert hoe het één specifieke taak moet uitvoeren. De skill volgt het open Agent Skills-formaat: het bestand SKILL.md bevat de naam en beschrijving van de skill. Daarnaast kan de skill scripts, sjablonen of referentiebestanden bevatten die het model nodig heeft. Het model leest de instructies alleen als je verzoek bij de skill past. Een geïnstalleerde skill kost dus niets zolang deze niet wordt gebruikt.

Waarin verschillen AI-skills van plug-ins of MCP-servers?

Een plug-in of MCP-server geeft een model nieuwe tools om aan te roepen: code die ergens wordt uitgevoerd en een resultaat teruggeeft. Een AI-skill geeft het model juist kennis en een werkwijze: hoe het een taak moet aanpakken, welke stappen het moet volgen en hoe goede uitvoer eruitziet. Skills bestaan uit gewone Markdown en hebben dus geen server, API-sleutel of runtime nodig. Ze werken met elk model.

Bekijk alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇