skills-memory/cm-get-token-insights/SKILL.md
Use when the user asks about Claude token usage, wants to see how much they are spending on Claude, understand cache hit rates, review Claude Code workflow patterns, or get cost optimization recommendations.
npx skillsauth add NodeJSmith/Claudefiles cm-get-token-insightsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Parse JSONL conversation files from ~/.claude/projects/*/ into per-turn analytics tables, then analyze both cost-optimization opportunities and Claude Code workflow patterns (skills, agents, hooks).
cm-ingest-token-data
First run processes all files (~100s for ~2500 files) — warn the user about the wait before running. Incremental runs complete in under 5s. The script populates analytics tables, deploys an interactive dashboard to ~/.claude-memory/dashboard.html (built from templates/dashboard.html), and prints a slim JSON blob to stdout (full data goes to dashboard only).
If the script exits non-zero, report the error and stop.
After parsing the JSON stdout from Step 1, construct a personalized prompt for a claude-code-guide agent using the actual data — not generic descriptions. For each of the top 3 insights (by waste_usd), include verbatim: the finding text, root_cause text, waste_usd value, solution.action, and solution.detail. Also include the specific project names, counts, and numbers mentioned in the insight (e.g. "meta-ads-cli: 75 cliffs across 53 sessions") so the agent's response is grounded in the user's real usage patterns.
Spawn the agent with subagent_type: "claude-code-guide" in foreground (do not use run_in_background). Wait for the agent to return before proceeding to Step 2. Weave its suggestions into the analysis in Step 2.
Capture the JSON stdout from Step 1 as the analysis input. Analyze across four areas:
trends object is non-empty, compare current vs prior window: improved/regressed metrics with likely causes, new/retired skills and hooks, hook latency deltas. Skip if trends is empty.Structure the analysis naturally based on what the data shows — don't force empty sections. Ask the user if they want to dive deeper into any specific project, skill, or insight.
python3 -c "import webbrowser, pathlib; webbrowser.open((pathlib.Path.home() / '.claude-memory' / 'dashboard.html').as_uri())"
Note the dashboard is available for deeper exploration — Section 6 (Claude Code Ecosystem) has the new skill, agent, and hook charts.
development
Use when the user says: 'create an issue', 'file an issue', 'open an issue', 'write an issue', 'new issue for this'. Codebase-aware issue creation — investigates the code to produce well-structured issues with acceptance criteria, affected areas, and enough detail for automated triage.
development
Use when the user says: 'triage issues', 'classify issues by complexity', 'assess issue complexity', 'find quick wins', 'which issues are small', 'batch issue assessment'. Batch codebase-aware issue triage — parallel Haiku subagents assess actual complexity and effort by reading the code, not just titles.
development
Use when the user says: "review my changes", "run the reviewers", "code and integration review", "readability review", "maintainability review", "sniff test this", "WTF check", "code smells", "is this code any good", "fresh eyes on this branch", "review this directory", "check this module". Dispatches three parallel reviewers — code, integration, and a readability pass — and consolidates findings into one prioritized report.
development
Use when the user says: "clean code check", "style review", "LLM smell check", "code hygiene", "nitpick this", "style check", "find style sins", "nitpicker review", "anal retentive review", "exhaustive style review", "no-filter style report". Dispatches three parallel stylistic checkers — llm-checker (training-bias patterns), lazy-checker (deferred debt), and nitpicker (style hygiene) — and consolidates findings into a report organized by checker with a Summary section for orchestration consumption.