Skip to content

The dashboard

The dashboard turns the audit and your session history into a browsable HTML page with panels for overhead, quality, trends, and skill management.

The dashboard renders one self-contained HTML file with navigation for Overview, Savings, Quick Wins, Medium, Deep, Habits, Trends, Health, Coach, Hooks, and Manage. Open it in your browser or serve it over HTTP so you can refresh it as you work.

The Savings page shows recent and since-install savings, tokens kept out of context, and a transformation comparison when a baseline is available and both ways of counting work (messages and API calls) are covered and agree; otherwise it says it cannot tell yet, or that nothing measurable changed. Hover the headline figures for their breakdown. The limits card estimates how much more work fits in your weekly limit against your own baseline and explains its method. Opportunity under “Still on the table” is separate from savings; its fix buttons open the relevant action. On a subscription, dollar values use API rates as an estimate of limit headroom, not a refund.

After every session, the SessionEnd hook regenerates the dashboard data so the page is current the next time you open it. You do not have to rerun the audit by hand.

The Coach view carries a “From your own usage” section: the daily usage-recommendations record (compact window and subagent cache lifetime), one card per recommendation with the measured numbers, the exact command, and a Wins row once you acted on an earlier recommendation and the measurement moved. It reads the same local record as measure.py recommendations. The page never scans for it, and the daily advice path never writes either setting. Separate explicit subagent-cache enable or its automation opt-in can set the TTL; compact-window advice does not write autoCompactWindow.

You open the dashboard on demand. The underlying data refreshes automatically on SessionEnd through the session-end-flush hook. The daemon, when installed, keeps the HTTP server alive between sessions so the page is always one click away.

Generated on demand on every platform. The persistent daemon is off until you opt in with setup-daemon. The data collection that feeds the dashboard is on by default through the SessionEnd hook on platforms that support hooks.

The dashboard is generated on request, so nothing is running to disable unless you installed the daemon. Remove the daemon with:

Terminal window
cd ~/.claude/skills/token-optimizer/scripts
python3 measure.py setup-daemon --uninstall

During an uninstall, python3 measure.py purge --confirm --force stops the daemon and deletes its data in one step. See your data and privacy.

Terminal window
cd ~/.claude/skills/token-optimizer/scripts
# Generate and open the dashboard in your browser
# (--user marks a person-initiated run; without it a piped-stdin invocation
# is treated as a hook and capped at a 20s rebuild budget)
python3 measure.py dashboard --user
# Serve it over HTTP instead of opening a file
python3 measure.py dashboard --user --serve --port 8080
# Embed one year of history, retaining this choice for future refreshes
python3 measure.py dashboard --user --days 365
# Embed all available history (a larger file may take longer to build)
python3 measure.py dashboard --user --days all
# Diagnose an empty or broken panel (validates the data shape)
python3 measure.py dashboard-diagnose
# Check whether the persistent daemon is yours and running
python3 measure.py daemon-status

The convenience skill /token-dashboard collects the latest session data, regenerates the page, and opens it for you. New installations embed 30 days by default. In Trends, choose 7, 14, 30, 90, or 180 days, or All to display everything embedded in the current file. The selected display range stays selected in that browser.

When the dashboard is served locally, choosing a range longer than the embedded window loads it on demand. Load full history explicitly embeds all available history. These choices and --days persist across regeneration, session refreshes, and /token-dashboard. In a file-only view, start the local server or regenerate with --days to load more data. Larger windows produce larger files and can take longer to build.

These are two different ways to view the page over HTTP.

dashboard --servesetup-daemon
LifetimeRuns while the command is openPersists across sessions
Use caseOne look at the live pageA bookmarkable URL you keep open
URLThe host and port you passhttp://localhost:24842
ConsentNone neededOne-time daemon consent
InstallNothing to installlaunchd agent (macOS) or scheduled task (Windows)

By default the dashboard binds to 127.0.0.1, so only your own machine can reach it. To expose it on your local network, set the bind host to 0.0.0.0 before installing the daemon:

Terminal window
TOKEN_OPTIMIZER_DASHBOARD_HOST=0.0.0.0 python3 measure.py setup-daemon

The chosen host persists per-runtime across upgrades. Accepted values are 127.0.0.1, localhost, and 0.0.0.0. Anything else falls back to localhost with a warning.

With 0.0.0.0, the page opens by localhost, any IP address, this machine’s short hostname (up to the first dot) or that name with .local, and *.ts.net. Any other name is refused. The token and every change are for this machine only.

daemon-status runs an identity-verified probe, not just a TCP check, so it can tell your daemon apart from another process holding the port. It returns DAEMON_RUNNING, DAEMON_NOT_RUNNING, or DAEMON_FOREIGN.

SettingValue
Default bind host127.0.0.1
Daemon port24842
--serve default port8080 (overridable with --port)
History window30 days initially; saved choice via --days N, --days all, or the local dashboard
Data refreshAutomatic on SessionEnd

Low. The default localhost bind keeps the page private to your machine. The only material exposure is choosing a host that is not loopback (0.0.0.0 for the daemon, any such address for --serve --host), which is opt-in. The page is read-mostly; its one write action is the Manage panel, covered on its own page.

TOKEN_OPTIMIZER_DASHBOARD_HOST, TOKEN_OPTIMIZER_HOST, and TOKEN_OPTIMIZER_DASHBOARD_TIMEOUT. Defined in the configuration reference.

Generated on all platforms. The shared Python daemon supports macOS (launchd), Linux (systemd), and Windows (scheduled task). Pi is a separate extension without this Python daemon. Codex and Hermes regenerate dashboard data through their own session-end rollups; prefix commands with the runtime selector. Copilot has no dashboard yet: the dashboard command is refused under the Copilot runtime, so use copilot-summary there.