generate-readme

generate-readme is a skill for Claude Code from divar-ir/ai-doc-gen. It costs 83 tokens per session (821 once invoked), scanned A, original, MIT.

A workflow for creating or refreshing a repository’s README, the main guide that explains a software project to its users and contributors.

In plain words
What is it for?
Use it to document a project’s architecture, folder structure, dependencies, APIs, and request or data flows, with optional Mermaid or C4 diagrams.
Why use it?
It turns codebase information into documentation while checking existing README content and important technical claims.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the ai-doc-gen plugin — 3 skills shipped together

Good fit Use it to document a project’s architecture, folder structure, dependencies, APIs, and request or data flows, with optional Mermaid or C4 diagrams.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/divar-ir/ai-doc-gen/generate-readme
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.

Any agent
npx skills add divar-ir/ai-doc-gen --skill generate-readme
Clone the repo
git clone --depth 1 https://github.com/divar-ir/ai-doc-gen

Made for: Claude Code.

Or install ai-doc-gen, the plugin that ships this one along with the rest of its 3 skills.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/divar-ir/ai-doc-gen/generate-readme/github.svg)](https://agentmods.dev/skills/divar-ir/ai-doc-gen/generate-readme)
Your own site
<a href="https://agentmods.dev/skills/divar-ir/ai-doc-gen/generate-readme"><img src="https://agentmods.dev/badge/skills/divar-ir/ai-doc-gen/generate-readme/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 generate-readme

Your own site · 80×15
<a href="https://agentmods.dev/skills/divar-ir/ai-doc-gen/generate-readme"><img src="https://agentmods.dev/badge/skills/divar-ir/ai-doc-gen/generate-readme.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 83 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 821 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00083 $0.00821
Opus 5 $0.00042 $0.00411
Sonnet 5 $0.00017 $0.00164
Haiku 4.5 $0.00008 $0.00082

Measured 10d ago against content hash 0c6e6bb7cfe9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

generate-readme 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 10d 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.

skills/generate-readme/SKILL.md · 53 lines

How it starts

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

Generate README

Transform codebase analysis into a clear, welcoming README.md that helps engineers quickly understand the project.

Workflow

1. Gather analysis data

Check for existing analysis documents in <repo>/.ai/docs/ (structure, dependency, data-flow, request-flow, API analyses). They may have been produced by the analyze-codebase skill.

  • If they exist: use them as your primary source, but spot-check key claims against the code — they may be stale.
  • If they don't exist: offer to run the analyze-codebase skill first (better results, reusable artifacts). If the user declines or wants it quick, explore the codebase directly yourself before writing.

2. Handle the existing README

Ask the user (or infer from their request) whether to incorporate the existing README:

  • Incorporate (default when a README exists): read it first; keep useful, still-accurate information — especially manually written content like setup quirks, badges, links, and licensing. Verify claims against the code; the old README may be outdated.
  • From scratch: ignore the existing file entirely.

3. Write the README

Include the following sections, in this order, unless the user excludes some. Only use these headlines plus any carried over from the existing README — don't invent extra sections.

  • Project Overview — title, concise description, purpose, key features, likely use cases.
  • Table of Contents — for READMEs long enough to need one.
  • Architecture — high-level overview, technology stack, component relationships with a mermaid diagram, key design patterns.
  • C4 Model Architecture (optional, skip unless the project's complexity warrants it or the user asks) — context and container diagrams as mermaid, wrapped in <details>/<summary> tags. Only include levels that can be reasonably deduced from the codebase.
  • Repository Structure — important directories and key files with their roles. Keep minimal and concise.
  • Dependencies and Integration — internal/external service dependencies, message queues, event streams. Do not list ordinary libraries here.
  • API Documentation — endpoints and request/response formats in an easy-to-read form (tables work well). No raw proto/schema dumps.
  • Development Notes — project-specific conventions, how to run/test, performance considerations.
  • Known Issues and Limitations — TODOs/FIXMEs found in code, incomplete features, technical debt.
  • Additional Documentation — markdown links to other docs in the repository.

Read the full file on GitHub · 53 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. 10d ago First seen · 53 lines · 83 tokens per session scan A 0c6e6bb7cfe9

Subscribe to this mod's changes

generate-readme is a skill published in the GitHub repository divar-ir/ai-doc-gen (755 stars, last pushed 1mo ago), licensed MIT. It adds 83 tokens to every session and 821 once invoked, about $0.0004 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-30.