Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/divar-ir/ai-doc-gen/analyze-codebasenpx skills add divar-ir/ai-doc-gen --skill analyze-codebasegit clone --depth 1 https://github.com/divar-ir/ai-doc-genWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/divar-ir/ai-doc-gen/analyze-codebase)<a href="https://agentmods.dev/skills/divar-ir/ai-doc-gen/analyze-codebase"><img src="https://agentmods.dev/badge/skills/divar-ir/ai-doc-gen/analyze-codebase.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00113 | $0.00778 |
| Opus 5 | $0.00056 | $0.00389 |
| Sonnet 5 | $0.00023 | $0.00156 |
| Haiku 4.5 | $0.00011 | $0.00078 |
Grade A, and why
analyze-codebase scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 45 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Analyze Codebase
Produce 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.
Workflow
1. Determine scope
- Target repository: the current working directory unless the user names another path.
- 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.
| Analyzer | Reference file | Output file |
|---|---|---|
| Structure | references/structure-analyzer.md |
.ai/docs/structure_analysis.md |
| Dependencies | references/dependency-analyzer.md |
.ai/docs/dependency_analysis.md |
| Data flow | references/data-flow-analyzer.md |
.ai/docs/data_flow_analysis.md |
| Request flow | references/request-flow-analyzer.md |
.ai/docs/request_flow_analysis.md |
| API | references/api-analyzer.md |
.ai/docs/api_analysis.md |
2. Run the analyzers in parallel
Create .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:
Read the instructions at
<absolute path to this skill's references/<analyzer>.md>and follow them exactly for the repository at<absolute repo path>. Explore the codebase with your file tools as needed. Write your complete analysis to<absolute repo path>/.ai/docs/<output file>, following the exact output format in the instructions. In the written file, refer to files by repo-relative paths (e.g.src/main.py, not absolute paths) so the document is portable. Return a one-paragraph summary of what you found.
Failures are isolated: if one analyzer fails, the others' results still count. Retry a failed analyzer once; if it fails again, note it in the final report and move on. Only treat the run as failed if every analyzer fails.
What ships with it
5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 4d ago First seen · 45 lines · 113 tokens per session scan A c4b9e81d6eab
analyze-codebase is a skill published in the GitHub repository divar-ir/ai-doc-gen (753 stars, last pushed 1mo ago), licensed MIT. It adds 113 tokens to every session and 778 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
knowledge-base
Create and maintain a Markdown knowledge base that any AI agent can read, search, and update. Use when the user wants to start a knowledge base, add or update notes, organize docs/notes for an agent or LLM to consume, build an index of notes, or run a cleanup/maintenance pass on an existing MD knowledge base. Triggers…
obsidian-vault
Organize Obsidian vaults with MOCs, wikilinks, frontmatter/properties, dashboards, orphan-note checks, and cleanup workflows. Use ONLY when the user explicitly refers to Obsidian — by naming "Obsidian", an Obsidian "vault", or an Obsidian-specific feature such as wikilinks ("[[ ]]"), the Dataview or Bases plugins, or…
wiki_submit
Submit wiki documentation pages to Wegent backend API. Simplifies the HTTP POST process for wiki content submission.
company-product-context
Compiles comprehensive company product context from PDF documents, web research, and industry knowledge.
codebase-context-extractor
This skill provides a comprehensive context extraction system for large codebases. It intelligently analyzes code structure, dependencies, and relationships to extract relevant context for understanding, debugging, or modifying code.
skill-creator
Generates Anthropic Skills with complete workflow including GitHub PR creation and local download verification.