mapear-codebase

mapear-codebase is a command for Claude Code from luanpdd/kit-mcp. It costs 27 tokens per session (820 once invoked), scanned A, original, MIT.

A command that examines a codebase and writes seven structured documents describing how it is built and organized.

In plain words
What is it for?
Use it to document the stack, integrations, architecture, structure, conventions, testing, and concerns of an existing or changing codebase.
Why use it?
It gives developers a shared reference when they are new to a project or need to update their understanding of it.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it to document the stack, integrations, architecture, structure, conventions, testing, and concerns of an existing or changing codebase.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/luanpdd/kit-mcp/mapear-codebase
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.

Clone the repo
git clone --depth 1 https://github.com/luanpdd/kit-mcp

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/luanpdd/kit-mcp/mapear-codebase.svg)](https://agentmods.dev/commands/luanpdd/kit-mcp/mapear-codebase)
Your own site
<a href="https://agentmods.dev/commands/luanpdd/kit-mcp/mapear-codebase"><img src="https://agentmods.dev/badge/commands/luanpdd/kit-mcp/mapear-codebase.svg" alt="Measured on agentmods" height="20"></a>
Per session 27 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 820 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00027 $0.00820
Opus 5 $0.00014 $0.00410
Sonnet 5 $0.00005 $0.00164
Haiku 4.5 $0.00003 $0.00082

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

Security

Grade A, and why

mapear-codebase 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.

kit/commands/mapear-codebase.md · 73 lines

What it actually says

Variante Dynamic Workflows embarcada (Opus 4.8+): /mapear-codebase-workflow roda o mesmo mapeamento via Workflow() — 4 mappers em paralelo + synthesizer que verifica os 7 docs e roda secret scan (kit/workflows/mapear-codebase.workflow.js). Use-a para comparar wall-clock/qualidade contra esta versão.

Cada agente mapeador explora uma área de foco e escreve documentos diretamente em .planning/codebase/. O orquestrador recebe apenas confirmações, mantendo o uso de contexto mínimo.

Saída: pasta .planning/codebase/ com 7 documentos estruturados sobre o estado da base de código.

<execution_context> @./.claude/framework/workflows/map-codebase.md </execution_context>

Carregar estado do projeto se existir: Verificar .planning/STATE.md - carrega contexto se o projeto já foi inicializado

Este comando pode rodar:

  • Antes de /novo-projeto (bases de código brownfield) - cria mapa da base de código primeiro
  • Após /novo-projeto (bases de código greenfield) - atualiza o mapa conforme o código evolui
  • A qualquer momento para atualizar a compreensão da base de código

<when_to_use> Use mapear-codebase para:

  • Projetos brownfield antes da inicialização (entender o código existente primeiro)
  • Atualizar mapa da base de código após mudanças significativas
  • Onboarding em uma base de código desconhecida
  • Antes de grandes refatorações (entender o estado atual)
  • Quando STATE.md referencia informações desatualizadas da base de código

Pule mapear-codebase para:

  • Projetos greenfield sem código ainda (nada a mapear)
  • Bases de código triviais (menos de 5 arquivos) </when_to_use>

<success_criteria>

  • Diretório .planning/codebase/ criado
  • Todos os 7 documentos da base de código escritos pelos agentes mapeadores
  • Documentos seguem estrutura de template
  • Agentes paralelos concluíram sem erros
  • Usuário conhece próximos passos </success_criteria>
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 · 73 lines · 27 tokens per session scan A 2082f9dfb814

Subscribe to this mod's changes

mapear-codebase is a command published in the GitHub repository luanpdd/kit-mcp (1 stars, last pushed yesterday), licensed MIT. It adds 27 tokens to every session and 820 once invoked, about $0.0001 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-09-03.

mcp