brownfield-map

brownfield-map is a command for Claude Code from wednesday-solutions/ai-agent-skills. It costs 0 tokens per session (1,179 once invoked), scanned A, original, MIT.

A complete map of an existing codebase, also called a brownfield project because development started before the analysis. It builds a dependency graph, project overview, file summaries, risk scores, and other codebase reports.

In plain words
What is it for?
Use it to analyze a project, document its architecture, trace dependencies, calculate file risks, find dead code and circular dependencies, and update the project's codebase intelligence.
Why use it?
It creates a shared picture of how an unfamiliar project is organized and where its risky or disconnected parts are. The analysis can run without an API key, though some optional summaries may be skipped.

Command for Claude Code

Written for Claude Code: installed under .claude/.

Good fit Use it to analyze a project, document its architecture, trace dependencies, calculate file risks, find dead code and circular dependencies, and update the project's codebase intelligence.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/wednesday-solutions/ai-agent-skills/brownfield-map
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/wednesday-solutions/ai-agent-skills

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/wednesday-solutions/ai-agent-skills/brownfield-map/github.svg)](https://agentmods.dev/commands/wednesday-solutions/ai-agent-skills/brownfield-map)
Your own site
<a href="https://agentmods.dev/commands/wednesday-solutions/ai-agent-skills/brownfield-map"><img src="https://agentmods.dev/badge/commands/wednesday-solutions/ai-agent-skills/brownfield-map/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 brownfield-map

Your own site · 80×15
<a href="https://agentmods.dev/commands/wednesday-solutions/ai-agent-skills/brownfield-map"><img src="https://agentmods.dev/badge/commands/wednesday-solutions/ai-agent-skills/brownfield-map.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,179 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.00000 $0.01179
Opus 5 $0.00000 $0.00589
Sonnet 5 $0.00000 $0.00236
Haiku 4.5 $0.00000 $0.00118

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

Security

Grade A, and why

brownfield-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 10d 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/commands/brownfield-map.md · 165 lines

How it starts

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

/brownfield-map — Full Codebase Analysis

Purpose

Run a complete brownfield analysis on the codebase and generate MASTER.md, summaries, risk scores, and all derived analytics.

Trigger

  • "Map the entire codebase"
  • "Analyze this project"
  • "Update codebase intelligence"

Type: /brownfield-map [--full]


Steps

1. Validate environment

Check that the project root contains a recognizable project file:

  • package.json (Node.js)
  • go.mod (Go)
  • Podfile or Package.swift (iOS/Swift)
  • setup.py or pyproject.toml (Python)
  • Gemfile (Ruby)

If none found, stop and suggest the current directory.

2. Check for API key (optional)

If .wednesday/config.json exists and has an OpenRouter API key, the map will use LLM enrichment. If no key, the map proceeds with deterministic analysis only (no LLM summaries).

Output: "Running full analysis mode" or "API key not configured — skipping LLM enrichment"

3. Execute the map command

wednesday-skills map --full

Wait for completion. The script will:

  • Parse all source files
  • Build the dependency graph
  • Compute risk scores for each file
  • Detect daemons and adapters
  • Find dead code
  • Detect circular dependencies
  • Create coverage gaps report
  • Generate module summaries (with LLM if API key exists)
  • Write .wednesday/codebase/ directory with:
    • MASTER.md (main intelligence document)
    • dep-graph.json (full dependency graph)
    • summaries.json (module summaries)
    • analysis/blast-radius.json (transitive impacts)
    • analysis/safety-scores.json (risk scoring)
    • analysis/dead-code.json (unused files + exports)

4. Parse the output and report

After the command completes, query the DB for final stats:

const queries = require('./.claude/query-helpers.js');
const stats = queries.getCodebaseStats();
const highRiskFiles = queries.getHighRiskFiles(minRisk = 60);
const deadCode = queries.getAllDeadCode();
const circularDeps = queries.getCircularDependencies();
const entryPoints = queries.getEntryPoints();

Read the full file on GitHub · 165 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. 10d ago First seen · 165 lines · 0 tokens per session scan A 7066e319f997

Subscribe to this mod's changes

brownfield-map is a command published in the GitHub repository wednesday-solutions/ai-agent-skills (168 stars, last pushed 3mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,179 tokens. 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.