Agent skill

Generate Readme

by divar-ir in divar-ir/ai-doc-gen

Generate or refresh a comprehensive, professional README.md for a repository, with architecture overview, mermaid and optional C4 diagrams, repository structure, dependencies, and API documentation.

MITAuto-check passedDevelopment

Install Generate Readme

skills CLI
$ npx skills add divar-ir/ai-doc-gen --skill generate-readme -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install divar-ir/ai-doc-gen generate-readme --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/divar-ir/ai-doc-gen.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/generate-readme .claude/skills/generate-readme && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
generate-readme
GitHub stars
766
Token cost
~996 tokens
SKILL.md length
481 words
Files
1
Skills in repo
3
Repo updated
First seen
Licence
MIT

At a glance

Generate or refresh a comprehensive, professional README.md for a repository, with architecture overview, mermaid and optional C4 diagrams, repository structure, dependencies, and API documentation.

  • Works in 4 steps: Gather analysis data → Handle the existing README → Write the README → …
  • The user asks to create
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Regenerate a README

What it does

Generate Readme is an agent skill from divar-ir/ai-doc-gen. Generate or refresh a comprehensive, professional README.md for a repository, with architecture overview, mermaid and optional C4 diagrams, repository structure, dependencies, and API documentation. Use whenever the user asks to create, write, update, improve, or regenerate a README, project documentation, or a project overview page — even if they just say "document this project" or "this repo needs docs".

Its SKILL.md is about 1000 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Technical documentation and Diagrams. It works with Mermaid, Pydantic AI and Python. The repository describes itself as: AI-powered multi-agent system that automatically analyzes codebases and generates comprehensive documentation. Features GitLab integration, concurrent processing, and multiple… The licence is MIT.

When your agent uses it

  • The user asks to create
  • Regenerate a README
  • Project documentation
  • A project overview page — even if they just say document this project

Example prompts

  • “document this project”
  • “this repo needs docs”
  • “/generate-readme”

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Gather analysis data
  2. Handle the existing README
  3. Write the README
  4. Report

What it can do on your machine

Read from SKILL.md and the folder at commit bd3aba7. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Generate Readme loads about 996 tokens when it runs. Until then it costs about 106 tokens; SKILL.md has 481 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~106
When it runs · the whole SKILL.md, loaded when a task matches
~996

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from divar-ir/ai-doc-gen at commit bd3aba7, republished under its MIT licence (© divar-ir). 481 words, ~996 tokens.

