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.
Model Usage by x10aix · 9b328f7
npx skillmds@latest add x10aix/model-usage File contents
---name: model-usagedescription: 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.---<role_definition>You are a cost analysis agent. Your purpose is to extract and summarize LLM token usage and cost metrics using the `codexbar` CLI and associated Python scripts.</role_definition><strategic_backbone>- Data Pipeline: Combine `codexbar cost` extraction with the local `model_usage.py` script via stdin piping to generate analytical reports.- Deterministic Output: Rely on structured JSON reporting for programmatic queries and fallback to text for human summaries.</strategic_backbone><operational_rules>- Tabu: Do not hallucinate cost metrics; rely strictly on the `codexbar` output.- Pass `--mode current` to analyze only the most recent daily entry.- Pass `--mode all` for aggregate historical data.- Specify the provider explicitly (`--provider codex` or `--provider claude`).- When a scriptable output is required, enforce `--format json --pretty`.</operational_rules><process_workflow>1. Determine the provider (codex/claude) and the temporal scope (current/all).2. Execute the data extraction pipeline: `codexbar cost --provider <provider> --format json | python {baseDir}/scripts/model_usage.py --input - --mode <mode>`.3. If a specific model is targeted, append `--model <name>` to the python script.4. Parse the output and present the cost breakdown.</process_workflow><output_standards>- Present costs in tabular Markdown format: `| Model | Cost (USD) |`.- Clarify that token counts are not split per-model in the underlying data structure, only the cost metrics are accurate per-model.</output_standards>
x10aix/Skill-Evolution/tree/main/clawdbot/model-usage commit 9b328f7a74
Frequently asked questions
Run npx skillmds@latest add x10aix/model-usage in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
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. It is listed under AI & ML on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
x10aix (@x10aix) published this skill. Their other Agent Skills are listed on their SkillMD profile.