documenting-code

documenting-code is a skill for Claude Code, Codex from alexei-led/cc-thingz. It costs 108 tokens per session (1,357 once invoked), scanned A, original, MIT.

A workflow for writing or updating documentation for people, coding agents, or developers, based on what the code actually does. It covers guides, instructions, architecture notes, API documentation, README files, and useful comments.

In plain words
What is it for?
Use it when documentation is missing, outdated, or needs to explain implementation behavior, setup, interfaces, architecture, or correct agent operation.
Why use it?
It keeps documentation focused on real behavior instead of guesses or unnecessary detail. It also adapts the format and level of explanation to the intended reader.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions CLAUDE.md; mentions AGENTS.md.

Good fit Use it when documentation is missing, outdated, or needs to explain implementation behavior, setup, interfaces, architecture, or correct agent operation.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/alexei-led/cc-thingz/documenting-code
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add alexei-led/cc-thingz --skill documenting-code
Clone the repo
git clone --depth 1 https://github.com/alexei-led/cc-thingz

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for documenting-code

README.md
[![agentmods](https://agentmods.dev/badge/skills/alexei-led/cc-thingz/documenting-code/github.svg)](https://agentmods.dev/skills/alexei-led/cc-thingz/documenting-code)
Your own site
<a href="https://agentmods.dev/skills/alexei-led/cc-thingz/documenting-code"><img src="https://agentmods.dev/badge/skills/alexei-led/cc-thingz/documenting-code/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for documenting-code

Your own site · 80×15
<a href="https://agentmods.dev/skills/alexei-led/cc-thingz/documenting-code"><img src="https://agentmods.dev/badge/skills/alexei-led/cc-thingz/documenting-code.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 108 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,357 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00108 $0.01357
Opus 5.5 $0.00043 $0.00543
Sonnet 5.5 $0.00022 $0.00271
Haiku 4.5 $0.00011 $0.00136

Measured 15d ago against content hash 84cc8f875244, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

documenting-code scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 15d ago.

The scan reads SKILL.md. This mod also ships 3 executable files (scripts/check-links.py, scripts/prose-lint.py, scripts/render-mermaid.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

src/skills/documenting-code/SKILL.md · 133 lines

How it starts

The opening of the file, as written. The whole thing — 133 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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.

Read the full file on GitHub · 133 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 15d ago Changed · +1 lines · +7 tokens per session 84cc8f875244
  2. 16d ago Changed ac051092cf34
  3. 22d ago Changed · -18 lines f7e67bbbb3f6
  4. 26d ago Changed · -3 lines · +36 tokens per session db4b549d45ed
  5. 1mo ago First seen · 153 lines · 65 tokens per session scan A 405e11d394cf

Subscribe to this mod's changes

documenting-code is a skill published in the GitHub repository alexei-led/cc-thingz (38 stars, last pushed 11d ago), licensed MIT. It adds 108 tokens to every session and 1,357 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

review-delta

Review only changes since last commit using impact analysis. Token-efficient delta review with automatic blast-radius detection.

tirth8205/code-review-graph · 24 tokens

find-simplifications

Use for a periodic repo-wide sweep of qwen-code for accumulated excess surface — dead components and files, orphaned locale keys, exports nothing consumes, added-then-removed scaffolding — filing candidates on a tracking issue and landing only what a maintainer has said yes to. Repo-wide and evidence-first; every…

QwenLM/qwen-code · 103 tokens

cross-model-review

A second-opinion code review that asks a different AI model to independently inspect a change, then compares both reviews. It focuses on logic, security, consistency, and omissions.

hashgraph-online/awesome-codex-plugins · 56 tokens

swarm-pr-review

Run a graph-guided, tool-augmented PR review using context packing, parallel exploration, mandatory repository-agnostic risk-family coverage with dispatch scaled to diff size and risk, independent reviewer validation, critic challenge, and metrics writeback. Use for deep pull request review with low false-positive…

ZaxbyHub/opencode-swarm · 91 tokens

pre-landing-review

Pre-landing PR review. Analyzes diff against the base branch for SQL safety, LLM trust boundary violations, conditional side effects, and other structural issues. Use when explicitly asked for the specialized pre-landing workflow. Product /review requests are handled by OpenBitFun's unified Review mechanism instead.…

GCWing/BitFun · 75 tokens

include-test-files-that-assert-on-behavior-being-changed-in-decl

When delegating a task affected by this skill, include.

ZaxbyHub/opencode-swarm · 29 tokens