AGENT SKILL

token-usage

Analyze Claude Code token usage across all projects and sessions

License 许可
MIT
最近更新
2026-11-06
Stars
★ 4
Forks
0

01 前言 Front Matter

name
token-usage
description
Analyze Claude Code token usage across all projects and sessions

02 资源文件 1

03 SKILL.md 正文

/token-usage - Token Usage Analyzer

Analyze your Claude Code token usage by scanning JSONL session files in ~/.claude/projects/.

Usage

/token-usage              # All time usage
/token-usage 7            # Last 7 days
/token-usage 2025-01-15   # Since specific date

What It Does

Scans all Claude Code session files and generates a markdown report with:

  • Grand totals — total tokens across all projects and sessions
  • Per-project breakdown — input, cache, output tokens by project
  • Costliest sessions — top 25 sessions by token count with first prompt
  • Subagent analysis — which subagents consumed the most tokens

Instructions

When this skill is invoked:

  1. Determine the time range from the user's argument:

    • No argument: all time
    • A number (e.g., 7): last N days
    • A date (e.g., 2025-01-15): since that date
  2. Run the analyzer script:

# All time
python3 ~/.claude/skills/token-usage/token-usage.py

# Last N days
SINCE_DAYS=7 python3 ~/.claude/skills/token-usage/token-usage.py

# Since date
SINCE_DATE=2025-01-15 python3 ~/.claude/skills/token-usage/token-usage.py
  1. Read and present the report from ~/.claude/usage/token_report.md

  2. Highlight key insights:

    • Which project uses the most tokens
    • Whether subagent usage is proportional
    • Any sessions that look unusually expensive
    • Cache hit ratio (cache_read vs cache_creation)

Output Location

Reports are written to ~/.claude/usage/token_report.md. This directory is gitignored — your usage data stays local and is never committed.

Privacy

This tool only reads your local session files. No data is sent anywhere. Reports stay in ~/.claude/usage/ on your machine.

04 同仓库更多 Skills

barkleesanders
barkleesanders/claude-code-starter

zi-search

暂无简介

★ 4
barkleesanders
barkleesanders/claude-code-starter

visualise

Render inline interactive visuals — SVG diagrams, HTML widgets, charts, and explainers — directly in the conversation. Use this skill whenever the user asks to visualize, diagram, chart, illustrate, or explain something visually, or when an explanation would genuinely benefit from a spatial/interactive diagram rather than text. Also triggers for: flowcharts, architecture diagrams, data visualizations, interactive explainers, comparison layouts, UI mockups, and any request containing 'show me', 'draw', 'map out', 'visualize', or 'diagram'. Even when the user doesn't explicitly ask for a visual, use this skill proactively when the topic has spatial, sequential, or systemic relationships that a diagram would clarify better than prose.

★ 4
barkleesanders
barkleesanders/claude-code-starter

video

When the user wants to create, generate, or produce video content using AI tools or programmatic frameworks. Also use when the user mentions 'video production,' 'AI video,' 'Remotion,' 'Hyperframes,' 'HeyGen,' 'Synthesia,' 'Veo,' 'Runway,' 'Kling,' 'Pika,' 'video generation,' 'AI avatar,' 'talking head video,' 'programmatic video,' 'video template,' 'explainer video,' 'product demo video,' 'video pipeline,' or 'make me a video.' Use this for video creation, generation, and production workflows. For video content strategy and what to post, see social-content. For paid video ad creative, see ad-creative.

★ 4
barkleesanders
barkleesanders/claude-code-starter

manim-video

Production pipeline for mathematical and technical animations using Manim Community Edition. Creates 3Blue1Brown-style explainer videos, algorithm visualizations, equation derivations, architecture diagrams, and data stories. Use when users request: animated explanations, math animations, concept visualizations, algorithm walkthroughs, technical explainers, 3Blue1Brown style videos, or any programmatic animation with geometric/mathematical content.

★ 4
barkleesanders
barkleesanders/claude-code-starter

video-use

Edit any video by conversation. Transcribe, cut, color grade, generate overlay animations, burn subtitles — for talking heads, montages, tutorials, travel, interviews. No presets, no menus. Ask questions, confirm the plan, execute, iterate, persist. Production-correctness rules are hard; everything else is artistic freedom.

★ 4
barkleesanders
barkleesanders/claude-code-starter

ui-improver

暂无简介

★ 4