Model usage

From ericwang915/PythonClaw · View interactive version

Model usage is an AI agent skill from the GitHub repository ericwang915/PythonClaw. Track and display LLM token usage, costs, and model statistics. Use when: user asks about token usage, API costs, how many messages were sent, or model performance stats. NOT for: changing the model or provider (use change_setting), or viewing conversation content (use session_logs).

How to use this skill

Skill file

Model Usage

Track and display LLM token usage, costs, and session statistics.

When to Use

✅ USE this skill when:

When NOT to Use

❌ DON'T use this skill when:

Usage

Current session stats

python {skill_path}/usage_stats.py

Check detailed interaction log

The history_detail.jsonl file under ~/.pythonclaw/context/logs/ contains

structured records of every agent interaction, including:

python {skill_path}/usage_stats.py --log ~/.pythonclaw/context/logs/history_detail.jsonl

Quick stats via jq (if installed)

# Count total interactions
wc -l ~/.pythonclaw/context/logs/history_detail.jsonl

# Recent entries
tail -5 ~/.pythonclaw/context/logs/history_detail.jsonl | python -m json.tool

Notes

Resources

| File | Description |

|------|-------------|

| usage_stats.py | Parse and summarise usage from history logs |

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.