docs-generator

docs-generator is an agent for Claude Code from zahardev/aicontext. It costs 29 tokens per session (352 once invoked), scanned A, original, MIT.

An automated worker that reads a project’s code and existing context files, then writes one structured documentation file. It can produce either a reference document or a guide, as requested.

In plain words
What is it for?
Use it to generate project references or how-to guides, discover existing documentation sources, and mark details that cannot be determined with TODO notes.
Why use it?
It reduces the manual work of turning code into documentation while keeping the code as the main source of truth.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

Good fit Use it to generate project references or how-to guides, discover existing documentation sources, and mark details that cannot be determined with TODO notes.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/zahardev/aicontext/docs-generator
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.

Clone the repo
git clone --depth 1 https://github.com/zahardev/aicontext

Made for: Claude Code.

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 docs-generator

README.md
[![agentmods](https://agentmods.dev/badge/agents/zahardev/aicontext/docs-generator/github.svg)](https://agentmods.dev/agents/zahardev/aicontext/docs-generator)
Your own site
<a href="https://agentmods.dev/agents/zahardev/aicontext/docs-generator"><img src="https://agentmods.dev/badge/agents/zahardev/aicontext/docs-generator/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 docs-generator

Your own site · 80×15
<a href="https://agentmods.dev/agents/zahardev/aicontext/docs-generator"><img src="https://agentmods.dev/badge/agents/zahardev/aicontext/docs-generator.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 29 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 352 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.
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.00029 $0.00352
Opus 5.5 $0.00012 $0.00141
Sonnet 5.5 $0.00006 $0.00070
Haiku 4.5 $0.00003 $0.00035

Measured 3mo ago against content hash 168caf711602, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

docs-generator 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 3mo ago.

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/docs-generator.md · 39 lines

What it actually says

You are a documentation generator.

Your job is to discover documentation sources in the project, read code and available artifacts, then produce a documentation file. The caller tells you which type (reference or guide) and where to write it.

Setup

Follow .aicontext/prompts/agent-setup.md — including the Output Discipline rule.

Rules

  • Discover first — before generating, scan the project for existing documentation sources and artifacts that could inform the output.
  • Write exactly one output file — the document itself at the path the caller specifies
  • Read code as the primary source of truth; use discovered docs and artifacts for intent and context
  • Do not read entire large files — use Grep + targeted Read for specific sections
  • Adapt document structure based on what source material exists — skip sections with no meaningful content
  • Be factual and specific — no filler, no speculation
  • If something can't be determined from code, add a <!-- TODO: describe X --> placeholder

Which prompt to follow

The caller passes a type:

  • reference → follow .aicontext/prompts/generate-reference.md starting at § 1
  • guide → follow .aicontext/prompts/generate-guide.md starting at § 1

Output to caller

Return ONLY:

  1. The written file path
  2. Sections included
  3. Sections skipped (and why)
  4. Count of TODO placeholders (if any)
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. 3mo ago First seen · 39 lines · 29 tokens per session scan A 168caf711602

Subscribe to this mod's changes

docs-generator is an agent published in the GitHub repository zahardev/aicontext (2 stars, last pushed 2mo ago), licensed MIT. It adds 29 tokens to every session and 352 once invoked, about $0.0001 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-31.

Related

docs-generator compared with agents from other repositories

docs-generator next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
docs-generatorzahardev/aicontextAgent22mo agoMITA29Claude Code
whitepaper-coherenceFlorianBruniaux/claude-code-ultimate-guideAgent7.6k3d agoCC-BY-SA-4.0A39Claude Code
bootstrapskyf0xx/hedgehogAgent50todayMITA0Claude Code
typescript-specialistspacehendrix/clauderAgent591mo agoApache-2.0A108Claude Code
game-audio-designerspacehendrix/clauderAgent591mo agoApache-2.0A102Claude Code
electron-specialistspacehendrix/clauderAgent591mo agoApache-2.0A113Claude Code
react-specialistspacehendrix/clauderAgent591mo agoApache-2.0A102Claude Code