alexgreensh/token-optimizer/token-dashboard
Claude Code and agent skill by alexgreensh/token-optimizer
- community
Checking that the SKILL.md file is still in the repository.
Answers what a past session cost ("the Garden session yesterday", a session id) with a priced number, and opens the Token Optimizer dashboard when asked to see it.
Install
npx vskill@latest install alexgreensh/token-optimizer/token-dashboardSKILL.md
The same SKILL.md was published earlier as alexgreensh/token-optimizer/token-dashboard.
Token Optimizer Dashboard
Answers what a session cost from the user's own words, and opens an up-to-date dashboard of context usage, quality, session history and skills. Open the dashboard only when the user asks to see it; a cost question never opens a browser.
Instructions
- Resolve runtime and measure.py path (each Bash call is a fresh shell, so env vars do not persist: the block echoes the resolved values, and every later command must use them verbatim):
- A cost question ("what did the Garden session yesterday cost?", "how much were my TR sync sessions?", "cost of session <id>"): run this instead of steps 3-4.
- Pass the user's own words (
garden yesterday,tr sync, an id or its first 8 characters). Names match topic, slug and project, case-insensitively, and all of them must match;today,yesterdayandYYYY-MM-DDset the day. Add--days Nfor "this week" (default 30),--limit Nto list more. - Answer from
sessions[]: date, topic,cost_usd.total, the main-thread and subagent split when subagents ran,cost_usd.on_datewhen a day was asked and the session ran over several days, andpartial_reasonwhen set. Several matches: givetotal_cost_usdand list them, asking which one only when it changes the answer. - State
basisin one line: API list prices, so on a subscription it is what the work would have cost, not a bill. - No match: say so, show
closest[], and pass onnote(a session is collected when it ends). - Never query trends.db or price tokens yourself: this is the dashboard's own number, read without writing.
- Collect and open:
This collects the latest session data into the trends database, regenerates the dashboard HTML using the last selected history window (30 days until changed), and opens it in your default browser. If the user asks for a different window, add --days N or --days all to the dashboard command; later refreshes retain that choice.
- Tell the user the dashboard is open. Probe the daemon before mentioning any URL:
- Probe daemon:
"$PY" "$MEASURE_PY" daemon-status 2>/dev/null - If DAEMON_RUNNING: lead with
URL: http://localhost:24842/token-optimizer(bookmarkable, auto-updates), then mention the file fallback. - If DAEMON_NOT_RUNNING: do not print the
localhost:24842URL. Tell the user the dashboard opened as a file, and suggest"$PY" "$MEASURE_PY" setup-daemon(macOS and Windows) if they want a bookmarkable URL. - File path: never hardcode it. It is install-dependent. Cite the
Dashboard:line from the step-3 output. - For Codex when DAEMON_NOT_RUNNING: do not imply the Claude daemon is required; the generated file works, and Stop hooks refresh it when balanced hooks are installed.
Written for and checked on Claude Opus 5.5 and Sonnet 5.5, and GPT-5.6 on Codex.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/token-dashboard/SKILL.md
Popularity
- Repository stars
- 2,706
- Repository forks
- 213
- 7-day trend score
- 37
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/alexgreensh/token-optimizer/token-dashboard)