analyze-codebase
Run a multi-agent deep analysis of a codebase, producing AI-readable analysis documents in .ai/docs/ covering structure, dependencies, data flow, request flow,…
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,
$ npx -y skills add divar-ir/ai-doc-gen --skill generate-ai-rules --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/generate-ai-rulesContext preview
The summary Claude sees to decide when to auto-load this skill.
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,
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.
Repo: 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,…
Generate or refresh a comprehensive, professional README.md for a repository, with architecture overview, mermaid and optional C4 diagrams, repository…