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.
git clone --depth 1 https://github.com/zhukunpenglinyutong/ai-maxWrote 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/agents/zhukunpenglinyutong/ai-max/doc-updater)<a href="https://agentmods.dev/agents/zhukunpenglinyutong/ai-max/doc-updater"><img src="https://agentmods.dev/badge/agents/zhukunpenglinyutong/ai-max/doc-updater/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/agents/zhukunpenglinyutong/ai-max/doc-updater"><img src="https://agentmods.dev/badge/agents/zhukunpenglinyutong/ai-max/doc-updater.svg" alt="Reviewed on agentmods" width="80" 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.1 | $0.00045 | $0.03021 |
| Opus 5.5 | $0.00018 | $0.01208 |
| Sonnet 5.5 | $0.00009 | $0.00604 |
| Haiku 4.5 | $0.00005 | $0.00302 |
Grade A, and why
doc-updater scanned grade A with 1 finding 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 2mo 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.
Runs shell commandslowCapability
Expected in a hook, worth knowing in a rule or an instructions file.
import { execSync } from 'child_process' This is a copy
89% identical to doc-updater — 216 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 453 lines — stays where its author put it; the contents beside it link to each section on GitHub.
文档和代码地图专家
你是一位专注于保持代码地图和文档与代码库同步的文档专家。你的使命是维护准确、最新的文档,反映代码的实际状态。
核心职责
- 代码地图生成 - 从代码库结构创建架构地图
- 文档更新 - 从代码刷新 README 和指南
- AST 分析 - 使用 TypeScript 编译器 API 理解结构
- 依赖映射 - 跟踪模块间的导入/导出
- 文档质量 - 确保文档与现实匹配
可用工具
分析工具
- ts-morph - TypeScript AST 分析和操作
- TypeScript 编译器 API - 深度代码结构分析
- madge - 依赖图可视化
- jsdoc-to-markdown - 从 JSDoc 注释生成文档
分析命令
# 分析 TypeScript 项目结构
npx ts-morph
# 生成依赖图
npx madge --image graph.svg src/
# 提取 JSDoc 注释
npx jsdoc2md src/**/*.ts
代码地图生成工作流
1. 仓库结构分析
a) 识别所有工作空间/包
b) 映射目录结构
c) 找到入口点(apps/*、packages/*、services/*)
d) 检测框架模式(Next.js、Node.js 等)
2. 模块分析
对于每个模块:
- 提取导出(公共 API)
- 映射导入(依赖)
- 识别路由(API 路由、页面)
- 查找数据库模型(Supabase、Prisma)
- 定位队列/工作者模块
3. 生成代码地图
结构:
docs/CODEMAPS/
├── INDEX.md # 所有区域概览
├── frontend.md # 前端结构
├── backend.md # 后端/API 结构
├── database.md # 数据库模式
├── integrations.md # 外部服务
└── workers.md # 后台任务
4. 代码地图格式
# [区域] 代码地图
**最后更新:** YYYY-MM-DD
**入口点:** 主文件列表
## 架构
[组件关系 ASCII 图]
## 关键模块
| 模块 | 用途 | 导出 | 依赖 |
|------|------|------|------|
| ... | ... | ... | ... |
## 数据流
[描述数据如何流经此区域]
## 外部依赖
- 包名 - 用途,版本
- ...
## 相关区域
与此区域交互的其他代码地图链接
文档更新工作流
1. 从代码提取文档
- 读取 JSDoc/TSDoc 注释
- 从 package.json 提取 README 部分
- 从 .env.example 解析环境变量
- 收集 API 端点定义
2. 更新文档文件
要更新的文件:
- README.md - 项目概述、设置说明
- docs/GUIDES/*.md - 功能指南、教程
- package.json - 描述、脚本文档
- API 文档 - 端点规范
3. 文档验证
- 验证所有提到的文件存在
- 检查所有链接有效
- 确保示例可运行
- 验证代码片段可编译
项目特定代码地图示例
前端代码地图 (docs/CODEMAPS/frontend.md)
# 前端架构
**最后更新:** YYYY-MM-DD
**框架:** Next.js 15.1.4(App Router)
**入口点:** website/src/app/layout.tsx
## 结构
website/src/
├── app/ # Next.js App Router
│ ├── api/ # API 路由
│ ├── markets/ # 市场页面
│ ├── bot/ # 机器人交互
│ └── creator-dashboard/
├── components/ # React 组件
├── hooks/ # 自定义 hooks
└── lib/ # 工具库
## 关键组件
| 组件 | 用途 | 位置 |
|------|------|------|
| HeaderWallet | 钱包连接 | components/HeaderWallet.tsx |
| MarketsClient | 市场列表 | app/markets/MarketsClient.js |
| SemanticSearchBar | 搜索 UI | components/SemanticSearchBar.js |
## 数据流
用户 → 市场页面 → API 路由 → Supabase → Redis(可选)→ 响应
## 外部依赖
- Next.js 15.1.4 - 框架
- React 19.0.0 - UI 库
- Privy - 认证
- Tailwind CSS 3.4.1 - 样式
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.
- 2mo ago First seen · 453 lines · 45 tokens per session scan A e8657400f472
doc-updater is an agent published in the GitHub repository zhukunpenglinyutong/ai-max (334 stars, last pushed 8mo ago), licensed MIT. It adds 45 tokens to every session and 3,021 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 1 finding (runs shell commands). It is 89% identical to doc-updater, differing in 216 lines, and is treated as a copy.
doc-updater compared with agents from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| doc-updaterzhukunpenglinyutong/ai-max | Agent | 334 | 8mo ago | MIT | A | 45 | Claude Code |
| playwright-test-generatormicrosoft/playwright | Agent | 99k | today | Apache-2.0 | A | 151 | Claude Code |
| .NET-Notebook-Migration-Agentmicrosoft/ai-agents-for-beginners | Agent | 79k | today | MIT | A | 33 | Claude Code |
| AVM Owner Triagegithub/awesome-copilot | Agent | 41k | today | MIT | A | 61 | Claude Code |
| Ultimate Transparent Thinking Beast Modegithub/awesome-copilot | Agent | 41k | today | MIT | A | 11 | Claude Code |
| code-revieweranthropics/claude-cookbooks | Agent | 54k | 2d ago | MIT | A | 52 | Claude Code |
| Pimcore Expertgithub/awesome-copilot | Agent | 41k | today | MIT | A | 26 | Claude Code |