doc-updater

doc-updater is an agent for Claude Code from zhukunpenglinyutong/ai-max. It costs 45 tokens per session (3,021 once invoked), scanned A, a copy of doc-updater, MIT.

An AI agent that keeps a project's documentation and code maps aligned with its source code. A code map is a guide to the project's folders, modules, dependencies, routes, and data flow.

In plain words
What is it for?
Running the project's documentation-update commands, generating files under docs/CODEMAPS, and documenting frontend, backend, database, integration, and worker areas.
Why use it?
It helps prevent README files, guides, and architecture documents from becoming inaccurate as the code changes.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: model in frontmatter.

Good fit Running the project's documentation-update commands, generating files under docs/CODEMAPS, and documenting frontend, backend, database, integration, and worker areas.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/zhukunpenglinyutong/ai-max/doc-updater
Install

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.

Clone the repo
git clone --depth 1 https://github.com/zhukunpenglinyutong/ai-max

Made for: Claude Code.

Wrote 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.

agentmods badge for doc-updater

README.md
[![agentmods](https://agentmods.dev/badge/agents/zhukunpenglinyutong/ai-max/doc-updater/github.svg)](https://agentmods.dev/agents/zhukunpenglinyutong/ai-max/doc-updater)
Your own site
<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.

agentmods 80×15 button for doc-updater

Your own site · 80×15
<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>
Per session 45 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,021 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin 89% copy Near-identical to another mod in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00045 $0.03021
Opus 5 $0.00023 $0.01510
Sonnet 5 $0.00009 $0.00604
Haiku 4.5 $0.00005 $0.00302

Measured 11d ago against content hash e8657400f472, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

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 11d 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'
Origin

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.

agents/doc-updater.md · 453 lines

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.

文档和代码地图专家

你是一位专注于保持代码地图和文档与代码库同步的文档专家。你的使命是维护准确、最新的文档,反映代码的实际状态。

核心职责

  1. 代码地图生成 - 从代码库结构创建架构地图
  2. 文档更新 - 从代码刷新 README 和指南
  3. AST 分析 - 使用 TypeScript 编译器 API 理解结构
  4. 依赖映射 - 跟踪模块间的导入/导出
  5. 文档质量 - 确保文档与现实匹配

可用工具

分析工具

  • 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 - 样式

Read the full file on GitHub · 453 lines

Changes

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.

  1. 11d ago First seen · 453 lines · 45 tokens per session scan A e8657400f472

Subscribe to this mod's changes

doc-updater is an agent published in the GitHub repository zhukunpenglinyutong/ai-max (335 stars, last pushed 7mo ago), licensed MIT. It adds 45 tokens to every session and 3,021 once invoked, about $0.0002 per session on Opus 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.

Related

Other agents, from other repositories

project-implementer

Implementation specialist - executes tasks from plans with TDD methodology, writes tests, and validates acceptance criteria. Use for executing phased implementation plans generated by attune:plan.

athola/claude-night-market · 38 tokens

scrum-master

Scrum Master agent (Bob) — generates story files from Epic Manifest rows and the delivery file.

LuisFelipeMoro/Harness-devkit · 24 tokens

onboard-guide

Onboarding assistant that provides ongoing personalized guidance after initial /onboard. Use for questions about conventions, architecture, patterns, or "where do I put this?" — answers are tailored to the engineer's background.

smicolon/ai-kit · 46 tokens

jira-analyst

Read full Jira ticket context (description, comments, attachments, links, media) and produce structured analysis suitable for posting back as a Jira comment. Read-only via the jira-as CLI wrapper. Routed by mk:jira-analyst skill. NOT for complexity scoring (jira-evaluator); NOT for story-point estimation…

ngocsangyem/MeowKit · 72 tokens

pm-advisor

You are pm-advisor — great-pm's external-perspective product advisor. You are NOT a process reviewer. You are the seasoned operator the founder pulls aside and says: "Be honest — what do you actually think of this?".

VandanaAjayDubey111/great-pm · 123 tokens

goals-onboarding

Use this agent to set up the OKR/goals system for a new company or project. Guides the user through defining annual objectives, key results, team quarterly OKRs, initiatives, tasks, support functions, and org chart. Generates YAML files following the workspace goals schema. Examples: Context: User wants to set up…

41fred/ace-level1 · 206 tokens