generate-docs

generate-docs is a skill for Claude Code, Codex from mfbari/claude-skill-generate-docs. It costs 169 tokens per session (1,428 once invoked), scanned A, original, MIT.

A documentation pipeline that scans a codebase, creates about 15 reference documents, checks them against the source, and updates AI-agent context files.

In plain words
What is it for?
Use it to create architecture, API, database-schema, service, glossary, error, and security documentation, with Mermaid diagrams, in a docs/ folder.
Why use it?
It removes the need to build and maintain a complete map of an unfamiliar codebase by hand. Verification helps catch documentation that does not match the code.

Skill for Claude CodeCodex

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 skills/mfbari/claude-skill-generate-docs/generate-docs
Any agent
npx skills add mfbari/claude-skill-generate-docs --skill generate-docs
Clone the repo
git clone --depth 1 https://github.com/mfbari/claude-skill-generate-docs

Made for: Claude Code, Codex.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/mfbari/claude-skill-generate-docs/generate-docs.svg)](https://agentmods.dev/skills/mfbari/claude-skill-generate-docs/generate-docs)
Your own site
<a href="https://agentmods.dev/skills/mfbari/claude-skill-generate-docs/generate-docs"><img src="https://agentmods.dev/badge/skills/mfbari/claude-skill-generate-docs/generate-docs.svg" alt="Measured on agentmods" height="20"></a>
Per session 169 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,428 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.00169 $0.01428
Opus 5 $0.00084 $0.00714
Sonnet 5 $0.00034 $0.00286
Haiku 4.5 $0.00017 $0.00143

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

Security

Grade A, and why

generate-docs 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 4d 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.

generate-docs/SKILL.md · 134 lines

How it starts

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

generate-docs

You are the orchestrator for a documentation-generation pipeline. Coordinate five phases — Bootstrap → Explore → Generate → Verify → Context Update — in an iterative loop until every document meets grade A on every rubric dimension, or the retry budget is exhausted.

Detailed instructions for each phase live in references/. Read the relevant reference file when you reach that phase (progressive disclosure — don't load them all up front).

Phase What it does Read
0 — Bootstrap Detect/back-up/create CLAUDE.md; note AGENTS.md references/context-files.md
1 — Explore Scan the codebase across 8 domains → docs/_exploration_report.md references/exploration.md
2 — Generate Write ~15 docs in docs/ with Mermaid diagrams references/generation.md
3 — Verify Grade every doc A–F against the source → docs/_verification_report.md references/verification.md + references/grading-rubric.md
4 — Context Update Update CLAUDE.md + write AGENTS.md (progressive disclosure) references/context-files.md

Configuration

  • Max retries: the first argument, if given (e.g. generate-docs 5). If blank or non-numeric, default to 3.
  • Output directory: docs/ at the project root.
  • Passing grade: A on every document and every rubric dimension.
  • Completion: when ALL docs score A across ALL dimensions, or max retries is reached.

How to run the phases (any harness)

This skill is harness-agnostic. Each phase is a batch of independent work that parallelizes cleanly:

  • If your harness supports subagents / parallel tasks (e.g. a Task tool, an agent-spawn primitive, or a workflow engine): dispatch the phase's work as parallel subagents — 8 explorers in Phase 1, up to 15 writers in Phase 2, 1 verifier in Phase 3. Give each subagent the matching references/ file as its instructions, plus its specific brief/doc. Prefer read-only tools for explorers and verifiers.
  • If your harness has no subagents: perform each phase's work yourself, sequentially, following the same references/ files. The output is identical; only the wall-clock time differs.

Read the full file on GitHub · 134 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. 4d ago First seen · 134 lines · 169 tokens per session scan A 22bc959d76d7

Subscribe to this mod's changes

generate-docs is a skill published in the GitHub repository mfbari/claude-skill-generate-docs (5 stars, last pushed 1mo ago), licensed MIT. It adds 169 tokens to every session and 1,428 once invoked, about $0.0008 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 skills, from other repositories

claude-md-improver

Audit and improve CLAUDE.md files in repositories. Use when user asks to check, audit, update, improve, or fix CLAUDE.md files. Scans for all CLAUDE.md files, evaluates quality against templates, outputs quality report, then makes targeted updates. Also use when the user mentions "CLAUDE.md maintenance" or "project…

anthropics/claude-plugins-official · 82 tokens

agent-platform-rag-engine-management

Manage and query Agent Platform RAG Engine Corpora and retrieve grounded contexts using the Google GenAI SDK. Use when listing RAG corpora or files, inspecting a corpus, retrieving contexts, or generating content grounded in a RAG corpus. Do not use for standard database queries (use SQL/Spanner skills), Google…

google/skills · 85 tokens

agent-platform-model-registry

Agent Platform Model Registry Management. Use when you need to upload, list, describe, update, or delete machine learning models (and their versions) in the Agent Platform Model Registry. Don't use for model training, model deployment to endpoints, or managing non-Agent Platform models.

google/skills · 60 tokens

golden-rss

Use when testing the rss golden build.

yusufkaraaslan/Skill_Seekers · 12 tokens

twitter-reader

Read Twitter/X for financial research using opencli (read-only). Use this skill whenever the user wants to read their Twitter feed, search for financial tweets, view bookmarks, look up user profiles, or gather market sentiment from Twitter/X. Triggers include: "check my feed", "search Twitter for", "show my…

himself65/finance-skills · 161 tokens

chenhao-limit-up

Use when evaluating A-share limit-up (涨停板) setups through Chen Hao's sentiment and momentum lens: market emotion cycles, board strength, follow-through, and short-term aggressive momentum trading.

questflowai/investorskills · 44 tokens