Loading...
Loading...
Compare original and translation side by side
Skill by ara.so — Daily 2026 Skills collection.
~/.claude/projects/由ara.so开发的Skill——属于Daily 2026 Skills合集。
~/.claude/projects/git clone https://github.com/nateherkai/token-dashboard.git
cd token-dashboard
python3 cli.py dashboardpip installgit clone https://github.com/nateherkai/token-dashboard.git
cd token-dashboard
py -3 cli.py dashboardgit clone https://github.com/nateherkai/token-dashboard.git
cd token-dashboard
python3 cli.py dashboardpip installgit clone https://github.com/nateherkai/token-dashboard.git
cd token-dashboard
py -3 cli.py dashboardundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedpricing.json{
"models": {
"claude-opus-4-5": {
"input": 15.00,
"output": 75.00,
"cache_write": 18.75,
"cache_read": 1.50
}
},
"plans": {
"api": { "label": "API", "multiplier": 1.0 },
"pro": { "label": "Pro ($20/mo)", "multiplier": 0.0 },
"max": { "label": "Max ($100/mo)", "multiplier": 0.0 }
}
}pricing.json{
"models": {
"claude-opus-4-5": {
"input": 15.00,
"output": 75.00,
"cache_write": 18.75,
"cache_read": 1.50
}
},
"plans": {
"api": { "label": "API", "multiplier": 1.0 },
"pro": { "label": "Pro ($20/mo)", "multiplier": 0.0 },
"max": { "label": "Max ($100/mo)", "multiplier": 0.0 }
}
}| OS | Path |
|---|---|
| macOS / Linux | |
| Windows | |
~/.claude/token-dashboard.db| 操作系统 | 路径 |
|---|---|
| macOS / Linux | |
| Windows | |
~/.claude/token-dashboard.db| Tab | What it shows |
|---|---|
| Overview | All-time totals, daily charts, cost by plan, top tools, recent sessions |
| Prompts | Most expensive user prompts ranked by tokens; click to see tool calls and result sizes |
| Sessions | Turn-by-turn view with per-turn tokens and tool calls |
| Projects | Per-project comparison: tokens, sessions, files touched |
| Skills | Most-invoked skills and their token costs |
| Tips | Rule-based suggestions (repeated file reads, oversized tool results, low cache-hit rate) |
| Settings | Switch between API / Pro / Max pricing plans |
| 标签页 | 展示内容 |
|---|---|
| 概览 | 全时段总计、每日图表、按套餐划分的成本、高频使用工具、近期会话 |
| 提示 | 按令牌数排序的最昂贵用户提示;点击可查看工具调用和结果大小 |
| 会话 | 逐轮次视图,包含每轮的令牌数和工具调用 |
| 项目 | 项目对比:令牌数、会话数、涉及文件 |
| Skills | 调用最频繁的Skills及其令牌成本 |
| 提示建议 | 基于规则的优化建议(重复文件读取、过大工具结果、低缓存命中率) |
| 设置 | 在API / Pro / Max定价套餐间切换 |
http://127.0.0.1:8080/api/undefinedhttp://127.0.0.1:8080/api/undefinedundefinedundefinedpython3 cli.py scanimport sqlite3
import os
db_path = os.path.expanduser("~/.claude/token-dashboard.db")
conn = sqlite3.connect(db_path)python3 cli.py scanimport sqlite3
import os
db_path = os.path.expanduser("~/.claude/token-dashboard.db")
conn = sqlite3.connect(db_path)undefinedundefinedimport sqlite3
import os
db_path = os.path.expanduser("~/.claude/token-dashboard.db")
conn = sqlite3.connect(db_path)
cursor = conn.execute("""
SELECT
date(created_at) as day,
SUM(input_tokens) as total_input,
SUM(output_tokens) as total_output,
SUM(cache_read_tokens) as total_cache_read,
SUM(cost_usd) as total_cost
FROM turns
GROUP BY date(created_at)
ORDER BY day DESC
LIMIT 30
""")
for row in cursor.fetchall():
print(f"{row[0]}: ${row[4]:.4f} ({row[1]} in, {row[2]} out, {row[3]} cached)")
conn.close()import sqlite3
import os
db_path = os.path.expanduser("~/.claude/token-dashboard.db")
conn = sqlite3.connect(db_path)
cursor = conn.execute("""
SELECT
date(created_at) as day,
SUM(input_tokens) as total_input,
SUM(output_tokens) as total_output,
SUM(cache_read_tokens) as total_cache_read,
SUM(cost_usd) as total_cost
FROM turns
GROUP BY date(created_at)
ORDER BY day DESC
LIMIT 30
""")
for row in cursor.fetchall():
print(f"{row[0]}: ${row[4]:.4f} ({row[1]} in, {row[2]} out, {row[3]} cached)")
conn.close()import sys
import osimport sys
import osundefinedundefinedimport urllib.request
import jsonimport urllib.request
import jsonundefinedundefinedrm ~/.claude/token-dashboard.db
python3 cli.py scanrm ~/.claude/token-dashboard.db
python3 cli.py scanPORT=9090 python3 cli.py dashboardPORT=9090 python3 cli.py dashboardpython3 cli.py tips > optimization-tips.txtpython3 cli.py tips > optimization-tips.txtundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefined| Problem | Solution |
|---|---|
| "No data" / empty charts | Run |
| Port 8080 in use | |
| Numbers stuck/wrong | Delete |
| Two instances running | Stop all instances first — they fight over the SQLite DB |
| Use |
| No sessions found | Ensure Claude Code has been used and files exist in |
| 问题 | 解决方案 |
|---|---|
| "无数据"/图表为空 | 运行 |
| 端口8080被占用 | 使用 |
| 数据停滞/错误 | 删除 |
| 两个实例同时运行 | 先停止所有实例——它们会争夺SQLite数据库 |
Windows系统找不到 | 使用 |
| 未找到会话 | 确保已使用Claude Code,且 |
cli.py
└─► token_dashboard/scanner.py # reads JSONL, dedupes by message.id, writes SQLite
└─► token_dashboard/server.py # serves /api/* JSON routes + web/ static files
└─► web/ # vanilla JS + vendored ECharts, no build step
pricing.json # editable model/plan pricing
~/.claude/token-dashboard.db # SQLite cache (auto-created)message.idcli.py
└─► token_dashboard/scanner.py # 读取JSONL,按message.id去重,写入SQLite
└─► token_dashboard/server.py # 提供/api/* JSON路由 + web/静态文件
└─► web/ # 原生JS + 引入的ECharts,无需构建步骤
pricing.json # 可编辑的模型/套餐定价
~/.claude/token-dashboard.db # SQLite缓存(自动创建)message.id