跳到正文
TakoAPI
返回技能列表

codesession

由 brian-mwirigi 提供

Web & Frontend Development
2.4k下载量由 clawskills.sh 提供
3星标
0浏览量
0 个赞登录后即可为这个技能点赞
—暂无评分
你的评分

简介

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

描述

该技能的功能

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.

何时使用

  • 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

示例工作流

输入

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

智能体
  1. 1

    Runs cs start "Fix authentication bug" --json --close-stale to open a tracked session

  2. 2

    After each API call, runs cs log-ai -p anthropic -m claude-sonnet-4 --prompt-tokens 8000 --completion-tokens 2000 --json to record usage

  3. 3

    Runs cs status --json to check current spend before expensive operations

  4. 4

    Runs cs end -n "Fixed auth bug, added tests" --json to close the session and capture git changes

输出

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

安装

clawhub install brian-mwirigi/codesession

运行 CLI 命令,或把这段提示词粘贴到 Claude Code、Cursor、Codex 或你在用的任意编程智能体里。

链接