Agent skill

Cost Tracker

by zeuikli in zeuikli/claude-code-workspace

追蹤並計算當前 session 的 Token 使用量和花費(USD)。產出前後對比報告,幫助使用者了解 workspace 優化的實際效益。

No licenceAuto-check passedAI & LLM Engineering

Install Cost Tracker

skills CLI
$ npx skills add zeuikli/claude-code-workspace --skill cost-tracker -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install zeuikli/claude-code-workspace cost-tracker --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/zeuikli/claude-code-workspace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/cost-tracker .claude/skills/cost-tracker && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
cost-tracker
GitHub stars
156
Token cost
~830 tokens
SKILL.md length
164 words
Files
1
Skills in repo
19
Repo updated
First seen
Licence
None found

At a glance

追蹤並計算當前 session 的 Token 使用量和花費(USD)。產出前後對比報告,幫助使用者了解 workspace 優化的實際效益。

  • Works in 3 steps: 統計當前 session 的 Token 使用量 → 計算花費(USD) → 產出前後對比
  • Tasks that involve LLM cost and token optimization
  • SKILL.md covers 定價表(2026-05,官方 Opus 4.8 發布後), 使用方式, 計算公式 and 分層估算模型, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Cost Tracker is an agent skill from zeuikli/claude-code-workspace. 追蹤並計算當前 session 的 Token 使用量和花費(USD)。產出前後對比報告,幫助使用者了解 workspace 優化的實際效益。

Its SKILL.md is about 830 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in AI & LLM Engineering, covering LLM cost and token optimization.

When your agent uses it

  • Tasks that involve LLM cost and token optimization

Example prompts

  • “/cost-tracker”

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. 統計當前 session 的 Token 使用量
  2. 計算花費(USD)
  3. 產出前後對比

What it can do on your machine

Read from SKILL.md and the folder at commit 807b285. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are markdown and typescript).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • platform.claude.com
    • code.claude.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Cost Tracker loads about 830 tokens when it runs. Until then it costs about 21 tokens; SKILL.md has 164 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~21
When it runs · the whole SKILL.md, loaded when a task matches
~830

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

Without a licence we can't republish the file, so here is its outline and opening line. It has 164 words (~830 tokens).

name
cost-tracker
disable-model-invocation
true

Read the full SKILL.md on GitHub

Files

Just SKILL.md in .claude/skills/cost-tracker of zeuikli/claude-code-workspace.

Open the folder on GitHubat commit 807b285

Compare with similar skills

Cost Tracker next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Cost Tracker compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Cost Tracker this skillzeuikli/claude-code-workspace156—~830Automated safety check: PassNone
Context Compressionguanyang/open-agent-hub9752 repos~4.6kAutomated safety check: PassMIT
Bounty Hunter1sadjlk/bounty-hunter-skill2821 repos~761Automated safety check: PassMIT
Skill Shortenerluongnv89/asm953—~3.8kAutomated safety check: NotesMIT
Fleet Auditoralexgreensh/token-optimizer2.5k—~1.7kAutomated safety check: PassCustom licence
Headroommomori777/Artemis377—~562Automated safety check: PassMIT

Similar skills

  • Context Compression

    guanyang/open-agent-hub

    This skill should be used when long-running agent sessions need context compression, structured summarization, compaction, token-per-task optimization, or durable handoff summaries that preserve…

    975 GitHub starsUsed in 2 repos~4.6k tokens
    AI & LLM EngineeringAuto-check passed
  • Bounty Hunter

    1sadjlk/bounty-hunter-skill

    A professional AI bounty hunter persona named Atlas. An agent skill from 1sadjlk/bounty-hunter-skill.

    282 GitHub starsUsed in 1 repo~761 tokens
    AI & LLM EngineeringAuto-check passed
  • Skill Shortener

    luongnv89/asm

    Refactor a too-long SKILL.md by progressive disclosure: measure token cost, classify every section KEEP/CUT/MOVE, shorten the body into references/ and scripts/, verify nothing was lost.

    953 GitHub stars~3.8k tokensUpdated 2 days ago
    AI & LLM EngineeringAuto-check: notes
  • Fleet Auditor

    alexgreensh/token-optimizer

    Cross-system agent token/cost audit (Claude Code, Codex, OpenClaw, Hermes, OpenCode): idle burns, model misrouting, config bloat, with dollar savings.

    2.5k GitHub stars~1.7k tokensUpdated 3 days ago
    AI & LLM EngineeringAuto-check passed
  • Headroom

    momori777/Artemis

    SmartCrusher + CCR context compression — crunch large JSON arrays, tool outputs, and search results to save tokens.

    377 GitHub stars~562 tokensUpdated 8 days ago
    AI & LLM EngineeringAuto-check passed
  • Context Audit

    undefined-ui/second-brain-os

    Audit an agent's context layout against the four places: system prompt, tools, history, tail.

    1k GitHub stars~802 tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed

