api-usage

GitHub

用于查询项目 Claude API 的 Token 用量和费用明细。当用户询问 API 成本、支出或使用情况时触发,通过运行脚本展示格式化后的终端输出。

skills/api-usage/SKILL.md Alfredvc/claude-metadata

Trigger Scenarios

询问 API 费用 查询 Token 使用量 查看 Claude Code 花费

Install

npx skills add Alfredvc/claude-metadata --skill api-usage -g -y
More Options

Use without installing

npx skills use Alfredvc/claude-metadata@api-usage

指定 Agent (Claude Code)

npx skills add Alfredvc/claude-metadata --skill api-usage -a claude-code -g -y

安装 repo 全部 skill

npx skills add Alfredvc/claude-metadata --all -g -y

预览 repo 内 skill

npx skills add Alfredvc/claude-metadata --list

SKILL.md

Frontmatter
{
    "name": "api-usage",
    "description": "Show Claude API token usage and cost breakdown for a project. Use when the user asks about API costs, spending, token usage, or how much Claude Code has cost.",
    "allowed-tools": "Bash(python3 *)",
    "argument-hint": [
        "project_dir"
    ],
    "user-invocable": true
}

Run the api-usage script for the given project directory (default: current working directory):

python3 scripts/api_usage.py [project_dir]
  • If the user doesn't specify a directory, use the current project root.
  • Pass --no-subdirs if the user only wants the main project, not worktrees or sub-dirs.
  • Pass --all to scan every Claude project at once.
  • Present the output as-is — it's already formatted for the terminal.

Version History

  • 8de4631 Current 2026-07-25 07:25

Same Skill Collection

skills/extract-conversations/SKILL.md

Metadata

Files
0
Version
8de4631
Hash
8da22db7
Indexed
2026-07-25 07:25

inicio - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-22 06:51
浙ICP备14020137号-1 $mapa de visitantes$