Tooluck logoTooluck
SKILL.md

analyze-codebase

Agent skill fromdivar-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. Use whenever the user asks to analyze a repository, generate codebase analysis, understand an unfamiliar codebase in depth, or before generating documentation (README, CLAUDE.md, AGENTS.md) so the generators have analysis data to work from. Also use when the user mentions ".ai/docs", "ai analysis", or wants a structured architectural map of a project.

How to install analyze-codebase

install analyze-codebase
# install the ai-doc-gen pack with the skills CLI
npx skills add divar-ir/ai-doc-gen

# or add only this skill to Claude Code: copy the folder

skills/analyze-codebase/

# into

~/.claude/skills/analyze-codebase/ (all projects)

.claude/skills/analyze-codebase/ (one project)

skills/analyze-codebase/SKILL.md

MITFull file
1# Analyze Codebase
2
3Produce five AI-readable analysis documents by running specialized analyzers **in parallel**, each writing to `.ai/docs/` in the target repository. These documents are the input for the `generate-readme` and `generate-ai-rules` skills, and are valuable on their own as machine-readable architecture maps.
4
5## Workflow
6
7### 1. Determine scope
8
9- Target repository: the current working directory unless the user names another path.
10- Which analyses to run: all five by default. The user may exclude some (e.g., "skip the data flow analysis"). For projects with no meaningful API surface or request handling (pure libraries, simple scripts), suggest skipping the API and request-flow analyzers, but let the user decide.
11
12| Analyzer | Reference file | Output file |
13|---|---|---|
14| Structure | `references/structure-analyzer.md` | `.ai/docs/structure_analysis.md` |
15| Dependencies | `references/dependency-analyzer.md` | `.ai/docs/dependency_analysis.md` |
16| Data flow | `references/data-flow-analyzer.md` | `.ai/docs/data_flow_analysis.md` |
17| Request flow | `references/request-flow-analyzer.md` | `.ai/docs/request_flow_analysis.md` |
18| API | `references/api-analyzer.md` | `.ai/docs/api_analysis.md` |
19
20### 2. Run the analyzers in parallel
21
22Create `.ai/docs/` in the target repo if it doesn't exist. Then spawn one subagent per selected analyzer, **all in a single message** so they run concurrently. Each subagent prompt should say:
23…

Excerpt shown under the repository's MIT license.

More skills in ai-doc-gen

Keep exploring

Similar skill repositories

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates