If --out <path> was provided, write the markdown version of the report to that path. Use a proper markdown table for the trend section.
If --json, dump the aggregated data structure as pretty-printed JSON.
Notes on small log files
If <2 sessions in the window: print the report but add Note: too few sessions for meaningful trend data.
If log file is empty/missing: print the same "No TokenWise log found" message that /tokenwise:report uses.
Omit any "Per model" row whose count is 0 for the window — Fable's row will legitimately be absent for most users most of the time.
Tools
Read, Bash (for jq aggregation if helpful), Write (for --out).
1---2name: summary3description: Summary4---56# /tokenwise:summary — Multi-session trend report78Aggregate `.tokenwise/log.ndjson` over a time window.910## Parse $ARGUMENTS1112- `--week` (default) — last 7 days13- `--month` — last 30 days14- `--all` — entire log15- `--days <N>` — last N days16- `--out <path>` — write the report to a markdown file instead of stdout17- `--json` — output JSON instead of text1819## Steps20211. **Read** `./.tokenwise/log.ndjson` (or the path the user provides)22232. **Filter** entries to the time window:24 - Compute cutoff: `now - <days>*86400`25 - Keep entries where `ts > cutoff`26273. **Aggregate:**28 - **Total:** sessions (unique session_id), tasks, total cost, baseline cost, savings29 - **Per model:** task count, cost, % of total30 - **Per task_class** (`mechanical|execution|review|planning`): task count, avg cost, dominant model31 - **Trend** (only for `--week` or `--days <≤14>`): per-day cost + savings bar chart in plain text32334. **Print:**3435```36TokenWise Summary — last <N> days37==================================3839Sessions: <count>40Tasks routed: <count>41Total spent: $<total>42Baseline: $<baseline>43Savings: $<savings> (<pct>%)4445Per model:46 Haiku <count> tasks $<cost> (<pct>%)47 Sonnet <count> tasks $<cost> (<pct>%)48 Opus <count> tasks $<cost> (<pct>%)49 Fable <count> tasks $<cost> (<pct>%)5051Top task classes:52 <class> <count> tasks avg cost $<avg> model: <dominant>53 ...5455Daily trend (cost):56 Mon ███████░░░ $4.2157 Tue ███░░░░░░░ $1.8258 Wed ████████░░ $5.0459 ...60```61625. **If `--out <path>`** was provided, write the markdown version of the report to that path. Use a proper markdown table for the trend section.63646. **If `--json`**, dump the aggregated data structure as pretty-printed JSON.6566## Notes on small log files6768- If <2 sessions in the window: print the report but add `Note: too few sessions for meaningful trend data.`69- If log file is empty/missing: print the same "No TokenWise log found" message that `/tokenwise:report` uses.70- Omit any "Per model" row whose count is 0 for the window — Fable's row will legitimately be absent for most users most of the time.7172## Tools7374Read, Bash (for jq aggregation if helpful), Write (for `--out`).
Run npx skillmds@latest add codeshux/summary in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Summary It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
CodeShuX (@codeshux) published this skill. Their other Agent Skills are listed on their SkillMD profile.