# Generate Readme

Generate or refresh a comprehensive, professional README.md for a repository, with...

- Repository: https://github.com/divar-ir/ai-doc-gen (768 stars)
- Category: Writing
- License: MIT
- Last updated: 2026-07-21
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add divar-ir/ai-doc-gen --skill generate-readme -g -a claude-code -y`
Codex: `npx skills add divar-ir/ai-doc-gen --skill generate-readme -g -a codex -y`
Cursor: `npx skills add divar-ir/ai-doc-gen --skill generate-readme -g -a cursor -y`
Gemini CLI: `npx skills add divar-ir/ai-doc-gen --skill generate-readme -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add divar-ir/ai-doc-gen`

## 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".

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

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

The rest: https://github.com/divar-ir/ai-doc-gen/blob/HEAD/skills/generate-readme/SKILL.md
