See what a change will touch before anyone edits.
CXCAP maps the files, dependents and import cycles behind a code change. It runs on your machine in about a second, for you and for your coding agent.
Install on macOS or Linux
curl -fsSLO https://github.com/moonlettai/cxcap/releases/latest/download/install.sh
sh install.sh
Free and open source (MIT). Works on Python, JavaScript, TypeScript and Rust repos. Nothing leaves your machine.
$ cxcap audit . --focus packages/element/src/textMeasurements.ts
Tests say a change works. They don't say what it's tangled with.
-
Your agent finishes the task
Tests pass. The diff looks reasonable. Nothing fails in review.
-
The structure grows a little
One more import, one more copied path, sometimes one more cycle.
-
The next change costs more
Every later session, human or agent, has more to read before it can edit safely.
This isn't only a feeling. A Carnegie Mellon study of open-source projects (MSR 2026) found AI coding tools brought a short-lived speed boost and a lasting rise in code complexity. Read the study
Real runs on real repos
Every number below is copied from CXCAP 1.0.4 output. You can reproduce each one with a single command.
You want to change a text-measuring helper.
$ cxcap audit . --focus packages/element/src/textMeasurements.ts
CXCAP calls it the cheapest place to change. It also shows how far a signature change would travel.
- Files that import it
- 11
- More files reached through them
- 323
- Time on 1,297 files
- 0.26 s
Show the output
FOCUS 'packages/element/src/textMeasurements.ts': 1 file, complexity 34 (0.1% of repo)
Focus area is below-average complexity (avg 34.0 vs 40.3). Cheapest place to
change — still keep the diff local. Imported by 11 outside files
(packages/element/src/index.ts, packages/element/src/textElement.ts,
packages/element/src/newElement.ts (+6 more)) — keep interfaces stable or
update them in the same diff. Reaches 323 further files transitively
(packages/excalidraw/components/App.tsx, packages/excalidraw/index.tsx, …)
Excalidraw at commit 1118751. The 323 includes test files.
You're asked to “add session expiry to authenticated requests” and don't know where that lives yet.
$ cxcap audit . --intent "add session expiry to authenticated requests"
A request that sounds local lands in a much wider area. Django isn't messy here. Mature systems are simply big, and your agent should know that before it starts.
- Production files in play
- 22
- Edges crossing components
- 16
- Import cycles touched
- 4
- Blind spots flagged
- 10
Show the output
CHANGE EXPOSURE (intent: 'add session expiry to authenticated requests'):
LIKELY TOUCHPOINTS: django/contrib/sessions/backends/base.py (8 direct
dependents); django/contrib/sessions/backends/file.py; django/contrib/auth/base_user.py …
CONTEXT SURFACE (capped at 25 files; more may be in reach): 22 production files;
3 verification files; 2 components, 16 cross-boundary edges, 4 cycles
INTENT CYCLES: 15-module cycle (django/core/checks/…); 2-module lazy tangle;
3-module lazy tangle; 173-module lazy tangle
UNCERTAINTY (5 shown of 10 flags in 8 files): getattr() dispatch; runtime
import machinery …
Django at commit a013c82, 0.8 s. The file list is capped at 25 so it stays readable. One of the four cycles loads eagerly; three close only through function-level imports.
You want to change how the HTTP adapter retries connection errors.
$ cxcap audit . --intent "retry connection errors with backoff in the http adapter"
It finds the right file, and warns that the file sits in a loop of modules that import each other.
- Production files in play
- 10 of 21
- Edges crossing components
- 10
- Modules in the import cycle
- 7
- Time
- 0.03 s
Show the output
CHANGE EXPOSURE (intent: 'retry connection errors with backoff in the http adapter'):
LIKELY TOUCHPOINTS: src/requests/adapters.py (repo hotspot; 3 direct dependents)
CONTEXT SURFACE: 10 production files; 2 verification files; 2 components,
10 cross-boundary edges, 1 cycle
INTENT CYCLES: 7-module cycle (src/requests/__init__.py ↔
src/requests/adapters.py ↔ src/requests/api.py …)
requests at commit 611c616.
Three commands, one habit
Run it before you change something, and again after.
-
Describe the change
Plain English is enough. You get the likely files, what depends on them and any cycles in the way.
$ cxcap audit . --intent "add rate limits to login" -
Check the file before you edit it
See who imports it and how far a change could spread.
$ cxcap audit . --focus src/auth/session.py -
Check again when you're done
Make sure the change didn't add a cycle or new coupling you didn't mean to.
$ cxcap audit . --focus src/auth/session.py
Add --json to any command when a script or an agent needs to read the result.
Give your coding agent the map too
The installer adds a small skill for coding agents like Claude Code. It tells the agent when to run CXCAP: before planning a change, and before calling it done.
Any agent that can run a shell command can use it. There's no model, no API key and no server. The same command always gives the same answer.
Read the agent skillUse CXCAP as a pre-change map and post-change regression check.
- Know the task, not the files:
cxcap audit . --intent "<task>"- Know the file or area:
cxcap audit . --focus <path>- Cycle through the target: treat the cycle as one coordination surface.
cxcap-development/SKILL.mdBuilt to be argued with
We ran CXCAP on its own source code. It said SEVERE: 15 high warnings, and 22 duplicated blocks of code shared between two of its own parsers. We shipped it that way. A tool tuned until its own code looks clean wouldn't tell you much.
SEVERE
On 31 real past changes in 7 repos, its top 10 suggestions found about 70% of the files that actually changed. Useful, not magic.
What it won't do
- Grade your code. SEVERE means “change carefully here”, not “this is bad”. Django gets SEVERE too.
- Estimate effort. It shows structure, not hours.
- See runtime tricks. It reads code, it doesn't run it. It flags the dynamic spots it can't follow.
- Read every language. Python, JavaScript, TypeScript and Rust today. Other files are listed as not analyzed.
- Replace tests or review. It answers a different question. Use all three.
Try it on your next real change
Pick the repo you've built most with AI. Give CXCAP the change you're about to make. If it misses something that matters, we want to hear it.
Install on macOS or Linux
curl -fsSLO https://github.com/moonlettai/cxcap/releases/latest/download/install.sh
sh install.sh
Have Rust? cargo install cxcap works too.
Questions
Does my code leave my machine?
No. CXCAP reads your files and writes nothing to your repo. There's no model and no upload. The only network call is an optional daily check for a new version, which you can turn off with CXCAP_NO_UPDATE_CHECK=1.
Will it lower my AI bill?
We don't claim that. Coding agents are billed by how much they read and do, and tangled code gives them more to read. CXCAP shows you that structure. It doesn't measure savings.
How is it different from a linter?
A linter checks lines inside a file. CXCAP looks at how files connect: who imports what, how far a change can reach, and where modules import each other in a loop.
Why does my repo say SEVERE?
Big, busy code gets a high verdict, even when it's well written. Read the named files and relationships instead. They tell you where to slow down.
Which languages and systems does it support?
It analyzes Python, JavaScript, TypeScript and Rust, on macOS and Linux. Other languages are listed as not analyzed rather than scored as simple.
Why is the file list capped at 25?
So the answer stays readable for you and small enough for an agent's context. When the cap is hit, the output says so.