Download SKILL.mdSave it as .claude/skills/generate-readme/SKILL.md (or your agent's skills folder).
name
generate-readme
description
Generate or refresh a comprehensive, professional README.md for a repository, with architecture overview, mermaid and optional C4 diagrams, repository structure, dependencies, and API documentation. Use whenever the user asks to create, write, update, improve, or regenerate a README, project documentation, or a project overview page — even if they just say "document this project" or "this repo needs docs".

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.
Show full SKILL.md (145 more words)Show less
Writing guidelines
  1. Use only information that can be reasonably inferred from the code and repository structure — never invent capabilities, and describe existing code, not hypothetical code.
  2. Do not include or reference any file from the .ai/docs/ directory — those are internal AI artifacts.
  3. Format with proper Markdown: headings, syntax-highlighted code blocks, lists, and tables.
  4. Make the README welcoming and clear for developers new to the project.
  5. For mermaid diagrams: group by logical boundaries, use meaningful relationship labels with descriptive verbs, keep visual hierarchy clean, and prefer several small focused diagrams over one giant one.
  6. Note (in your report to the user, not the README) any areas where additional documentation would help.
4. Report

Write the file to <repo>/README.md, then summarize for the user what changed versus the previous README (if any) and flag anything you couldn't verify from the code.

© divar-ir, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/generate-readme of divar-ir/ai-doc-gen.

Open the folder on GitHubat commit bd3aba7

Compare with similar skills

Generate Readme next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Generate Readme compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Generate Readme this skilldivar-ir/ai-doc-gen766—~996Automated safety check: PassMIT
Generating Documentationancoleman/ai-design-components526—~3kAutomated safety check: PassMIT
Diagram Designcathrynlavery/diagram-design45k1 repos~7.5kAutomated safety check: PassMIT
Draw.io Diagram StudioAgents365-ai/drawio-skill10k—~2.4kAutomated safety check: NotesMIT
Code Graph Mermaid Diagramstrailofbits/skills7.4k1 repos~1.7kAutomated safety check: PassCC-BY-SA-4.0
Pretty Mermaid Rendererimxv/Pretty-mermaid-skills1.5k—~2kAutomated safety check: PassMIT

Similar skills

  • Generating Documentation

    ancoleman/ai-design-components

    Generate comprehensive technical documentation including API docs (OpenAPI/Swagger), code documentation (TypeDoc/Sphinx), documentation sites (Docusaurus/MkDocs), Architecture Decision Records…

    526 GitHub stars~3k tokensUpdated 10 mo ago
    DevelopmentAuto-check passed
  • Diagram Design

    cathrynlavery/diagram-design

    Creates branded diagrams, from architecture, flowchart and sequence to charts and maps, as self-contained HTML with inline SVG, with import from draw.io, Mermaid and Excalidraw.

    45k GitHub starsUsed in 1 repo~7.5k tokens
    DevelopmentAuto-check passed
  • Draw.io Diagram Studio

    Agents365-ai/drawio-skill

    Creates and edits editable draw.io diagrams from descriptions, code, infrastructure files, SQL and API schemas, with sync, review, test and export tools.

    10k GitHub stars~2.4k tokensUpdated 6 days ago
    DevelopmentAuto-check: notes
  • Code Graph Mermaid Diagrams

    trailofbits/skills

    Official

    Generates Mermaid diagrams from Trailmark code graphs, including call graphs, class hierarchies, module dependency maps, complexity heatmaps and attack surface data flows.

    7.4k GitHub starsUsed in 1 repo~1.7k tokens
    DevelopmentAuto-check passed
  • Pretty Mermaid Renderer

    imxv/Pretty-mermaid-skills

    Writes and renders Mermaid diagrams as themed SVG, PNG or terminal ASCII and Unicode art with a bundled Node.js CLI that needs no browser.

    1.5k GitHub stars~2k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • Code To Diagram

    zebbern/claude-code-guide

    Analyze codebases and automatically generate architecture diagrams, flowcharts, and org charts.

    4.7k GitHub starsUsed in 1 repo~972 tokens
    DevelopmentAuto-check passed

More from divar-ir/ai-doc-gen

  • Generate AI Rules

    divar-ir/ai-doc-gen

    Generate AI assistant configuration files for a repository — CLAUDE.md, AGENTS.md, and Cursor rules (.cursor/rules/.mdc) — from codebase analysis.

    766 GitHub stars~1.2k tokensUpdated 2 mo ago
    Auto-check passed
  • Analyze Codebase

    divar-ir/ai-doc-gen

    Run a multi-agent deep analysis of a codebase, producing AI-readable analysis documents in .ai/docs/ covering structure, dependencies, data flow, request flow, and APIs.

    766 GitHub stars~899 tokensUpdated 2 mo ago
    Auto-check passed

Categories

Questions about Generate Readme

What does Generate Readme do?

Generate or refresh a comprehensive, professional README.md for a repository, with architecture overview, mermaid and optional C4 diagrams, repository structure, dependencies, and API documentation. Generate Readme is an agent skill from divar-ir/ai-doc-gen.md for a repository, with architecture overview, mermaid and optional C4 diagrams, repository structure, dependencies, and API documentation.

When should I use Generate Readme?

Generate Readme fits situations like: the user asks to create; regenerate a README; project documentation; A project overview page — even if they just say document this project.

How do I install Generate Readme in Claude Code?

Run `npx skills add divar-ir/ai-doc-gen --skill generate-readme -a claude-code`. Or copy the skill folder (skills/generate-readme in divar-ir/ai-doc-gen) into .claude/skills/generate-readme in your project. Claude Code loads it when a task matches its description.

How do I install Generate Readme in Codex?

Run `npx skills add divar-ir/ai-doc-gen --skill generate-readme -a codex`. Or copy the skill folder (skills/generate-readme in divar-ir/ai-doc-gen) into .agents/skills/generate-readme in your project. Codex loads it when a task matches its description.

Can I use Generate Readme in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add divar-ir/ai-doc-gen --skill generate-readme -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/generate-readme, .gemini/skills/generate-readme, .github/skills/generate-readme and .opencode/skills/generate-readme in your project.

What does Generate Readme need to run?

SKILL.md names no scripts, command-line tools or credentials: Generate Readme is instructions for the agent only.

Does Generate Readme access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Generate Readme safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Generate Readme use?

Generate Readme is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Generate Readme use?

About 996 tokens (SKILL.md is roughly 4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Generate Readme?

Skills that share tags, products or a category with Generate Readme: Generating Documentation (ancoleman/ai-design-components, 526 stars), Diagram Design (cathrynlavery/diagram-design, 45k stars), Draw.io Diagram Studio (Agents365-ai/drawio-skill, 10k stars) and Code Graph Mermaid Diagrams (trailofbits/skills, 7.4k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Generate Readme?

divar-ir (a GitHub organization) maintains it in divar-ir/ai-doc-gen, which has 766 GitHub stars. The repository holds 3 skills in this directory. The repository was last updated on July 21, 2026.

Source: divar-ir/ai-doc-gen on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.