llms: Skill for Claude Code

.claude/skills/map-codebase/SKILL.md

map-codebase is a skill for Claude Code from matteocervelli/llms. It costs 52 tokens per session (3,000 once invoked), scanned B, original, MIT.

A codebase mapping tool that examines an existing project from several angles and saves a structured summary for later sessions.

In plain words
What is it for?
Use it when joining a brownfield project or when you need an overview of its architecture, technology stack, security, tests, dependencies, or concerns.
Why use it?
It reduces the time spent repeatedly discovering folders, conventions, dependencies, tests, and risks in an unfamiliar project.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions subagents.

This is matteocervelli/llms's own configuration. It tells Claude Code how to work on llms itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything llms configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/matteocervelli/llms/main/.claude/skills/map-codebase/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/matteocervelli/llms

Made for: Claude Code.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/matteocervelli/llms/map-codebase.svg)](https://agentmods.dev/skills/matteocervelli/llms/map-codebase)
Your own site
<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>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,000 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00052 $0.03000
Opus 5 $0.00026 $0.01500
Sonnet 5 $0.00010 $0.00600
Haiku 4.5 $0.00005 $0.00300

Measured 3d ago against content hash a82d30fa8f64, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

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/*' \
.claude/skills/map-codebase/SKILL.md · 496 lines

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.

Read the full file on GitHub · 496 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. 3d ago First seen · 496 lines · 52 tokens per session scan B a82d30fa8f64

Subscribe to this mod's changes

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.

Related

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.

MemPalace/mempalace · 67 tokens

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…

KKKKhazix/khazix-skills · 202 tokens

gsd-mempalace-capture

File a phase artifact into MemPalace; mirror decision facts into its temporal KG.

open-gsd/gsd-core · 25 tokens

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…

chaitanyagiri/munder-difflin · 109 tokens

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…

Team-Commonly/commonly · 0 tokens

github-ops

GitHub CLI for issues, PRs, code search, CI logs, releases, and API queries. Requires gh CLI and auth.

fuyuxiang/echo-agent · 31 tokens