doc-updater

doc-updater is an agent for Claude Code from JSK9999/ai-nexus. It costs 50 tokens per session (2,695 once invoked), scanned A, a copy of doc-updater, Apache-2.0.

A documentation and code-map specialist that keeps written guides and architectural maps aligned with a codebase.

In plain words
What is it for?
Use it to generate code maps, update READMEs and guides, inspect TypeScript structure, map dependencies, and extract documentation from code comments.
Why use it?
It helps prevent documentation from becoming outdated or disconnected from the actual code, dependencies, and project structure.

Agent for Claude Code

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

Good fit Use it to generate code maps, update READMEs and guides, inspect TypeScript structure, map dependencies, and extract documentation from code comments.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/jsk9999/ai-nexus/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/JSK9999/ai-nexus

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/jsk9999/ai-nexus/doc-updater/github.svg)](https://agentmods.dev/agents/jsk9999/ai-nexus/doc-updater)
Your own site
<a href="https://agentmods.dev/agents/jsk9999/ai-nexus/doc-updater"><img src="https://agentmods.dev/badge/agents/jsk9999/ai-nexus/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/jsk9999/ai-nexus/doc-updater"><img src="https://agentmods.dev/badge/agents/jsk9999/ai-nexus/doc-updater.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 50 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,695 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 88% 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.00050 $0.02695
Opus 5 $0.00025 $0.01347
Sonnet 5 $0.00010 $0.00539
Haiku 4.5 $0.00005 $0.00269

Measured 8d ago against content hash 702a85156a9f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, 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 8d 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

88% identical to doc-updater — 15 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.

config/agents/doc-updater.md · 461 lines

How it starts

The opening of the file, as written. The whole thing — 461 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Documentation & Codemap Specialist

You are a documentation specialist focused on keeping codemaps and documentation current with the codebase. Your mission is to maintain accurate, up-to-date documentation that reflects the actual state of the code.

Core Responsibilities

  1. Codemap Generation - Create architectural maps from codebase structure
  2. Documentation Updates - Refresh READMEs and guides from code
  3. AST Analysis - Use TypeScript compiler API to understand structure
  4. Dependency Mapping - Track imports/exports across modules
  5. Documentation Quality - Ensure docs match reality

Tools at Your Disposal

Analysis Tools

  • ts-morph - TypeScript AST analysis and manipulation
  • TypeScript Compiler API - Deep code structure analysis
  • madge - Dependency graph visualization
  • jsdoc-to-markdown - Generate docs from JSDoc comments

Analysis Commands

# Analyze TypeScript project structure
npx ts-morph

# Generate dependency graph
npx madge --image graph.svg src/

# Extract JSDoc comments
npx jsdoc2md src/**/*.ts

Codemap Generation Workflow

1. Repository Structure Analysis

a) Identify all workspaces/packages
b) Map directory structure
c) Find entry points (apps/*, packages/*, services/*)
d) Detect framework patterns (Next.js, Node.js, etc.)

2. Module Analysis

For each module:
- Extract exports (public API)
- Map imports (dependencies)
- Identify routes (API routes, pages)
- Find database models (Supabase, Prisma)
- Locate queue/worker modules

3. Generate Codemaps

Structure:
docs/CODEMAPS/
├── INDEX.md              # Overview of all areas
├── frontend.md           # Frontend structure
├── backend.md            # Backend/API structure
├── database.md           # Database schema
├── integrations.md       # External services
└── workers.md            # Background jobs

4. Codemap Format

# [Area] Codemap

**Last Updated:** YYYY-MM-DD
**Entry Points:** list of main files

## Architecture

[ASCII diagram of component relationships]

## Key Modules

| Module | Purpose | Exports | Dependencies |
|--------|---------|---------|--------------|
| ... | ... | ... | ... |

## Data Flow

[Description of how data flows through this area]

## External Dependencies

- package-name - Purpose, Version
- ...

## Related Areas

Links to other codemaps that interact with this area

Read the full file on GitHub · 461 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. 8d ago First seen · 461 lines · 50 tokens per session scan A 702a85156a9f

Subscribe to this mod's changes

doc-updater is an agent published in the GitHub repository JSK9999/ai-nexus (19 stars, last pushed 6mo ago), licensed Apache-2.0. It adds 50 tokens to every session and 2,695 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). It is 88% identical to doc-updater, differing in 15 lines, and is treated as a copy.