map-codebase

map-codebase is a skill for Claude Code from jszmajda/lid. It costs 92 tokens per session (3,063 once invoked), scanned A, original, MIT.

A workflow for mapping an existing codebase, also called a brownfield project, into linked design and requirement documents. It reads the code in scope, groups it into possible views, and creates draft documentation based on what actually exists.

In plain words
What is it for?
Use it to inspect an existing codebase, choose how its parts should be grouped, generate draft detailed designs and requirements, and create linked documentation for future changes.
Why use it?
It gives an existing project a documented structure without assuming that its current design matches an ideal one. Evidence and uncertainty are kept separate so later work starts from reality.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter. Also seen: mentions CLAUDE.md; mentions subagents.

Part of the arrow-maintenance plugin — 2 skills, 2 commands shipped together

Good fit Use it to inspect an existing codebase, choose how its parts should be grouped, generate draft detailed designs and requirements, and create linked documentation for future changes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jszmajda/lid/map-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.

Any agent
npx skills add jszmajda/lid --skill map-codebase
Clone the repo
git clone --depth 1 https://github.com/jszmajda/lid

Made for: Claude Code.

Or install arrow-maintenance, the plugin that ships this one along with the rest of its 2 skills, 2 commands.

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/jszmajda/lid/map-codebase/github.svg)](https://agentmods.dev/skills/jszmajda/lid/map-codebase)
Your own site
<a href="https://agentmods.dev/skills/jszmajda/lid/map-codebase"><img src="https://agentmods.dev/badge/skills/jszmajda/lid/map-codebase/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for map-codebase

Your own site · 80×15
<a href="https://agentmods.dev/skills/jszmajda/lid/map-codebase"><img src="https://agentmods.dev/badge/skills/jszmajda/lid/map-codebase.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 92 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,063 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00092 $0.03063
Opus 5.5 $0.00037 $0.01225
Sonnet 5.5 $0.00018 $0.00613
Haiku 4.5 $0.00009 $0.00306

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

Security

Grade A, and why

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

plugins/arrow-maintenance/skills/map-codebase/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 Codebase (Brownfield Arrow Bootstrap)

This skill maps an existing codebase into the arrow of intent. It works bottom-up: read all the code in scope first, then propose lens-based clusterings for the user to choose among, then generate skeleton docs that describe what actually exists.

See brownfield-bootstrap.md for detailed guidance per phase.

Five Critical Rules

These govern every phase. Apply consistently.

  1. Read actual code, don't guess. Every claim in generated artifacts traces to file/line evidence. Speculation is flagged explicitly rather than presented as fact.
  2. Each STOP is mandatory. The workflow has multiple stop points. None are optional. Rushing past a stop is how brownfield mapping produces bad LLDs that poison subsequent work.
  3. LLDs describe current reality, not aspirational design. Output is what the code is, not what a greenfield version would be. Inferred design decisions carry [inferred] markers; known technical debt and behavioral quirks go in Open Questions.
  4. Thoroughness over speed. Token budget is real but not dominant; skimming produces mappings that miss behaviors and lock in the wrong segmentation.
  5. Humble but guide. The agent is not the expert on the user's system; the user is. But don't silently defer — when the user's framing conflicts with the evidence, surface the tension with evidence rather than just going along.

At invocation

Ask one question first:

  • Whole project, or specific parts?
    • Whole project → implies Full LID mode. Scope is the entire project.
    • Specific parts → implies Scoped LID mode. Ask the user to name the parts (directories, file lists, or component names). The declared parts are both the sweep scope and the LID scope going forward.

This question determines scope and mode simultaneously — the user is not asked a separate "Full or Scoped?" later at terminal verification. Default to Full (whole project) if the user is undecided.

Read the full file on GitHub · 160 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 5d ago Changed b75cbed222e0
  2. 1mo ago First seen · 160 lines · 92 tokens per session scan A d463d0b6d0af

Subscribe to this mod's changes

map-codebase is a skill published in the GitHub repository jszmajda/lid (112 stars, last pushed 3d ago), licensed MIT. It adds 92 tokens to every session and 3,063 once invoked, about $0.0004 per session on Opus 5.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-30.

Related

Other skills, from other repositories

user-docs

Write user documentation for a project by scanning its codebase — its UI screens and its public API/CLI — inferring what someone can actually do with it, and drafting brief, task-oriented docs to the Diátaxis standard (tutorial / how-to / reference / explanation). Handles both non-technical end-user docs and developer…

fullymiddleaged/Clawness · 119 tokens

add

Create a new Clawness rule from a natural language description. Describe what you want enforced and this will generate the YAML rule file with proper tags, triggers, and examples.

fullymiddleaged/Clawness · 37 tokens

messaging

Write or rewrite the product's customer-facing copy — landing page, hero section, CTAs, onboarding, empty states, pricing, app-store and marketing pages — with the customer as the hero and the product as their guide. Scans the existing UI copy, drafts a one-page message brief (who the customer is, what they want, the…

fullymiddleaged/Clawness · 135 tokens

review

Run an adversarial code review on staged changes or a specific file. Spawns the code-critic agent to find bugs, performance issues, and missed edge cases. Use before merging PRs or committing.

fullymiddleaged/Clawness · 43 tokens

perf

Run a performance audit on the project or a specific module. Checks for N+1 queries, unnecessary re-renders, memory leaks, bundle size issues, and slow algorithms.

fullymiddleaged/Clawness · 37 tokens

oneshot

End-to-end autonomous workflow — research, plan, implement, validate, ship, and merge in one command. ALWAYS use when the user says 'oneshot', 'do everything end to end', 'full workflow', or wants to go from ticket/idea to merged PR autonomously. All phases run sequentially in the current session, using agent teams…

coalesce-labs/catalyst · 82 tokens