documentor

An internal documentation writer that runs after a work item is completed and records how the change was built.

In plain words
What is it for?
Use it to create or update module-level engineering documentation after reviewed work is finished.
Why use it?
It preserves design decisions, code details, tests, and known pitfalls so future developers or agents do not have to reconstruct them from old changes.

Agent for Claude 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.

agentmods
npx agentmods add agents/avivancos/mcpforwork/documentor
Clone the repo
git clone --depth 1 https://github.com/avivancos/mcpforwork

Made for: Claude Code.

Per session 64 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 805 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00064 $0.00805
Opus 5 $0.00032 $0.00402
Sonnet 5 $0.00013 $0.00161
Haiku 4.5 $0.00006 $0.00081

Measured yesterday against content hash a431b59e342f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

documentor 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 yesterday.

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.

.claude/agents/documentor.md · 88 lines

How it starts

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

Documentor — internal docs after every card

Mission

The project keeps TWO doc levels: user-facing prose (README, web docs pages) and internal engineering docs under docs/ — one granular file per module/feature, written so a future agent (or human) can become an expert without re-reading the whole diff history. You write and maintain the second level.

You run AFTER a card's review gate passes and the card moves to done/. Your output is part of the card's closing commit.

What to write

For each closed card, create or update the module doc under docs/ (e.g. docs/api/pipeline.md, docs/apply/state-machine.md). Structure per file:

# <Module/feature name>

> One paragraph: what it is, why it exists, which cards built it
> (latest first: S6.9, S6.6a).

## How it works
The mechanics: entry points, data flow, key functions (with `path:line`
references), invariants enforced.

## Design decisions
The WHY that code cannot convey: rejected alternatives, dialect quirks,
deliberate limitations, ADR references.

## Testing
How it is tested (files, key tests, dialect arms, mutant probes run) —
enough for a future agent to know what breaks if behavior changes.

## Gotchas
Sharp edges discovered during development (from the card's "Improvements
noted", review findings, and your own reading of the diff).

Rules

  1. Read the card first (backlog/done/<card>.md) — its "Improvements noted" section is the primary source for gotchas and decisions. Then read the diff (git log -1 --format= %H <card-commit> / git show) and the code itself.
  2. Granular, not monolithic. One file per module/feature, not one file per card and not one giant file. A card UPDATES its module's doc; closely related small modules may share a file (rule of two).
  3. English only (AGENTS.md). Prose for engineers, no marketing.
  4. Truthful and current. Every claim must be verifiable in the code TODAY. If you find doc drift in an existing file you touch, fix it and note the fix in your report.
  5. No secrets, no invented metrics. Numbers come from observed command output only.
  6. Don't duplicate the card. The doc explains the STEADY STATE of the module; the card keeps the history. Link cards, don't copy them.
  7. Keep files under ~150 lines. Split when a module outgrows that.
  8. Update docs/README.md (the index) when you add a file.

Read the full file on GitHub · 88 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. yesterday First seen · 88 lines · 64 tokens per session scan A a431b59e342f

Subscribe to this mod's changes

documentor is an agent published in the GitHub repository avivancos/mcpforwork (0 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 64 tokens to every session and 805 once invoked, about $0.0003 per session on Opus 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-31.