[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-openclaw-openclaw-skills-model-usage":3},{"error":4,"detail":5,"metadata":44,"markdownContent":45,"rawMarkdown":41},false,{"repo_full_name":6,"owner":7,"repo_name":7,"repo_forks":8,"skill_path":9,"repo_stars":10,"name":11,"category_id":12,"description":13,"file_tree":14,"skill_md_content":41,"skill_id":42,"skill_key":43},"openclaw/openclaw","openclaw",64359,"skills/model-usage",330752,"model-usage",6,"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.",[15,20,29],{"name":16,"path":17,"size":18,"type":19},"SKILL.md","skills/model-usage/SKILL.md",2253,"file",{"name":21,"path":22,"type":23,"children":24},"references","skills/model-usage/references","folder",[25],{"name":26,"path":27,"size":28,"type":19},"codexbar-cli.md","skills/model-usage/references/codexbar-cli.md",1120,{"name":30,"path":31,"type":23,"children":32},"scripts","skills/model-usage/scripts",[33,37],{"name":34,"path":35,"size":36,"type":19},"model_usage.py","skills/model-usage/scripts/model_usage.py",10764,{"name":38,"path":39,"size":40,"type":19},"test_model_usage.py","skills/model-usage/scripts/test_model_usage.py",1310,"---\nname: model-usage\ndescription: 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.\nmetadata:\n  {\n    \"openclaw\":\n      {\n        \"emoji\": \"📊\",\n        \"os\": [\"darwin\"],\n        \"requires\": { \"bins\": [\"codexbar\"] },\n        \"install\":\n          [\n            {\n              \"id\": \"brew-cask\",\n              \"kind\": \"brew\",\n              \"formula\": \"steipete/tap/codexbar\",\n              \"bins\": [\"codexbar\"],\n              \"label\": \"Install CodexBar (brew cask)\",\n            },\n          ],\n      },\n  }\n---\n\n# Model usage\n\n## Overview\n\nGet per-model usage cost from CodexBar's local cost logs. Supports \"current model\" (most recent daily entry) or \"all models\" summaries for Codex or Claude.\n\nTODO: add Linux CLI support guidance once CodexBar CLI install path is documented for Linux.\n\n## Quick start\n\n1. Fetch cost JSON via CodexBar CLI or pass a JSON file.\n2. Use the bundled script to summarize by model.\n\n```bash\npython {baseDir}/scripts/model_usage.py --provider codex --mode current\npython {baseDir}/scripts/model_usage.py --provider codex --mode all\npython {baseDir}/scripts/model_usage.py --provider claude --mode all --format json --pretty\n```\n\n## Current model logic\n\n- Uses the most recent daily row with `modelBreakdowns`.\n- Picks the model with the highest cost in that row.\n- Falls back to the last entry in `modelsUsed` when breakdowns are missing.\n- Override with `--model \u003Cname>` when you need a specific model.\n\n## Inputs\n\n- Default: runs `codexbar cost --format json --provider \u003Ccodex|claude>`.\n- File or stdin:\n\n```bash\ncodexbar cost --provider codex --format json > /tmp/cost.json\npython {baseDir}/scripts/model_usage.py --input /tmp/cost.json --mode all\ncat /tmp/cost.json | python {baseDir}/scripts/model_usage.py --input - --mode current\n```\n\n## Output\n\n- Text (default) or JSON (`--format json --pretty`).\n- Values are cost-only per model; tokens are not split by model in CodexBar output.\n\n## References\n\n- Read `references/codexbar-cli.md` for CLI flags and cost JSON fields.\n","7ad1e61b-6275-5da5-8944-439a5c9b6047","openclaw-openclaw-skills-model-usage",{"name":11,"description":13},"\u003Ch1>Model usage\u003C/h1>\n\u003Ch2>Overview\u003C/h2>\n\u003Cp>Get per-model usage cost from CodexBar&#39;s local cost logs. Supports &quot;current model&quot; (most recent daily entry) or &quot;all models&quot; summaries for Codex or Claude.\u003C/p>\n\u003Cp>TODO: add Linux CLI support guidance once CodexBar CLI install path is documented for Linux.\u003C/p>\n\u003Ch2>Quick start\u003C/h2>\n\u003Col>\n\u003Cli>Fetch cost JSON via CodexBar CLI or pass a JSON file.\u003C/li>\n\u003Cli>Use the bundled script to summarize by model.\u003C/li>\n\u003C/ol>\n\u003Cdiv class=\"md-code-block\">\u003Cdiv class=\"md-code-lang\">bash\u003C/div>\u003Cpre>\u003Ccode class=\"hljs language-bash\">python {baseDir}/scripts/model_usage.py --provider codex --mode current\npython {baseDir}/scripts/model_usage.py --provider codex --mode all\npython {baseDir}/scripts/model_usage.py --provider claude --mode all --format json --pretty\u003C/code>\u003C/pre>\u003C/div>\u003Ch2>Current model logic\u003C/h2>\n\u003Cul>\n\u003Cli>Uses the most recent daily row with \u003Ccode>modelBreakdowns\u003C/code>.\u003C/li>\n\u003Cli>Picks the model with the highest cost in that row.\u003C/li>\n\u003Cli>Falls back to the last entry in \u003Ccode>modelsUsed\u003C/code> when breakdowns are missing.\u003C/li>\n\u003Cli>Override with \u003Ccode>--model &lt;name&gt;\u003C/code> when you need a specific model.\u003C/li>\n\u003C/ul>\n\u003Ch2>Inputs\u003C/h2>\n\u003Cul>\n\u003Cli>Default: runs \u003Ccode>codexbar cost --format json --provider &lt;codex|claude&gt;\u003C/code>.\u003C/li>\n\u003Cli>File or stdin:\u003C/li>\n\u003C/ul>\n\u003Cdiv class=\"md-code-block\">\u003Cdiv class=\"md-code-lang\">bash\u003C/div>\u003Cpre>\u003Ccode class=\"hljs language-bash\">codexbar cost --provider codex --format json &gt; /tmp/cost.json\npython {baseDir}/scripts/model_usage.py --input /tmp/cost.json --mode all\n\u003Cspan class=\"hljs-built_in\">cat\u003C/span> /tmp/cost.json | python {baseDir}/scripts/model_usage.py --input - --mode current\u003C/code>\u003C/pre>\u003C/div>\u003Ch2>Output\u003C/h2>\n\u003Cul>\n\u003Cli>Text (default) or JSON (\u003Ccode>--format json --pretty\u003C/code>).\u003C/li>\n\u003Cli>Values are cost-only per model; tokens are not split by model in CodexBar output.\u003C/li>\n\u003C/ul>\n\u003Ch2>References\u003C/h2>\n\u003Cul>\n\u003Cli>Read \u003Ccode>references/codexbar-cli.md\u003C/code> for CLI flags and cost JSON fields.\u003C/li>\n\u003C/ul>\n"]