with one click
ai-usage
Track AI coding tool token usage, costs, and environmental impact
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Track AI coding tool token usage, costs, and environmental impact
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
Process autonomous task queue from do-work/ folder
Enter plan mode for complex tasks (pour energy into the plan for 1-shot implementation)
Initiate autonomous PR review process with Codex agent
Run comprehensive repo assessment with Codex (every 3 PRs)
Comprehensive security audit covering 10 threat categories
Install all automation for a new repo (git hooks + GitHub Actions)
| name | ai-usage |
| description | Track AI coding tool token usage, costs, and environmental impact |
Created: 2026-02-18-00-00 Last Updated: 2026-02-19-00-00
Track your token usage and costs across all your AI coding tools in one place. See daily and cumulative spending across Codex, Codex CLI, and Gemini CLI -- plus estimated environmental impact (energy, CO2, water) so you know the full cost of your AI-assisted development.
/ai-usage # Full history, opens in browser
/ai-usage --since 20260201 # Filter from date
/ai-usage --until 20260215 # Filter to date
/ai-usage --since 20260201 --until 20260215 # Date range
/ai-usage --no-open # Generate without opening browser
/ai-usage --output ~/Desktop/report.html # Custom output path
tokenprint.py from TokenPrintccusage daily --jsonnpx @ccusage/codex@latest daily --json~/.gemini/telemetry.log (optional)| Dependency | Install | Required? |
|---|---|---|
| Python 3.9+ | Pre-installed on macOS | Yes |
ccusage | npm i -g ccusage | Yes (for Codex data) |
@ccusage/codex | Runs via npx (no install) | Yes (for Codex data) |
| TokenPrint | Installed by bootstrap (or git clone) | Yes |
| Gemini CLI telemetry | setup-gemini-telemetry.sh (in TokenPrint) | No (optional) |
Gemini CLI doesn't expose usage history directly. To track Gemini usage going forward:
# One-time setup - enables OpenTelemetry local logging
bash ~/.crosscheck/scripts/setup-gemini-telemetry.sh
This adds telemetry config to ~/.gemini/settings.json. Future Gemini CLI sessions will log token usage to ~/.gemini/telemetry.log. Historical Gemini data cannot be backfilled.
Usage & Cost (primary):
Environmental Impact (secondary):
| Parameter | Value | Source |
|---|---|---|
| Output tokens | 0.001 Wh/token | Industry estimate |
| Input tokens | 0.0002 Wh/token | Industry estimate |
| Cached tokens | 0.00005 Wh/token | Industry estimate |
| PUE | 1.2 | Data center overhead |
| Embodied carbon | 20% | Hardware manufacturing |
| Grid loss | 6% | Transmission losses |
| Carbon intensity | 390 gCO2e/kWh | US average grid |
| Water usage | 0.5 L/kWh | Data center WUE |
Find tokenprint.py from TokenPrint. Check these locations in order:
TokenPrint/tokenprint.py as a sibling of the CrossCheck directory (e.g., ~/Documents/Developer/TokenPrint/tokenprint.py)~/.tokenprint/tokenprint.pyRun whichever is found first:
python3 <resolved-path> [OPTIONS]
Pass through any arguments the user provided (e.g., --since, --until, --no-open, --output).
If not found, tell the user: git clone https://github.com/sburl/TokenPrint.git ~/.tokenprint
If ccusage is not installed, inform the user and suggest npm i -g ccusage.
/repo-assessment - Comprehensive repo health check/codex-delegate - Delegate tasks to Codex/gemini-delegate - Delegate tasks to Gemini