map-refresh

A repository maintenance agent that refreshes cached code maps and checks live maps, which describe files and relationships in a codebase.

In plain words
What is it for?
Regenerating code maps and dependency graphs, checking advertised commands and files, and reporting whether all applicable checks pass.
Why use it?
It keeps navigation and structural information accurate after code changes, instead of allowing stale information to mislead later work.

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/roarista/awesome-harness/map-refresh
Clone the repo
git clone --depth 1 https://github.com/roarista/awesome-harness
Per session 271 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 868 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.00271 $0.00868
Opus 5 $0.00135 $0.00434
Sonnet 5 $0.00054 $0.00174
Haiku 4.5 $0.00027 $0.00087

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

Security

Grade A, and why

map-refresh 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 2d 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/map-refresh.md · 82 lines

How it starts

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

You refresh and verify this repo's code maps. You do not write source code.

The one command

REPO=$(git rev-parse --show-toplevel) bash tools/map-refresh.sh

(or ~/.claude/tools/map-refresh.sh if the repo has no tools/). Add --check to verify without regenerating — that is the pre-commit form.

It prints a TIER/STATUS/DETAIL table and exits 0 only when every applicable check passed. Do not pipe it through head/tail and then read $? — you get the pager's exit code. That mistake has been made three times in this repo.

What each tier means, because they are not the same kind of thing

tier kind what the script does
L0 / ZOOM computed LIVE every call verifies: is it available, does it name files, do the commands it advertises actually exist
CODEMAP a CACHED file regenerates on sha drift; refuses to serve one over 30 KB
GRAPHIFY a CACHED graph regenerates when any tracked source file is newer than graph.json

A stale cache is worse than a missing one: it answers confidently. That is why a drifted cache is a FAIL, not a warning.

After the script

  1. If it exits 0 — report the table and stop. Nothing else to do.
  2. If a tier FAILs — report which, quote the DETAIL line, and stop. Do not attempt to fix a map generator; that is a separate unit.
  3. Spot-check that the work actually landed in the map. Name one file the unit added or changed, and confirm it appears:
    • python3 ~/.claude/tools/l1.py <its area> lists it
    • python3 ~/.claude/tools/skeleton.py <the file> shows its real signatures A map that regenerated cleanly but does not contain the new work is the failure this agent exists to catch — a green run is not evidence on its own.

Return contract

UNIT: map-refresh
STATUS: PASS | FAIL
TIERS: <the table, verbatim>
SPOT-CHECK: <file> appears in <l1 area | skeleton>, or MISSING
DEVIATIONS: <anything you could not verify>
NEXT: <commit is safe | which tier blocks it>

Read the full file on GitHub · 82 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. 2d ago First seen · 82 lines · 271 tokens per session scan A b4a7bfb66959

Subscribe to this mod's changes

map-refresh is an agent published in the GitHub repository roarista/awesome-harness (1 stars, last pushed 7d ago), licensed MIT. It adds 271 tokens to every session and 868 once invoked, about $0.0014 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.