ワンクリックで
cost-audit
Analyzes the current session's token usage, pinpoints where tokens were wasted, and produces concrete optimization actions
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Analyzes the current session's token usage, pinpoints where tokens were wasted, and produces concrete optimization actions
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Generates API documentation from route definitions (Express, Fastify, Hono, etc.)
Adds caching to expensive operations - Redis, in-memory, HTTP cache headers
Staged değişiklikleri analiz edip Conventional Commits formatında commit mesajı oluşturur
Reports cyclomatic complexity hotspots and refactoring suggestions
Finds unused functions, variables, exports, and dependencies across the codebase
Hata mesajı veya stack trace alır, kök nedeni bulur ve düzeltir
| name | cost-audit |
| description | Analyzes the current session's token usage, pinpoints where tokens were wasted, and produces concrete optimization actions |
| user-invocable | true |
| allowed-tools | Bash(claude*), Read, Grep |
| effort | low |
Make it visible where the tokens in this session actually went. Not guesses — evidence. Output: "do these 3 things next time and you save ~X%."
/cost
Note the output: total tokens, input/output split, cache hit rate, total $.
Scan the transcript for these signals:
| Signal | How to detect it | Why it wastes tokens |
|---|---|---|
| Unnecessary file reads | Read calls touching node_modules/, dist/, *.lock, coverage/ | Missing .claudeignore |
| Re-reading the same file | Same path appears in multiple Read calls | Context lost — /compact should have happened earlier |
| Reading entire large files | Read without limit on files >500 lines | Should have used offset/limit or Grep |
| Bash + grep/cat/find | Bash calls to grep, cat, find, ls -R | Dedicated tools (Grep/Glob/Read) are cheaper and more precise |
| Vague prompt → many tool calls | Single-word asks ("improve", "fix", "look") followed by 5+ tool calls | Prompt wasn't specific |
| Repeated onboarding research | Same concept re-discovered across sessions | Belongs in CLAUDE.md |
Give the user a report in this shape:
## Session summary
- Total: <tokens> (<$>)
- Cache hit: <%>
## Top 3 leaks
1. [Evidence]: X files under src/components/ were read in full; ~Y tokens combined
Fix: add to .claudeignore → <lines>
Estimated savings: ~Z%
2. ...
3. ...
## Action list
- [ ] Create .claudeignore with <lines>
- [ ] Add a "<topic>" section to CLAUDE.md
- [ ] Use `/compact <hint>` earlier in long sessions
If the user approves:
.claudeignore if missing, add the detected pathsCLAUDE.md scaffold if missing, seed it with the repeated-research topics/compact hint phrase for this project