Last updated June 18, 2026
Cartograph
Cartograph is the Claude Code plugin that turns "I have a codebase" into "I have a living architecture diagram." No manual diagramming — Claude scans your code, detects your architecture, and pushes a structured graph to your board.
ContextDx maps your codebase into a living architecture diagram and runs targeted analysis on it — all from Claude Code.
Prerequisites
- Claude Code installed and running
- A ContextDx workspace with at least one board
- Your Binding Token and API Secret from the portal
Cartograph reads its credentials from .contextdx/config.json at the root of your repo:
JSON{ "bindingToken": "YWJjMTIz...", "apiSecret": "ck_cp_live_xxx", "branch": "main", "boardSlug": "my-project-overview" }
| Field | Required | Notes |
|---|---|---|
bindingToken | Yes | Base64url-encoded orgId:bindingId from the portal. |
apiSecret | Yes | Must start with ck_cp_live_. The plugin rejects anything else. |
branch | Yes | The git branch this board is bound to (e.g. main). |
boardSlug | Yes | The Root Board slug. /configure discovers and writes this for you. |
The secret prefix is ck_cp_live_. If you find an older reference to a bb_ prefix anywhere, ignore it — it's outdated. /configure will offer to add .contextdx/ to your .gitignore; let it.
Setup (one-time)
1. Install Cartograph
Add the marketplace once, then install the plugin:
/plugin marketplace add contextdx/cartograph-plugin
/plugin install cdx-code@cdx-plugins
Restart Claude Code after installing so the commands load. To scope the install, add --scope user (default), --scope project, or --scope local to the install command.
2. Connect to your board
/configure
/configure validates your config, tests the connection, and auto-discovers your Root Board. It reads credentials from .contextdx/config.json rather than asking you to paste secrets inline — see Prerequisites for the file shape.
Map your architecture
/analyze
Claude scans your project — detects services, APIs, databases, queues — and maps how they connect. The result is a structured graph of your architecture (L0 overview, 10–30 nodes).
Settle the vocabulary first (recommended). On a new codebase, run /analyze-archetypes before your first /analyze. It scans for component patterns that don't fit your workspace's archetype catalogue and submits proposals for review, so every component lands on a fitting type instead of a misfit you'd have to re-type later. If you skip it, /analyze prompts you to run it whenever the catalogue or commit has drifted.
To zoom into a specific node:
/analyze --drill my-project-overview/api-gateway
This creates a layer board (L1/L2) for that node with finer-grained components. The argument is <parent-board-slug>/<node-slug>.
To analyze all layers progressively (L0 → L1 → L2):
/analyze --all
Each layer is presented for review before proceeding to the next.
To force a full re-analysis from scratch:
/analyze --clean
Push to the portal
/sync
Your architecture appears as a visual diagram on your board in the portal. Nodes show components with their types and descriptions. Edges show how they relate — imports, API calls, data access, event flows.
If you have multiple boards, sync a specific one:
/sync --board my-project-overview
Or sync all boards at once:
/sync --all
Sync guardrails
Before any board reaches the portal, /sync runs a structural check on the analyzer's output. If a board has more than 8 nodes but no domain_group containers, the sync is rejected with a clear error — flat boards at that size are almost always a sign that the analyzer skipped the grouping step, and they render as an unreadable wall of nodes.
The fix is to re-run /analyze; the agent's protocol includes a "domain grouping" step that should populate domain_group containers automatically.
Opting out
If your project is genuinely small enough that a flat board is the right call, you can disable the check in .contextdx/config.json:
JSON{ "bindingToken": "...", "apiSecret": "...", "boardSlug": "...", "branch": "main", "validation": { "skipBoardStructureCheck": true } }
When disabled, every /sync prints a stderr notice ([cdx-sync] board-structure check disabled via config.validation.skipBoardStructureCheck) so the opt-out is never silent. Remove the field — or set it to false — to re-enable the check.
Run targeted analysis
/insights
Insight skills are defined by your workspace admin on the portal — security checks, quality reviews, dependency audits, and more. The server defines what each skill looks for; Claude Code does the reasoning. It reads the board and your source files locally, authors the findings, and pushes them back.
Each finding is tied to a specific component on your diagram. Affected areas are highlighted so your team sees impact at a glance.
/insights runs entirely in Claude Code — no model provider connection is required. This is different from the portal's in-app "With Insights" mode, which runs through Chat and does need a connected model provider. The plugin path here works without one.
Pass a natural-language prompt and Claude matches it to the right skills:
/insights find auth and data-access risks
To see what's available, pick from a list, run a specific skill, or run them all:
/insights --list # list available skills
/insights --select # choose skills and focus interactively
/insights security-analysis # run a specific skill by slug
/insights --all # run every skill
Keep it current
After code changes, just re-run:
/analyze
/sync
Analysis is incremental — it detects the git diff since last run and only re-analyzes changed files. This applies to all modes: /analyze, /analyze --drill, and /analyze --all each update only what changed in existing boards.
First analysis on a large monorepo can take a few minutes. Subsequent runs are fast because they only touch the git diff.
Use /analyze --clean if the incremental result looks stale.
Check where things stand
/status
Shows configuration, board manifest, analysis summary per board, sync status, and changed files since last analysis.
All commands
| Command | Purpose |
|---|---|
/configure | Connect to the portal |
/analyze-archetypes | Phase 1 — settle the archetype vocabulary |
/analyze | Incremental L0 analysis (full on first run) |
/analyze --clean | Full re-analysis from scratch |
/analyze --drill <board>/<node> | Drill into a specific node |
/analyze --all | Progressive all-layer analysis |
/sync | Sync single board (prompts if multiple) |
/sync --board <slug> | Sync a specific board |
/sync --all | Sync all boards |
/status | Check current state |
/insights | Run insight skills against a board |
/insights <prompt> | Match skills to a natural-language prompt |
/insights --list | List available skills |
/insights --select | Choose skills and focus interactively |
/insights <skill-slug> | Run a specific skill |
/insights --all | Run all available skills |
/help | List commands and show the plugin version |
Troubleshooting
| Symptom | Fix |
|---|---|
| Commands don't appear after install | Restart Claude Code so the plugin's commands load. |
/configure can't connect (401) | Check bindingToken and apiSecret in .contextdx/config.json — the secret must start with ck_cp_live_. Regenerate the credentials in the portal if needed. |
400 Branch Mismatch | Set branch in your config to the branch your board is bound to (e.g. main). |
/analyze asks for /analyze-archetypes first | That's the Phase 1 precondition — run /analyze-archetypes. It re-prompts whenever the archetype catalogue or your commit has drifted. |
/sync rejected by the board-structure check | A board with more than 8 nodes has no domain_group containers — re-run /analyze, or opt out via validation.skipBoardStructureCheck (see Sync guardrails). |
| Analysis looks stale | Re-run with /analyze --clean for a full re-analysis from scratch. |
| No insight skills available | Insight skills are defined by your workspace admin in the portal. |
What's Next
Quick Start
The fastest path: one repo to a living, shareable board in about 15 minutes — no model setup required.
Board Builder API
Understand the API headers, payload shape, and auth that powers the plugin under the hood.
Connecting Sources
Combine the plugin's code-derived structure with documentation sources for richer boards.
Insight Skills
Learn how /insights skills are authored and configured at the workspace level.
For Developers
Full developer workflow — from exploring inherited systems to pushing your own data.