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.

Allowed roots: Disabled on this deployment

Loaded the bundled demo snapshot.

Demo SnapshotCustom workspace live scan

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.

Healthy
200,000 ctx20,000 max/fileScanned Mar 12, 11:00 AM UTC

Token Budget

8.8%bootstrap
System Prompt
2.0%
Workspace Files
3.2%
Skills List
0.5%
Tool Schemas
2.3%
Tool Summaries
0.9%

182,375

tokens free for conversation

Workspace Files

Builder Laptop
TOOLS.md
9,200 chars
OK
AGENTS.md
7,800 chars
OK
SOUL.md
2,400 chars
OK
MEMORY.md
2,200 chars
OK
IDENTITY.md
1,700 chars
OK
USER.md
1,200 chars
OK
HEARTBEAT.md
1,000 chars
OK
BOOTSTRAP.md
bootstrap
FIRST RUN
Total workspace25,500 chars · 6,375 tok

Installed Skills

Claude 1Codex 2Workspace 1
tool-context7Codex

360 tok from 1,440 chars

workflow-feature-shipperCodex

295 tok from 1,180 chars

agent-browserWorkspace

205 tok from 820 chars

tool-systematic-debuggingClaude

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/mock

POST /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.