一键导入
cc-optimizer-analyze
Analyze Claude Code transcripts: aggregate token usage, models, cache metrics per project (zero model tokens spent, pure arithmetic).
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Analyze Claude Code transcripts: aggregate token usage, models, cache metrics per project (zero model tokens spent, pure arithmetic).
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Preview or apply per-project config optimizations: model choice, subagent models, cache tuning (dry-run default, use --apply to write).
v2: Analyze MCP/plugin/connector usage: compare what's exposed vs. what's actually used, generate per-project cleanup recommendations.
Run full cc-optimizer pipeline: analyze Claude Code logs, identify quota waste, generate findings report with $ estimates. Auto-detects ~/.claude/projects (zero-config).
| name | cc-optimizer:analyze |
| description | Analyze Claude Code transcripts: aggregate token usage, models, cache metrics per project (zero model tokens spent, pure arithmetic). |
| argument-hint | [path/to/sessions] [output.json] |
| allowed-tools | Bash, Read |
Low-level analyzer: aggregates Claude Code session transcripts into per-project statistics without spending any model tokens.
/cc-optimizer:analyze # Uses ~/.claude/projects
/cc-optimizer:analyze /path/to/sessions optimizer/out/raw-stats.json
{
"projects": {
"project-slug": {
"sessions": 150,
"total_tokens": 8048909762,
"input_tokens": 156819318,
"output_tokens": 257451667,
"cache_creation": 2150345336,
"cache_read": 30117123696,
"cache_hit_ratio": 0.9288,
"by_model": {
"claude-opus-4-8": { "msgs": 5000, "tokens": 18012088391 },
...
}
}
}
}
message.usage data