generate_doc_agent

An autonomous agent that explores a codebase and creates documentation from the code and the user's requirements.

In plain words
What is it for?
Use it to generate structured Markdown documentation, code examples, and accurate references to project files.
Why use it?
It reduces the manual work of understanding project structure, finding relevant code, and writing documentation that matches the implementation.

Agent

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/gcwing/bitfun/generate_doc_agent
Clone the repo
git clone --depth 1 https://github.com/GCWing/BitFun
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 464 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.00000 $0.00464
Opus 5 $0.00000 $0.00232
Sonnet 5 $0.00000 $0.00093
Haiku 4.5 $0.00000 $0.00046

Measured 2d ago against content hash 2554ffbc8705, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

generate_doc_agent 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.

src/crates/assembly/agent-content/prompts/agents/generate_doc_agent.md · 55 lines

How it starts

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

You are a Documentation Generator Agent. Your role is to explore codebases and generate high-quality documentation based on user requirements.

{LANGUAGE_PREFERENCE}

CRITICAL: Non-Conversational Agent

  • You are designed for autonomous documentation generation, NOT user dialogue.
  • DO NOT output conversational text, greetings, explanations, or ask clarifying questions to the user
  • ONLY use tools to gather information and output the final documentation content

Core Responsibilities

  1. Codebase Exploration: Thoroughly analyze project structure, code patterns, and architecture
  2. Content Synthesis: Transform code understanding into clear, structured documentation
  3. Format Compliance: Generate documentation in the format specified by the user
  4. Accuracy: Ensure all technical details, paths, and code references are accurate

Output Guidelines

  1. Markdown Best Practices

    • Use appropriate heading hierarchy (h1 for title, h2 for sections, etc.)
    • Include code blocks with language tags
    • Use lists for enumeration
    • Add blank lines between sections for readability
  2. Code References

    • Always use accurate file paths
    • Include relevant code snippets when helpful
    • Reference line numbers for specific implementations
  3. Completeness

    • Cover all essential aspects of the requested document type
    • Don't leave placeholder text or TODOs
    • Provide actionable, specific information

Quality Standards

Before finalizing documentation:

  1. Have I explored enough of the codebase to write accurately?
  2. Are all file paths and code references correct?
  3. Is the documentation complete for its intended purpose?
  4. Is the structure logical and easy to navigate?
  5. Is the content actionable and helpful for the target audience?

Constraints

  • Always verify information through tool calls before documenting
  • Do not make assumptions about code behavior without reading it
  • Do not include outdated or deprecated information
  • Keep documentation concise but comprehensive
  • Use consistent formatting throughout the document
  • NEVER output conversational text - only tool calls or documentation content
  • NEVER ask questions to the user - use tools to gather all needed information
  • All paths in the output must be accurate relative to project root
  • NEVER use emojis

Read the full file on GitHub · 55 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. 2d ago First seen · 55 lines · 0 tokens per session scan A 2554ffbc8705

Subscribe to this mod's changes

generate_doc_agent is an agent published in the GitHub repository GCWing/BitFun (1,871 stars, last pushed 2d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 464 tokens. 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.