Borrowing it
Nothing to install: this file belongs to matteocervelli/llms. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/matteocervelli/llms/main/.claude/skills/map-codebase/SKILL.mdgit clone --depth 1 https://github.com/matteocervelli/llmsWrote 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.
[](https://agentmods.dev/skills/matteocervelli/llms/map-codebase)<a href="https://agentmods.dev/skills/matteocervelli/llms/map-codebase"><img src="https://agentmods.dev/badge/skills/matteocervelli/llms/map-codebase.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00052 | $0.03000 |
| Opus 5 | $0.00026 | $0.01500 |
| Sonnet 5 | $0.00010 | $0.00600 |
| Haiku 4.5 | $0.00005 | $0.00300 |
Grade B, and why
map-codebase scanned grade B 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 3d 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.
Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
find . -type f -not -path './.git/*' -not -path './.claude/*' \ How it starts
The opening of the file, as written. The whole thing — 496 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Map-Codebase Skill
Purpose
When starting work on an existing codebase, Claude must discover its structure, patterns,
and risks reactively — reading files on demand, accumulating context piecemeal. This skill
runs a one-time parallel analysis and persists the results in docs/codebase/ so every
future session loads structured context instead of starting blind.
Not for: greenfield projects you built from scratch (you already know the structure).
Usage
/map-codebase # full analysis (all 7 mappers)
/map-codebase <area> # single mapper focus (e.g. "security", "stack", "test")
/map-codebase --refresh # force re-analysis, even if docs/codebase/ exists
Valid area names: stack, architecture, conventions, security, test, dependency, concerns
Workflow
Step 0: Cache Check
Before spawning any agents, check if a previous map exists:
ls docs/codebase/INDEX.md 2>/dev/null
If INDEX.md exists AND --refresh was NOT passed:
- Display the existing INDEX.md summary to the user
- Ask: "Map exists from . Refresh all, refresh a specific area, or use existing?"
- Proceed only if user asks to refresh
If --refresh or no map exists: proceed to Step 1.
Step 1: Pre-Triage
Before spawning agents, do a 30-second orientation:
# Count files by extension to understand the dominant language
find . -type f -not -path './.git/*' -not -path './.claude/*' \
| sed 's/.*\.//' | sort | uniq -c | sort -rn | head -20
# Check for common entry points
ls -1 {main.py,app.py,index.ts,index.js,main.go,Cargo.toml,pyproject.toml,package.json} 2>/dev/null
# Size check — warn if > 500 files
find . -type f -not -path './.git/*' | wc -l
If > 2000 files: warn the user that analysis will take longer and suggest a focused area.
Step 2: Ensure Output Directory
mkdir -p docs/codebase
Step 3: Spawn Parallel Mapper Agents
For a full analysis, launch all 7 Task agents simultaneously.
For a focused area (/map-codebase security), launch only that agent.
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.
- 3d ago First seen · 496 lines · 52 tokens per session scan B a82d30fa8f64
map-codebase is a skill published in the GitHub repository matteocervelli/llms (25 stars, last pushed 3mo ago), licensed MIT. It adds 52 tokens to every session and 3,000 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other skills, from other repositories
mempalace-task
Create, hand off, claim, execute, and close agent tasks through the MemPalace logstream. Use when the user wants to delegate work, prepare a ready-to-paste task for another agent, receive a MemPalace task id, or explicitly launch a supported headless agent in controlled mode.
neat-freak
Knowledge and governance closeout: reconcile project docs, rule files (CLAUDE.md/AGENTS.md), authorized agent memory, and workspace residue with what the code and runtime actually do, so the next session or the next person starts from one current answer. Trigger when the user names "neat-freak", "洁癖", or "/neat" — and…
gsd-mempalace-capture
File a phase artifact into MemPalace; mirror decision facts into its temporal KG.
md-hive-sync
Munder Difflin hive sync — runs the start-of-task hive protocol steps: reads memory.md, checks inbox/ for new messages, and reminds you to record durable facts in memory.md and write coordination files before ending. Use when asked to "sync with the hive", "check my inbox", "hive status", or "hive sync". Proactively…
commonly
You are a member of a Commonly workspace — a shared space where humans and AI agents from any origin collaborate in pods (chat rooms with memory). Use this whenever you are connected to Commonly via the commonly MCP tools: to read what's happening, post, remember things across sessions, react, DM other agents, and…
github-ops
GitHub CLI for issues, PRs, code search, CI logs, releases, and API queries. Requires gh CLI and auth.