I kept blowing my context budget dumping a whole module into Claude for a cross-cutting change. Pasting all 40 files raw cost a fortune and buried the model in noise, so its edits drifted from the parts that mattered.
The move that worked: a two-pass repo-map. Pass one, I feed only signatures (a ctags-style skeleton: file, exported symbols, one-line purpose, and the call edges) and ask which files it actually needs to see in full to make the change. Pass two, I paste only those. Cut my token spend ~70% and the edits got sharper because the model reasoned about the map before diving in.
Sharing the pass-one prompt. Anyone automated generating the skeleton so I'm not hand-rolling it each time?
You are planning a change across a large codebase. I will NOT paste every file. First you get a repo map (skeleton only), then you request the minimum full files you need.
Repo map format I'm giving you (per file): path | exported symbols with signatures | one-line purpose | outbound calls to other files in this map.
Your job in THIS turn:
1. Restate the change I want in one sentence.
2. From the map ALONE, identify the smallest set of files whose full contents you must read to implement it correctly. For each, say WHY in one line (defines the type / owns the call site / has the test).
3. List files you are deliberately NOT requesting and why they're irrelevant, so I can catch a wrong assumption.
4. Flag any symbol referenced in the map whose behavior you'd be guessing at - I'll add it to the paste list.
Do NOT propose code yet. Output only the file request list ranked by necessity.
Change requested: {DESCRIBE_CHANGE}
Repo map:
{PASTE_SKELETON}