Documentation logo

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.

Overview

Publishermcouthon
Repositoryagents
Skill namedocumentation
Stars
79
Forks
11
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by mcouthon on GitHub. Read the source before you install it.

Installation

Install the Documentation AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

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
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Documentation in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Documentation on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Documentation is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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

Frequently asked questions

What does the Documentation AI skill do?

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.

Why use Documentation on TypingMind?

Because you install it once and use it with any model. Documentation is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Documentation in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/mcouthon/agents/tree/main/generated/claude/skills/documentation. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Documentation?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Documentation?

As many as you like. As long as a model supports skills, you can use Documentation with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Documentation AI skill free?

Yes. It is published on GitHub by mcouthon under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