LaunchKit · 2026
Back to Skills

Track agent session costs, file changes, and git commits with codesession-cli.

3
2.4k downloads
by @brian-mwirigi

Setup & Installation

openclaw skills install @brian-mwirigi/codesession

Or with the ClawHub CLI, for registry-managed skill folders outside a full OpenClaw workspace:

npx clawhub install codesession

Version History

v2.5.1Mar 7, 2026 - Version note by skill developer:

**Summary:** v2.5.1 introduces one-line session runs, new dashboard features, and multi-project context. - Added `cs run <command>` for streamlined session tracking, proxying, and cost summary in a single step - Introduced `cs today` for multi-project session context - Dashboard gains a Help tab for easier guidance - Maintains support for Codex pricing, with security and stability fixes - Documentation and descriptions updated to reflect new capabilities

What This Skill Does

codesession-cli tracks AI agent session costs, token usage, file changes, and git commits from a single CLI. Session data is stored locally with a web dashboard for cost breakdowns, budget alerts, and per-model analytics. Compatible with Claude Code, Codex, Cursor, Windsurf, Cline, and any agent using OpenAI or Anthropic-compatible APIs.

It works across Claude Code, Codex, Cursor, Windsurf, and Cline without requiring separate dashboards or vendor-specific integrations for each tool.

When to use it

  • Checking how much a Claude Code session cost before closing it
  • Setting a daily spend alert to avoid unexpected API bills
  • Attributing token costs to specific agents in a multi-agent pipeline
  • Comparing costs across Claude, GPT-4o, and Gemini for the same task type
  • Exporting session history to CSV for client billing or project tracking

Example Workflow

Here's how your AI assistant might use this skill in practice.

INPUT

User asks: Track costs for a bug-fix session using Claude

AGENT
  1. 1Runs `cs start "Fix authentication bug" --json --close-stale` to open a tracked session
  2. 2After each API call, runs `cs log-ai -p anthropic -m claude-sonnet-4 --prompt-tokens 8000 --completion-tokens 2000 --json` to record usage
  3. 3Runs `cs status --json` to check current spend before expensive operations
  4. 4Runs `cs end -n "Fixed auth bug, added tests" --json` to close the session and capture git changes
OUTPUT

Session summary with total AI cost, token counts, files changed, commits made, and access to the web dashboard for full analytics