Open-source reference app
Extracted from a larger operator surface and rebuilt as a focused standalone demo for visualizing bootstrap prompt pressure.
Standalone Next.js 16 demo
OpenClaw Context Doctor turns messy prompt setup into a visible token budget.
Inspect the workspace files and installed skills that shape an agent's bootstrap context, then estimate how much room is left for the actual conversation. Start with a bundled demo snapshot, or run a live scan against your own workspace.
Data mode
Currently showing bundled demo data. Run locally and configure CONTEXT_DOCTOR_ALLOWED_ROOTS to enable Local Scan.
Loaded the bundled demo snapshot.
How much context window is left for conversation?
Bundled demo data showing both a clean workspace and a warning-heavy workspace. You are currently viewing Builder Laptop.
Token Budget
182,375
tokens free for conversation
Workspace Files
Builder LaptopInstalled Skills
360 tok from 1,440 chars
295 tok from 1,180 chars
205 tok from 820 chars
240 tok from 960 chars
4 skills discovered for this workspace scan. They are shown for awareness and are not counted as fully loaded bootstrap content.
Reality Check
This is a bundled demo snapshot for the standalone OpenClaw Context Doctor app.
Switch to Local Scan to inspect a real workspace on your own machine.
Healthy workspace: bootstrap overhead is low and all primary guidance files are present.
Two workspaces show a healthy scan and a warning-heavy scan side by side.
How it works
Snapshot contract
Every data mode returns the same Context Doctor snapshot shape, so the UI, tests, and future integrations can share one contract.
Workspace scan
Local Scan reads the standard bootstrap files plus discovered skills, then computes the bootstrap token budget and warning set.
Reality check
This tool estimates conversation headroom. It measures visible prompt baggage, not the full hidden runtime of every agent platform.
API Reference
GET /api/context-doctor/mock
curl http://localhost:3000/api/context-doctor/mockPOST /api/context-doctor/scan
curl -X POST http://localhost:3000/api/context-doctor/scan \
-H "Content-Type: application/json" \
-d '{"workspacePath":"/Users/you/Documents/Web/project","ctxSize":200000}'The scan route only accepts workspace paths inside CONTEXT_DOCTOR_ALLOWED_ROOTS. If you leave the path blank, the API will fall back to CONTEXT_DOCTOR_WORKSPACE when it is configured.