analyze-codebase
Run a multi-agent deep analysis of a codebase, producing AI-readable analysis documents in .ai/docs/ covering structure,…
Generate AI assistant configuration files for a repository — CLAUDE.md, AGENTS.md, and Cursor rules (.cursor/rules/*.mdc) — from codebase analysis. Use whenever the user wants to create or update CLAUDE.md, AGENTS.md, agent rules, Cursor rules, AI coding assistant configuration,
Claude Code
$ npx -y skills add divar-ir/ai-doc-gen --skill generate-ai-rules --agent claude-code
Codex
$ npx skills add divar-ir/ai-doc-gen --skill generate-ai-rules -a codex -y
Cursor
$ npx skills add divar-ir/ai-doc-gen --skill generate-ai-rules -a cursor -y
Gemini CLI
$ npx skills add divar-ir/ai-doc-gen --skill generate-ai-rules -a gemini-cli -y
GitHub Copilot
$ npx skills add divar-ir/ai-doc-gen --skill generate-ai-rules -a github-copilot -y
OpenCode
$ npx skills add divar-ir/ai-doc-gen --skill generate-ai-rules -a opencode -y
Windsurf
$ npx skills add divar-ir/ai-doc-gen --skill generate-ai-rules -a windsurf -y
name: generate-ai-rules description: Generate AI assistant configuration files for a repository — CLAUDE.md, AGENTS.md, and Cursor rules (.cursor/rules/*.mdc) — from codebase analysis. Use whenever the user wants to create or update CLAUDE.md, AGENTS.md, agent rules, Cursor rules, AI coding assistant configuration, or "onboard AI tools" to a project, even if they only mention one of the file types.
Generate configuration files that help AI coding assistants work effectively with a codebase. Three targets, generated from the same analysis so they stay consistent:
1. **AGENTS.md** — the cross-tool standard (agents.md), read by most AI coding tools including Claude Code, Cursor, Codex, and Gemini CLI. 2. **CLAUDE.md** — Claude Code's project instructions file. 3. **.cursor/rules/*.mdc** — Cursor's scoped project rules.
Shared principles for all targets:
The primary file — write it first, and write it best. Target well under 150 lines.
Claude Code reads AGENTS.md natively, so avoid duplicating content between the two files. Pick based on what exists and what the user wants:
Generate 2–3 focused, composable rule files in MDC format (markdown with YAML frontmatter):
--- description: Brief description of what this rule covers globs: - "src/**/*.py" alwaysApply: false --- # Rule Title Content...
Keep each file to 50–100 lines. Rules should be prescriptive and project-specific, with short code examples from the actual codebase. Reference files with `@path` syntax where helpful. If a legacy `.cursorrules` file exists, migrate its still-valid content into the new files and tell the user the legacy file can be removed.
When updating rather than creating:
List the files written, their line counts, and anything you left out or couldn't verify. If the repo's docs and reality diverged notably, mention it — that's a signal the team should know.
An AI-powered code documentation generator that automatically analyzes repositories and creates comprehensive documentation using large language models.
Run a multi-agent deep analysis of a codebase, producing AI-readable analysis documents in .ai/docs/ covering structure,…
Generate or refresh a comprehensive, professional README.md for a repository, with architecture overview, mermaid and optional C4…
How to work in a Codebase Wiki project (the `codebase-wiki` starter pack): an agent-authored, source-grounded wiki of the…
Simulates academic peer review, evaluating papers across Originality, Methodology, Results, and Writing to provide Major/Minor…