model-usage
Use CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/bkes994408-cmd/token-usage-dashboardWhat This Skill Does
The model-usage skill provides an interface to analyze local cost logs generated by the CodexBar CLI. It is designed to help users track, summarize, and visualize expenditure across different AI models, specifically targeting Codex and Claude providers. By parsing the JSON output from CodexBar, this skill automates the calculation of usage costs, allowing for either a high-level summary of the most recently used model or a comprehensive breakdown of all models utilized over a period. It effectively acts as a bridge between raw CLI logs and actionable financial or usage insights, making it indispensable for power users who need to keep a close eye on their AI consumption.
Installation
To integrate this skill into your environment, use the OpenClaw installation command. Ensure you have the CodexBar CLI properly installed and configured on your system before proceeding. Run the following command in your terminal:
clawhub install openclaw/skills/skills/bkes994408-cmd/token-usage-dashboard
Note: For Linux users, please consult the upcoming documentation regarding specific CLI install paths, as support is currently undergoing final verification. Once installed, the Python scripts will be available in your local base directory.
Use Cases
This skill is ideal for several scenarios: monitoring budget consumption for individual projects, identifying which AI model contributes most to your monthly bill, and detecting anomalous usage patterns. For instance, developers can use the token_usage_dashboard.py utility to generate an HTML report, complete with automated spike detection to identify days where AI consumption significantly exceeded your typical threshold. It is also excellent for automated reporting, as you can pipe raw JSON output directly from the CodexBar CLI into the script, enabling integration into larger CI/CD or internal management workflows.
Example Prompts
- "Analyze my Codex usage for the last 30 days and generate a dashboard to check for any spending spikes."
- "Show me the current model breakdown for Claude from my local cost logs."
- "Summarize all model costs from my cost.json file and output the results as a pretty-printed JSON."
Tips & Limitations
The skill performs cost-only analysis; it does not currently parse individual token counts by model because the underlying CodexBar output aggregates those differently. If the model-specific breakdown is missing in the log, the script intelligently falls back to the last entry in the modelsUsed array. To gain the most granular data, ensure your codexbar version is up to date and that you are consistently logging with the appropriate --format json flags. When debugging cost discrepancies, use the --model <name> override to isolate specific architectures and verify their impact on your total spend.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-bkes994408-cmd-token-usage-dashboard": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: file-read, file-write, code-execution