map

A repository-orientation tool that reads an unfamiliar codebase and creates or updates an AGENTS.md guide. The guide records entry points, build, test, and lint commands, architecture, important abstractions, and local conventions.

In plain words
What is it for?
Use it to map a whole repository or subsystem, create a concise guide for future coding work, or refresh the guide when the code has changed.
Why use it?
Agents and developers are less likely to edit the wrong layer when they first understand how the repository is structured and operated.

Skill for Claude CodeCodex

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 skills/duthaho/skillhub/map
Any agent
npx skills add duthaho/skillhub --skill map
Clone the repo
git clone --depth 1 https://github.com/duthaho/skillhub

Made for: Claude Code, Codex.

Per session 217 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,974 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.00217 $0.01974
Opus 5 $0.00109 $0.00987
Sonnet 5 $0.00043 $0.00395
Haiku 4.5 $0.00022 $0.00197

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

Security

Grade A, and why

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

.claude/skills/map/SKILL.md · 160 lines

How it starts

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

map — orient the agent to an unfamiliar codebase

/map — map the whole repo into a lean AGENTS.md at its root /map <subsystem> — deep-map one area, into a scoped section /map refresh — re-check an existing map and update only what went stale

Answer one question: what would a competent engineer need to know before touching this repo — and nothing more? The strongest lever in agentic coding isn't a smarter model, it's better orientation: an agent that knows the entry points, the build commands, and the load-bearing conventions makes the right change; one that guesses edits the wrong layer.

Step 0 — Scope, and respect what exists

First, look before generating:

  • Existing agent files? Check for AGENTS.md, CLAUDE.md, .cursor/rules, .github/copilot-instructions.md. If one exists, this is a REFRESH, not a fresh write — read it, and update in place rather than duplicating. If a CLAUDE.md already carries the knowledge, offer to have AGENTS.md @import it instead of restating it. If the existing map carries a stamp and HEAD has moved past it, state the drift in one line when naming the mode — "map is N commits behind (touched: X, Y)" via git rev-list --count + git diff --stat over <stamped-commit>..HEAD — and offer the refresh unless this run already is one. A stamp that no longer resolves (rebase, shallow clone) is itself the staleness signal: report it and offer a fresh map. Staleness surfaces at every touch, never only when someone remembers /map refresh.
  • Size the repo (git ls-files | wc -l, top-level layout) to scale the fan-out: a small repo maps in one pass inline; a large or polyglot one gets the full parallel sweep below.
  • A subsystem argument (/map the payment flow) narrows every step to that area and produces a scoped section, not a whole-repo rewrite.

State which mode you picked (NEW / REFRESH / FOCUS) and why.

Step 1 — Fan out along the read-first order

Dispatch read-only Explore sub-agents — one per lens — navigating by grep/glob/read and following imports (no embeddings, no pre-index; always fresh). This is the order practitioners converge on; run the lenses concurrently:

Read the full file on GitHub · 160 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 · 160 lines · 217 tokens per session scan A f86ccb26a22a

Subscribe to this mod's changes

map is a skill published in the GitHub repository duthaho/skillhub (9 stars, last pushed 9d ago), licensed MIT. It adds 217 tokens to every session and 1,974 once invoked, about $0.0011 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.