From se7en-skills
Scans Claude Code session JSONL files to generate interactive token usage dashboards and calendars. Tracks totals, trends, models, hourly activity, and costs via Python scripts.
npx claudepluginhub yiliqi78/se7en-skillsThis skill uses the workspace's default tool permissions.
扫描 `~/.claude/projects/` 下全部会话 JSONL,提供两种可视化视图。
Displays per-session token usage breakdown for the last N days (default 7). Invoke via /token-usage or /token-usage <days> to track AI costs.
Analyzes Claude Code usage, costs, tokens, efficiency, cache hits, and burn rate using ccusage for stats and termgraph for visuals on work or personal profiles.
Parses Claude Code JSONL session logs into SQLite, estimates Anthropic API costs, and serves a local browser dashboard with Chart.js charts plus CLI usage summaries.
Share bugs, ideas, or general feedback.
扫描 ~/.claude/projects/ 下全部会话 JSONL,提供两种可视化视图。
本技能依赖 Python 3.10+,无需额外依赖包(纯标准库实现)。
确认脚本路径后直接运行即可。用 Glob 搜索 **/se7en-token-stats/token_stats.py 定位绝对路径。
python3 /path/to/token_stats.py
python3 /path/to/token_stats.py --since 2026-03-01
python3 /path/to/token_stats.py -o ~/Desktop/token-report.html
| 参数 | 说明 |
|---|---|
--since YYYY-MM-DD | 起始日期 |
--until YYYY-MM-DD | 截止日期 |
-o PATH | 输出文件路径(默认 /tmp/token-stats.html) |
--no-open | 不自动打开浏览器 |
月历视图,每个日期格子显示当天总 Token 量和各模型消耗分布。支持月份切换、左右键导航、hover 查看详情。
python3 /path/to/token_calendar.py
python3 /path/to/token_calendar.py --month 2026-03
| 参数 | 说明 |
|---|---|
--month YYYY-MM | 初始显示月份(默认当月) |
-o PATH | 输出文件路径(默认 /tmp/token-calendar.html) |
--no-open | 不自动打开浏览器 |
日历格子内容:日期(醒目)· 总 Token · 会话/调用数 · 前三模型明细 · 模型占比条。无数据日期虚线边框。
所有数字使用中文单位:亿、万、千。图表坐标轴、tooltip、卡片数值统一遵循此规则。
暖光浮动卡片设计:
| 变量 | 值 | 用途 |
|---|---|---|
--bg | #f4f1ec | 暖纸底背景 |
--card | #ffffff | 浮动卡片 |
--text | #1c1917 | 主文本(warm near-black) |
--text-secondary | #78716c | 次文本 |
--text-tertiary | #a8a29e | 辅助文本 |
--accent | #d4714f | 珊瑚强调色 |
--border | rgba(0,0,0,0.06) | 默认边框 |
--shadow | 0 1px 3px rgba(120,100,80,0.06) | 暖色调阴影 |
Outfit(Google Fonts)+ PingFang SC / Noto Sans SC CJK fallback。全局 tabular-nums 对齐数字。
gap: 8px,每个有数据的日期是独立白色卡片(border-radius: 14px)dashed rgba(0,0,0,0.08)),无背景min-height: 40pxborder + box-shadow 双环translateY(-2px) + 阴影加深,模型条 scaleY(1.5)fadeUp 瀑布式(animation-delay: d * 20ms)backdrop-filter: blur(20px)),含完整模型明细 + 百分比< 900px:模型明细隐藏,图例单列< 600px:模型条隐藏,日格最小化