cost-tracking
Track and report OpenAI Codex token usage, spending, and budgets from a local cost-tracking database. Use when the user asks about costs, spending, usage, tokens, budgets, or cost breakdowns by project, tool, session, or date.
npx skills add mturac/everything-openai-codex --skill cost-tracking --agent codex
Same command for any agent — swap --agent for claude-code, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Cost Tracking Use this skill to analyze OpenAI Codex cost and usage history from a local SQLite database. It is intended for users who already have a cost-tracking hook or plugin writing usage rows to `~/.codex-cost-tracker/usage.db`. Source: salvaged from stale community PR #1304 by `MayurBhavsar`. ## When to Use - The user asks "how much have I spent?", "what did this session cost?", or "what is my token usage?" - The user mentions budgets, spending limits, overruns, or cost controls. - The user wants a cost breakdown by project, tool, session, model, or date. - The user wants to compare today against yesterday or inspect a recent trend. - The user asks for a CSV export of recent usage records. ## How It Works First verify prerequisites: ```bash command -v sqlite3 >/dev/null && echo "sqlite3 available" || echo "sqlite3 missing" test -f ~/.codex-cost-tracker/usage.db && echo "Database found" || echo "Database not found" ``` If the database is missing, do not fabricate usage data. Tell the user that cost tracking is not configured and suggest installing or enabling a trusted local cost-tracking hook/plugin. The expected `usage` table usually contains one row per tool call or mode
- When to Use
- How It Works
- Examples
- Quick Summary
- Cost By Project
- Cost By Tool
- Last Seven Days
- Session Drilldown
- Reporting Guidance
- Anti-Patterns
- Related
command -v sqlite3 >/dev/null && echo "sqlite3 available" || echo "sqlite3 missing" test -f ~/.codex-cost-tracker/usage.db && echo "Database found" || echo "Database not found" sqlite3 ~/.codex-cost-tracker/usage.db " SELECT FROM usage; sqlite3 -header -column ~/.codex-cost-tracker/usage.db " SELECT project, ROUND(SUM(cost_usd), 4) AS cost, COUNT(*) AS calls FROM usage GROUP BY project ORDER BY cost DESC;
What does the cost-tracking skill do?
Track and report OpenAI Codex token usage, spending, and budgets from a local cost-tracking database. Use when the user asks about costs, spending, usage, tokens, budgets, or cost breakdowns by project, tool, session, or date.
How do I install it?
Run `npx skills add mturac/everything-openai-codex --skill cost-tracking --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From mturac/everything-openai-codex, a repository with 84 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
