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 rules/divar-ir/ai-doc-gen/project-overviewgit 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/rules/divar-ir/ai-doc-gen/project-overview)<a href="https://agentmods.dev/rules/divar-ir/ai-doc-gen/project-overview"><img src="https://agentmods.dev/badge/rules/divar-ir/ai-doc-gen/project-overview.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.00811 | $0.00811 |
| Opus 5 | $0.00405 | $0.00405 |
| Sonnet 5 | $0.00162 | $0.00162 |
| Haiku 4.5 | $0.00081 | $0.00081 |
Grade A, and why
project-overview 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 5d 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 — 47 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AI Documentation Generator — Project Overview
Multi-agent Python 3.13 CLI tool (ai-doc-gen) that analyzes codebases with concurrent AI agents and generates documentation: .ai/docs/*.md analyses, README.md, and AI assistant config files (CLAUDE.md, AGENTS.md, .cursor/rules/).
Layout
src/main.py— CLI entry point; commands:analyze,generate readme,generate ai-rules,cronjob analyze. CLI arguments are generated dynamically from Pydantic config models.src/config.py— module-level constants from env vars;ANALYZER_LLM_*andDOCUMENTER_LLM_*are required at import time,AI_RULES_LLM_*falls back to documenter values.src/handlers/— one handler per command (analyze.py,readme.py,ai_rules.py,cronjob.py), all implementAbstractHandler.handle()from @src/handlers/base_handler.py.src/agents/— pydantic-ai agents (analyzer.py,documenter.py,ai_rules_generator.py), Jinja2 prompt templates inprompts/*.yaml, tools intools/.src/utils/—logger.py(singletonLogger, callinit()before use),prompt_manager.py,retry_client.py,worker_pool.py,repo.py,dict.py.skills/+.claude-plugin/— Claude Code skills mirroring the agents; keep in sync when changing agent prompts.
Core patterns
- Handler pattern: handler configs multiple-inherit
BaseHandlerConfig+ agent config, e.g.class AnalyzeHandlerConfig(BaseHandlerConfig, AnalyzerAgentConfig). - Concurrency: 5 analysis agents run through
WorkerPool(semaphore-bounded;ANALYZER_MAX_WORKERS, 0 = CPU count); AI-rules generators useasyncio.gather(return_exceptions=True). - Error isolation: an agent failure is logged and skipped; fail the run only when ALL agents fail (raise
ValueError). - Configuration precedence: Pydantic defaults <
.ai/config.yaml< CLI arguments, merged viamerge_dicts(). - LLM access: OpenAI-compatible only —
OpenAIChatModel+OpenAIProviderwith configurable base URL, wrapped in a retrying HTTP client. Temperature 0.0 everywhere.
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.
- 5d ago First seen · 47 lines · 811 tokens per session scan A d3f703e24cef
project-overview is a cursor rule published in the GitHub repository divar-ir/ai-doc-gen (752 stars, last pushed 1mo ago), licensed MIT. It adds 811 tokens to every session, about $0.0041 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 cursor rules, from other repositories
desktop-commander-default
Prefer Desktop Commander MCP for local filesystem, terminal, process, search, and workspace operations.
conversation-logs
仅当用户贴 32-hex / UUID / 排查包,或明说查产品 AI 失败 / 巡检时读。讨论产品或架构默认不打开。用 logs/dev.jsonl + DB,禁止在文件系统搜文件名。.
doc-governance
文档治理——docs/ 与 rules/ 定位、内容策略、同步规则、命名篇幅。写/改 docs/ 或 .cursor/rules/ 前阅读。.
frontend-preview
改桌面前端组件/样式/布局后想自检渲染效果、或想离线查看某个 AI 态(辩论/派单/升级/审批/计划复核/工具/引用…)时读——#/preview 离线回放 conformance 向量、帧滑块逐帧看流式中间态、pnpm dev:web 纯浏览器跑渲染层、pnpm shoot 无头截图自检、协作图两入口视口探针 shoot:graph-probe、CI 渲染冒烟门禁。别再靠跑真实 AI 看前端效果。.
dev-process
Cursor rule "dev-process" from Lawofall/AgentCore, covering 开发工作流, 新会话冷启动, 决策权限, 设计纪律 and 补丁绊线.
color-tokens
配色 token 规范——写任何颜色(Tailwind 类或 CSS)时参考,只用语义 token、禁硬编码.