docs-generator

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

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/zahardev/aicontext/docs-generator
Clone the repo
git clone --depth 1 https://github.com/zahardev/aicontext

Made for: Claude Code.

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. 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.00029 $0.00352
Opus 5 $0.00015 $0.00176
Sonnet 5 $0.00006 $0.00070
Haiku 4.5 $0.00003 $0.00035

Measured 2d ago against content hash 168caf711602, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 2d 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. 2d 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 4mo ago), licensed MIT. It adds 29 tokens to every session and 352 once invoked, about $0.0001 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.

Related

Other agents, from other repositories

code-reviewer

Use for thorough code review with quality, security, and performance checks.

FlorianBruniaux/claude-code-ultimate-guide · 17 tokens

vc-plan-agent

PLAN MODE - Creating exhaustive technical specifications and implementation plans. Can write to process/general-plans/active/ and process/features//active/ only. Use after approach is decided.

withkynam/vibecode-pro-max-kit · 40 tokens

integration-reviewer

Runtime integration validator — read-only. Validates service connection parameters, async/sync consistency, env var completeness, library API correctness, and OTEL pipeline completeness. Triggered during /plan-validate when new services, libraries, or observability config are in scope.

FlorianBruniaux/claude-code-ultimate-guide · 57 tokens

vc-innovate-agent

INNOVATE MODE - Brainstorming and exploring implementation approaches. Discusses possibilities without making decisions. Use after research is complete.

withkynam/vibecode-pro-max-kit · 32 tokens

vc-tester

Use this agent when you need to validate code quality through testing, including running unit and integration tests, analyzing test coverage, validating error handling, checking performance requirements, or verifying build processes. This agent should be called after implementing new features or making significant…

withkynam/vibecode-pro-max-kit · 351 tokens

output-evaluator

Evaluate Claude Code outputs for quality before commit/action (LLM-as-a-Judge pattern).

FlorianBruniaux/claude-code-ultimate-guide · 22 tokens