token usage hooks

16 tagged token usage, measured the same way as everything else here.

Browse within: agentskills 13claude-code-skill 13context-window 13token-optimization 13

UserPromptSubmit

04

peiris/token-cost

Hook

Runs when you submit a prompt, before the agent sees it, executing intercept.py via python3. From peiris/token-cost.

2 5d ago A tokens not measured original MIT

Stop

05

peiris/token-cost

Hook

Runs when the agent finishes a response, executing record.py via python3. From peiris/token-cost.

2 5d ago A tokens not measured original MIT

SessionStart

06

peiris/token-cost

Hook

Runs when a session starts, executing record.py and install_shim.py via python3 with --sync (2 commands). From peiris/token-cost.

2 5d ago A tokens not measured original MIT