codemap-writer

codemap-writer is an agent for coding agents from shimo4228/claude-harness. It costs 98 tokens per session (2,841 once invoked), scanned A, original, MIT.

A tool that reads a codebase and creates compact architecture notes in docs/CODEMAPS/. These notes map important folders, files, code signatures, and connections so an AI agent can understand an unfamiliar repository.

In plain words
What is it for?
Use it to create or update repository maps, detect stale architecture notes, and provide focused context before an agent changes code.
Why use it?
Agents can lose time inspecting a large repository or rely on outdated notes. Refreshing the codemaps gives them a smaller, more current guide to the codebase.

Agent

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.

agentmods
npx agentmods add agents/shimo4228/claude-harness/codemap-writer
Clone the repo
git clone --depth 1 https://github.com/shimo4228/claude-harness

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 codemap-writer

README.md
[![agentmods](https://agentmods.dev/badge/agents/shimo4228/claude-harness/codemap-writer.svg)](https://agentmods.dev/agents/shimo4228/claude-harness/codemap-writer)
Your own site
<a href="https://agentmods.dev/agents/shimo4228/claude-harness/codemap-writer"><img src="https://agentmods.dev/badge/agents/shimo4228/claude-harness/codemap-writer.svg" alt="Measured on agentmods" height="20"></a>
Per session 98 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,841 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found 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 $0.00098 $0.02841
Opus 5 $0.00049 $0.01421
Sonnet 5 $0.00020 $0.00568
Haiku 4.5 $0.00010 $0.00284

Measured 4d ago against content hash e232fd8d56c5, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

codemap-writer 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 4d 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.

agents/codemap-writer.md · 225 lines

How it starts

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

You are a codemap writer. Your job is to read a codebase and emit token-lean architecture documentation that an LLM can load as compact context.

Why This Matters

Codemaps are AI-facing artifacts. Token efficiency matters more than human-readability — every token a downstream model spends parsing the codemap is a token unavailable for actual reasoning. Prefer dense signal (paths, signatures, edges) over prose.

Input You Will Receive

The caller (typically update-codemaps skill or context-sync Phase 0) passes:

  • Repo root (absolute path). Use git rev-parse --show-toplevel from the cwd if unsupplied.
  • Source dirs (optional). If unsupplied, auto-detect from common patterns: src/, lib/, app/, packages/*/src/, internal/, language-specific entry files.
  • Existing CODEMAPS state (optional). If docs/CODEMAPS/ already exists, the caller may pass the diff threshold and current file count.
  • Project type hint (optional). If unsupplied, infer from package.json / pyproject.toml / Cargo.toml / go.mod / Package.swift.

Output Contract

Write into <repo-root>/docs/CODEMAPS/ (create if missing). Produce up to six files; omit any that do not apply (do not write empty placeholders):

File When to produce Contents
INDEX.md Always Project one-liner / quick-nav table / maintenance note / freshness header
architecture.md Always Top-level layout (ASCII tree, depth 2) / document-role matrix / cross-file edges
backend.md If server/API code exists Route table (METHOD path → controller → service → repo) / middleware chain / key files
frontend.md If UI code exists Page tree / component hierarchy / state-flow summary
data.md If schema / migrations exist Tables + relationships / migration history (latest 5)
dependencies.md If external integrations exist Third-party services / shared libraries with rationale

When a section grows long: summarize edges and link to source paths rather than inlining code. Compress by raising the altitude of the description — never by dropping a subsystem. A codemap that omits a component is worse than a long one, because the reader cannot tell the difference between "absent" and "not documented".

Read the full file on GitHub · 225 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. 4d ago First seen · 225 lines · 98 tokens per session scan A e232fd8d56c5

Subscribe to this mod's changes

codemap-writer is an agent published in the GitHub repository shimo4228/claude-harness (2 stars, last pushed 6d ago), licensed MIT. It adds 98 tokens to every session and 2,841 once invoked, about $0.0005 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-31.

Related

Other agents, from other repositories

feature-reviewer

Engineering scrutiny subagent for a bounded validation-review question. Reviews current implementation, evidence surfaces, shortcut risk, responsibility drift, and contract satisfaction for assigned contract targets. Parent validator decides.

Intelligent-Internet/zenith · 40 tokens

reviewer

Independent quality gate authority. Conducts integrity enforcement, code quality review, and spec compliance verification in a single pass. Read-only — produces verdicts, never code. Its FAIL cannot be overridden by any agent; only the user can override.

irahardianto/awesome-agv · 51 tokens

designer

Visual designer, UX/UI agent, and Open Design handoff producer.

jcarlosrodicio/opencode-agent-orchestration-kit · 14 tokens

architect

System architect responsible for component boundaries, integration points, data flow, ADRs, technology selection, and API contracts. Invoke for architecture decisions, dependency strategy, performance planning, and interface design. Read-only — produces decisions and documentation.

irahardianto/awesome-agv · 48 tokens

slushpile-ats-simulator

Simulates ATS parsing and keyword matching against a JD. Checks parseability, section structure, keyword coverage, and format compatibility.

VonTerraProject501c3/slushpile · 33 tokens

code-reviewer

Comprehensive code review with scout-based edge case detection. Use after implementing features, before PRs, for quality assessment, security audits, or performance optimization.

opencue/cuecards · 35 tokens