More from zeuikli/claude-code-workspace

All 19 skills in this repo
  • Map

    zeuikli/claude-code-workspace

    產出 codebase 語意符號地圖(classes、functions、interfaces、types 的精確 file:line 位置)。適合在大型重構前或接手陌生 codebase 時使用。

    156 GitHub starsUsed in 1 repo~449 tokens
    Auto-check passed
  • Perf

    zeuikli/claude-code-workspace

    效能分析與最佳化:量測 baseline、定位瓶頸、優化最高影響項、驗證改善效果。適用於應用程式慢、API 超時、前端 Core Web Vitals 問題。

    156 GitHub starsUsed in 1 repo~469 tokens
    Auto-check passed
  • Research Best Practices

    zeuikli/claude-code-workspace

    研究外部 Claude Code best practice 來源(GitHub repos、官方 docs、blog),對比現有 workspace 做 gap analysis,產出可操作建議清單。

    156 GitHub stars~724 tokensUpdated 2 days ago
    Auto-check passed
  • Writing

    zeuikli/claude-code-workspace

    文案撰寫全套工作流:分析受眾語調、套用說服公式(AIDA/PAS/FAB)、產出部落格/Email/Landing Page/社群文案,並提供 SEO 優化建議。適合在撰寫行銷文案、內容行銷、或需要匹配特定品牌語調時使用。

    156 GitHub starsUsed in 1 repo~438 tokens
    Auto-check passed
  • Add Skill

    zeuikli/claude-code-workspace

    建立符合官方規格的 Claude Code skill:蒐集需求、產出正確格式的 SKILL.md、驗證命名與描述規則、套用 Progressive Disclosure 結構。適合在新增 skill 或 slash command 時使用。

    156 GitHub stars~1k tokensUpdated 2 days ago
    Auto-check passed
  • Agent Team

    zeuikli/claude-code-workspace

    啟動 Agent Team 模式,多個 worker 平行處理任務並共享發現。適用於大型重構、codebase 遷移、全面審查。

    156 GitHub stars~502 tokensUpdated 2 days ago
    Auto-check passed

Questions about Cost Tracker

What does Cost Tracker do?

追蹤並計算當前 session 的 Token 使用量和花費(USD)。產出前後對比報告,幫助使用者了解 workspace 優化的實際效益。. Cost Tracker is an agent skill from zeuikli/claude-code-workspace.

When should I use Cost Tracker?

Cost Tracker fits situations like: tasks that involve LLM cost and token optimization.

How do I install Cost Tracker in Claude Code?

Run `npx skills add zeuikli/claude-code-workspace --skill cost-tracker -a claude-code`. Or copy the skill folder (.claude/skills/cost-tracker in zeuikli/claude-code-workspace) into .claude/skills/cost-tracker in your project. Claude Code loads it when a task matches its description.

How do I install Cost Tracker in Codex?

Run `npx skills add zeuikli/claude-code-workspace --skill cost-tracker -a codex`. Or copy the skill folder (.claude/skills/cost-tracker in zeuikli/claude-code-workspace) into .agents/skills/cost-tracker in your project. Codex loads it when a task matches its description.

Can I use Cost Tracker in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add zeuikli/claude-code-workspace --skill cost-tracker -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/cost-tracker, .gemini/skills/cost-tracker, .github/skills/cost-tracker and .opencode/skills/cost-tracker in your project.

What does Cost Tracker need to run?

SKILL.md names no scripts, command-line tools or credentials: Cost Tracker is instructions for the agent only.

Does Cost Tracker access the network?

SKILL.md names 2 domains. As links in the text: platform.claude.com and code.claude.com. This is read from the text; nothing was executed.

Is Cost Tracker safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Cost Tracker use?

No licence was found for Cost Tracker or its repository. Without one, default copyright applies: ask the author before reusing or redistributing it.

How many tokens does Cost Tracker use?

About 830 tokens (SKILL.md is roughly 3.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Cost Tracker?

Skills that share tags, products or a category with Cost Tracker: Context Compression (guanyang/open-agent-hub, 975 stars), Bounty Hunter (1sadjlk/bounty-hunter-skill, 282 stars), Skill Shortener (luongnv89/asm, 953 stars) and Fleet Auditor (alexgreensh/token-optimizer, 2.5k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Cost Tracker?

zeuikli (a GitHub user) maintains it in zeuikli/claude-code-workspace, which has 156 GitHub stars. The repository holds 19 skills in this directory. The repository was last updated on October 6, 2026.

Source: zeuikli/claude-code-workspace on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.