generate-documentation

generate-documentation is a command for coding agents from dykyi-roman/awesome-claude-code. It costs 30 tokens per session (1,199 once invoked), scanned A, original, MIT.

A documentation generator for files, folders, or whole projects. It can create or rewrite READMEs, technical documentation, and Mermaid diagrams, which are text-based diagrams for showing structure and relationships.

In plain words
What is it for?
Use it to document APIs, public interfaces, architecture, or selected parts of a project, while giving instructions about the audience, language, or sections to include.
Why use it?
It reduces the manual work of explaining unfamiliar code and keeping technical documentation up to date.

Command

Part of the acc plugin — 101 skills, 26 commands, 68 agents, 1 hook shipped together

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 commands/dykyi-roman/awesome-claude-code/generate-documentation
Clone the repo
git clone --depth 1 https://github.com/dykyi-roman/awesome-claude-code

Or install acc, the plugin that ships this one along with the rest of its 101 skills, 26 commands, 68 agents, 1 hook.

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 generate-documentation

README.md
[![agentmods](https://agentmods.dev/badge/commands/dykyi-roman/awesome-claude-code/generate-documentation.svg)](https://agentmods.dev/commands/dykyi-roman/awesome-claude-code/generate-documentation)
Your own site
<a href="https://agentmods.dev/commands/dykyi-roman/awesome-claude-code/generate-documentation"><img src="https://agentmods.dev/badge/commands/dykyi-roman/awesome-claude-code/generate-documentation.svg" alt="Measured on agentmods" height="20"></a>
Per session 30 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,199 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.00030 $0.01199
Opus 5 $0.00015 $0.00600
Sonnet 5 $0.00006 $0.00240
Haiku 4.5 $0.00003 $0.00120

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

Security

Grade A, and why

generate-documentation 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.

commands/generate-documentation.md · 233 lines

How it starts

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

Generate Documentation

Generate high-quality technical documentation for a file, folder, or project.

Input Parsing

Parse $ARGUMENTS to extract path and optional meta-instructions:

Format: <path> [-- <meta-instructions>]

Examples:
- /acc:generate-documentation ./
- /acc:generate-documentation src/ -- focus on API documentation
- /acc:generate-documentation ./ -- create architecture doc with C4 diagrams
- /acc:generate-documentation src/Domain/Order -- document only public interfaces
- /acc:generate-documentation ./ -- на русском языке

Parsing rules:

  1. Split $ARGUMENTS by -- (space-dash-dash-space)
  2. First part = path (required, default: current directory)
  3. Second part = meta-instructions (optional, customization)

Target

  • Path: First part of $ARGUMENTS (before --)
  • Meta-instructions: Second part (after --) — use to customize output

If meta-instructions provided, adjust documentation to:

  • Focus on specific documentation types
  • Include/exclude certain sections
  • Use specific diagram types
  • Target specific audience
  • Use specific language

Pre-flight Check

  1. Verify the path exists:

    • If $ARGUMENTS is empty, ask user what they want to document
    • If path doesn't exist, report error and stop
  2. Determine documentation type:

    • File → API documentation, code examples
    • Directory → README, architecture docs
    • Project root → Full documentation suite

Documentation Flow

/acc:generate-documentation <path>
    │
    ├─ Pre-flight: Validate path exists
    │
    ├─ Phase 1: Analyze project scope
    │   ├─ Read composer.json (if exists)
    │   ├─ Identify project type (library/app/API)
    │   └─ Determine audience
    │
    ├─ Phase 2: Task → acc:documentation-writer
    │   └─ Generate appropriate documentation
    │
    ├─ Phase 3: Task → acc:diagram-designer (if architecture docs)
    │   └─ Create Mermaid diagrams
    │
    └─ Output: Generated documentation files

Read the full file on GitHub · 233 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 · 233 lines · 30 tokens per session scan A 772b93033dbb

Subscribe to this mod's changes

generate-documentation is a command published in the GitHub repository dykyi-roman/awesome-claude-code (96 stars, last pushed 19d ago), licensed MIT. It adds 30 tokens to every session and 1,199 once invoked, about $0.0002 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-09-03.