Documenting Code logo

Documenting Code

Community
alexei-led
documenting-code

Write, rewrite, or update project docs from implementation facts - README front pages, user guides, configuration references, architecture docs, evaluations, agent instructions, and code comments. Use when writing or improving project docs for clarity, concision, accuracy, or useful visuals, or when code changes make docs stale. NOT for release preparation or release notes (releasing-code), external library docs (looking-up-docs), engineering messages (writing-style), scoring instruction files (reviewing-instructions), or ADRs unless explicitly requested.

Overview

Publisheralexei-led
Repositorycc-thingz
Skill namedocumenting-code
Stars
38
Forks
5
Bundled files
13
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.

  • 13 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by alexei-led on GitHub. Read the source before you install it.

Installation

Install the Documenting Code 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.
    https://github.com/alexei-led/cc-thingz/tree/master/src/skills/documenting-code
  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/alexei-led/cc-thingz.git /tmp/cc-thingz
mkdir -p .claude/skills
cp -r /tmp/cc-thingz/src/skills/documenting-code .claude/skills/documenting-code
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Documenting Code 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 Documenting Code 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 Documenting Code 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.

Documenting Code

Turn implementation facts into docs that a named reader can use. Every claim in the result matches the code, and every visual renders cleanly.

Pick the mode

  • Update: a code change made docs stale. Change the smallest set of docs. Done when each changed behavior is documented where its reader looks, and nothing unrelated changed.
  • Overhaul: the user asks to rewrite, restructure, or improve a doc set, for example a README front page, guides, or an architecture doc. Done when:
    • each doc has one reader and one job, and each fact has one owner
    • every claim matches the code, and every visual passes its render check
    • the gate passes
  • A named doc or a named change is enough scope; start work. Ask only when the request names neither, with one question and these options: auto-detect from recent changes, README, API docs, or the full doc set.

Readers

Decide the reader before writing.

  • Human: short, scannable text. Use a diagram, table, or chart when it answers a question faster than prose. Load references/doc-set.md only for doc-set structure or Overhaul mode, references/style.md when rewriting prose, and references/visuals.md only when changing diagrams or charts.
  • Agent (AGENTS.md, CLAUDE.md, skills, prompts): terse operational text with headers, bullets, numbered steps, exact contracts, and a table where it is the clearest form. No diagrams or rationale that a model already knows. To score or lint instruction files, use reviewing-instructions.
  • Code: comments and docstrings state contracts, invariants, side effects, errors, and non-obvious decisions. Delete comments that restate the code. Load references/code.md for shared comment rules and per-language doc checks.

Workflow

  1. Scope the work from the request and the changed files (git diff --name-only), and find the existing docs that cover them.
  2. List the doc files, the reader and the job of each, and the facts that more than one doc states. In Overhaul mode, write the ownership map from references/doc-set.md before editing.
  3. Read the code, tests, and configuration that each doc describes. When docs and code conflict, report it and update the docs to the code, unless the user says that the doc is the intended contract.
  4. Write. Keep each fact in one place and link to it from the others. Replace adjectives with measured facts. Name actors, conditions, and referents; use one term per concept. Cut words only when meaning and necessary context survive.
  5. Check changed claims against their source; use references/claims.md for configuration, API, or measured-performance claims. Generate sample output when changing examples. Mark unconfirmed claims and say where you looked.
  6. If visuals changed, load references/visuals.md, render them, inspect the images, and fix the faults.
  7. Run the gate once. Run it again only after further edits.
  8. Report with the output contract.

Gate

Run the bundled scripts on the changed docs from the project root. <skill-dir> is the directory that contains this SKILL.md, as the host reports it. Do not use a scripts/ directory of the project instead.

bash
python3 <skill-dir>/scripts/check-links.py <files or dirs>   # relative links and #anchors
bash <skill-dir>/scripts/render-mermaid.sh <files or dirs>   # renders each Mermaid block to PNG
python3 <skill-dir>/scripts/prose-lint.py <files or dirs>    # advisory plain-language lint
  • Open the rendered images. A diagram that parses can still have a bad layout.
  • Also run the repo's own docs checks, for example markdownlint-cli2 or a make docs target, when they exist.
  • Run documented commands and examples when practical.

Done when the relevant build/test/lint checks pass on what you changed, or you name each check that did not run and why.

Rules

  • No speculative, future, or dead behavior.
  • History (decision dates, "agreed with", replaced designs) belongs in git or the changelog, not in design docs.
  • No secrets, tokens, private paths, or internal hosts.
  • Generated docs: edit the source and run the generator.
  • No ADRs or docs/adr/ changes unless explicitly requested.
  • Do not commit, push, or publish unless the user asks.

Output

markdown
## Documentation Update

Mode: update | overhaul

Updated:

- `path` — <what changed> (reader: <human | agent | code>)

Moved (overhaul only):

- <fact> → owned by `path`; other docs now link to it

Checked:

- claims: <n> checked against source; unconfirmed: none | <claim — where looked>
- visuals: <n> rendered and inspected | none changed
- gate: links <passed | failed>, diagrams <passed | skipped (reason)>, prose <n findings>

Issues: none | <remaining issue>

Without write access, return proposed changes (file, change, reason) instead of applying them.

Failure handling

  • No stale docs found: say so and list what you checked.
  • Large audit: one bounded read-only helper can map docs against code. Do not trust its report. Check its claims and the actual diff (git diff --stat) before you report success.
  • A check fails: quote the failure in Issues.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Documenting Code AI skill do?

Write, rewrite, or update project docs from implementation facts - README front pages, user guides, configuration references, architecture docs, evaluations, agent instructions, and code comments. Use when writing or improving project docs for clarity, concision, accuracy, or useful visuals, or when code changes make docs stale. NOT for release preparation or release notes (releasing-code), external library docs (looking-up-docs), engineering messages (writing-style), scoring instruction files (reviewing-instructions), or ADRs unless explicitly requested.

Why use Documenting Code on TypingMind?

Because you install it once and use it with any model. Documenting Code 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 Documenting Code in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/alexei-led/cc-thingz/tree/master/src/skills/documenting-code. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Documenting Code?

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 Documenting Code?

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

Is the Documenting Code AI skill free?

Yes. It is published on GitHub by alexei-led 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 👇