Agent skill · Databases

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.

mturacgithub.com/mturacGitHub ↗
codexcopilotcursorMIT
Install
npx skills add mturac/everything-openai-codex --skill cost-tracking --agent codex

Same command for any agent — swap --agent for claude-code, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 4 KB
Bundled scripts: none
Path: skills/cost-tracking/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 84
Language: JavaScript

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# 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

What's inside
Steps it walks through
  1. When to Use
  2. How It Works
  3. Examples
  4. Quick Summary
  5. Cost By Project
  6. Cost By Tool
  7. Last Seven Days
  8. Session Drilldown
  9. Reporting Guidance
  10. Anti-Patterns
  11. Related
Commands it runs
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;
More from everything-openai-codex
All skills →
About this skill
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.

Keep going