Skip to main content
command CX Codex

update-codemaps — Claude Code command: what it does, how to install

The update-codemaps command examines a project’s structure and refreshes architecture maps in codemaps/. Use it when code changes need matching documentation.

MIT ★ 880 updated 2026-09-03

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/commands/update-codemaps.md
Open on GitHub

What update-codemaps does

update-codemaps scans source files to trace imports, exports, and dependencies. It then creates or refreshes four focused documents: codemaps/architecture.md for the overall design, codemaps/backend.md, codemaps/frontend.md, and codemaps/data.md for data models and schemas. The maps describe the system at a high level rather than documenting implementation details.

The analysis uses TypeScript and Node.js. The command can work with Read, Write, Glob, and Bash; it also compares the current state with the previous maps, adds a freshness timestamp, and writes .reports/codemap-diff.txt. A change level above 30% triggers a user approval request, so a large rewrite waits for a decision instead of proceeding immediately.

What it helps with

  • map the project’s overall architecture
  • document backend and frontend structure
  • record data models and schemas
  • measure changes against the previous codemaps

Example prompts for the agent

  • Run /update-codemaps to refresh the project architecture maps.
  • Scan the imports and dependencies, then update codemaps/architecture.md and the other codemaps.
  • Compare the current structure with the previous version and save the result to .reports/codemap-diff.txt.

How to install update-codemaps

Manually: put the files in place

.claude/commands/update-codemaps.md

Call it with /update-codemaps. For all projects use ~/.claude/commands/

Questions about update-codemaps

How do I install update-codemaps in Claude Code?

Place the command file at .claude/commands/update-codemaps.md.

What does update-codemaps do?

It inspects source structure, imports, exports, and dependencies, then updates the architecture documents in codemaps/ and records the diff report.

What happens when the change is above 30%?

The command asks for user approval before updating the codemaps. The comparison uses the previous version as its baseline.

Source text

update-codemaps.md · MIT
---
description: Analyze codebase structure and update architecture documentation in codemaps/
allowed-tools: Read, Write, Glob, Bash
---

# Update Codemaps

Analyze the codebase structure and update architecture documentation:

1. Scan all source files for imports, exports, and dependencies
2. Generate token-lean codemaps in the following format:
   - codemaps/architecture.md - Overall architecture
   - codemaps/backend.md - Backend structure  
   - codemaps/frontend.md - Frontend structure
   - codemaps/data.md - Data models and schemas

3. Calculate diff percentage from previous version
4. If changes > 30%, request user approval before updating
5. Add freshness timestamp to each codemap
6. Save reports to .reports/codemap-diff.txt

Use TypeScript/Node.js for analysis. Focus on high-level structure, not implementation details.

© sangrokjung · MIT · sangrokjung/claude-forge

Similar slash commands

All slash commands for Writing and docs →

From the same set44

The whole set →

Project sponsors

Companies that keep this analytics open