# Cost Tracker

> Use this skill when the user wants to inspect Codex token usage or session counts for a workspace, summarize recent Codex sessions, or compare usage across recent threads.

- Skill: `koyonx/cost-tracker` (Agent Skill, multi-file: 3 files)
- Install (CLI): `npx skillmds@latest add koyonx/cost-tracker`
- Raw SKILL.md: https://api.skillmd.com/api/skills/koyonx/cost-tracker/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Research & Search
- Author: koyonx (https://skillmd.com/u/koyonx)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/koyonx/cost-tracker

---


# Cost Tracker

## Overview

Use this skill to summarize real Codex session usage from `~/.codex/sessions` and `~/.codex/state_5.sqlite`.
It is useful for answering questions like "how much did this project use?" or "which recent sessions were expensive?"

## Workflow

1. Run `scripts/summarize_sessions.py --project-root <path>` for project totals.
2. Add `--since-days` or `--limit` for narrower slices.
3. Use the output to answer with session counts, input/output totals, and cache usage.
4. If no Codex session data exists for the target path, say so explicitly.

## Resources

- Script: `scripts/summarize_sessions.py`

