# AI Doc Gen

> Have your agent map a codebase, then write its README, CLAUDE.md, AGENTS.md and Cursor rules from that analysis.

AI Doc Gen is Divar's open-source documentation generator for codebases. As a set of agent skills, it has your agent run a multi-agent analysis of a repository and then write documentation and AI-assistant instructions from what it found.

What you can do with it
- Analyze a repository with parallel analyzers for code structure, dependencies, data flow, request flow and APIs, saved as documents in .ai/docs/
- Generate or refresh a README with an architecture overview, Mermaid diagrams (optionally C4), the repository structure, dependencies and API documentation
- Generate CLAUDE.md, AGENTS.md and Cursor rules (.cursor/rules/*.mdc) so coding agents start with the right context
- Get a structured architectural map of a project you don't know yet

How it connects
- In Claude Code, run /plugin marketplace add divar-ir/ai-doc-gen, then /plugin install ai-doc-gen@divar. The skills need no API keys or Python setup.
- The repository is also a Python CLI (ai-doc-gen) that works with any OpenAI-compatible model, and can run on a schedule to open merge requests on recently active GitLab projects.

Good to know
- It writes its analysis to .ai/docs/ and the generated files to your repository root, so review the changes before you commit them.
- It's open source under the MIT licence.

- Type: Skill
- Made by: divar-ir
- Category: Writing
- Formats: Skills, Claude plugins
- Version: latest
- Website: https://github.com/divar-ir/ai-doc-gen
- Source: https://github.com/divar-ir/ai-doc-gen
- Page: https://pluginboard.ai/skills/ai-doc-gen

## Works with

- ChatGPT
- Claude
- Gemini
- GitHub Copilot
- Cursor
- Claude Code
- Codex
- Antigravity
- Gemini CLI
- Replit
- OpenClaw
- OpenCode
- Hermes Agent

## Install

### ChatGPT

In ChatGPT: Download the ai-doc-gen folder and zip it, then Plugins → Skills → Create → Upload from your computer. Business and Enterprise plans.

View the skills on GitHub: https://github.com/divar-ir/ai-doc-gen

### Claude

In Claude (web or desktop): Download each skill’s folder and zip it, then upload them one at a time in Customize → Skills.

View the skills on GitHub: https://github.com/divar-ir/ai-doc-gen

### Gemini

In Gemini: Download the ai-doc-gen folder, then at gemini.google.com click Customize → Skills → Create → Upload and pick the folder (or a .zip of it).

View the skills on GitHub: https://github.com/divar-ir/ai-doc-gen

### GitHub Copilot

Copy all 3 skills, in your terminal:

```shell
npx -y degit divar-ir/ai-doc-gen/skills/analyze-codebase ~/.copilot/skills/analyze-codebase
npx -y degit divar-ir/ai-doc-gen/skills/generate-ai-rules ~/.copilot/skills/generate-ai-rules
npx -y degit divar-ir/ai-doc-gen/skills/generate-readme ~/.copilot/skills/generate-readme
```

View the skills on GitHub: https://github.com/divar-ir/ai-doc-gen

### Cursor

Copy all 3 skills, in your terminal:

```shell
npx -y degit divar-ir/ai-doc-gen/skills/analyze-codebase ~/.cursor/skills/analyze-codebase
npx -y degit divar-ir/ai-doc-gen/skills/generate-ai-rules ~/.cursor/skills/generate-ai-rules
npx -y degit divar-ir/ai-doc-gen/skills/generate-readme ~/.cursor/skills/generate-readme
```

View the skills on GitHub: https://github.com/divar-ir/ai-doc-gen

### Claude Code

In Claude Code, as a plugin:

```text
/plugin marketplace add divar-ir/ai-doc-gen
/plugin install ai-doc-gen@divar
```

Copy all 3 skills, in your terminal:

```shell
npx -y degit divar-ir/ai-doc-gen/skills/analyze-codebase ~/.claude/skills/analyze-codebase
npx -y degit divar-ir/ai-doc-gen/skills/generate-ai-rules ~/.claude/skills/generate-ai-rules
npx -y degit divar-ir/ai-doc-gen/skills/generate-readme ~/.claude/skills/generate-readme
```

View the skills on GitHub: https://github.com/divar-ir/ai-doc-gen

### Codex

Copy all 3 skills, in your terminal:

```shell
npx -y degit divar-ir/ai-doc-gen/skills/analyze-codebase ~/.agents/skills/analyze-codebase
npx -y degit divar-ir/ai-doc-gen/skills/generate-ai-rules ~/.agents/skills/generate-ai-rules
npx -y degit divar-ir/ai-doc-gen/skills/generate-readme ~/.agents/skills/generate-readme
```

View the skills on GitHub: https://github.com/divar-ir/ai-doc-gen

### Antigravity

In Antigravity: Copy the ai-doc-gen folder into ~/.gemini/config/skills (Antigravity app and IDE) or ~/.gemini/antigravity-cli/skills (Antigravity CLI).

View the skills on GitHub: https://github.com/divar-ir/ai-doc-gen

### Gemini CLI

Copy all 3 skills, in your terminal:

```shell
npx -y degit divar-ir/ai-doc-gen/skills/analyze-codebase ~/.gemini/skills/analyze-codebase
npx -y degit divar-ir/ai-doc-gen/skills/generate-ai-rules ~/.gemini/skills/generate-ai-rules
npx -y degit divar-ir/ai-doc-gen/skills/generate-readme ~/.gemini/skills/generate-readme
```

View the skills on GitHub: https://github.com/divar-ir/ai-doc-gen

### Replit

Copy all 3 skills, in your terminal:

```shell
npx -y degit divar-ir/ai-doc-gen/skills/analyze-codebase .agents/skills/analyze-codebase
npx -y degit divar-ir/ai-doc-gen/skills/generate-ai-rules .agents/skills/generate-ai-rules
npx -y degit divar-ir/ai-doc-gen/skills/generate-readme .agents/skills/generate-readme
```

View the skills on GitHub: https://github.com/divar-ir/ai-doc-gen

### OpenClaw

Copy all 3 skills, in your terminal:

```shell
npx -y degit divar-ir/ai-doc-gen/skills/analyze-codebase ~/.openclaw/skills/analyze-codebase
npx -y degit divar-ir/ai-doc-gen/skills/generate-ai-rules ~/.openclaw/skills/generate-ai-rules
npx -y degit divar-ir/ai-doc-gen/skills/generate-readme ~/.openclaw/skills/generate-readme
```

View the skills on GitHub: https://github.com/divar-ir/ai-doc-gen

### OpenCode

Copy all 3 skills, in your terminal:

```shell
npx -y degit divar-ir/ai-doc-gen/skills/analyze-codebase ~/.config/opencode/skills/analyze-codebase
npx -y degit divar-ir/ai-doc-gen/skills/generate-ai-rules ~/.config/opencode/skills/generate-ai-rules
npx -y degit divar-ir/ai-doc-gen/skills/generate-readme ~/.config/opencode/skills/generate-readme
```

View the skills on GitHub: https://github.com/divar-ir/ai-doc-gen

### Hermes Agent

Copy all 3 skills, in your terminal:

```shell
npx -y degit divar-ir/ai-doc-gen/skills/analyze-codebase ~/.hermes/skills/analyze-codebase
npx -y degit divar-ir/ai-doc-gen/skills/generate-ai-rules ~/.hermes/skills/generate-ai-rules
npx -y degit divar-ir/ai-doc-gen/skills/generate-readme ~/.hermes/skills/generate-readme
```

View the skills on GitHub: https://github.com/divar-ir/ai-doc-gen

---
From Pluginboard (https://pluginboard.ai).
