task-token-usage

Analyzes Claude Code session traces to report token usage per task.

1.1k|144|Updated Mar 12, 2018
One-click install
npx skills add https://github.com/platonai/Browser4 --skill task-token-usage
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: task-token-usage
Source: https://github.com/platonai/Browser4/tree/main/coworker/skills/task-token-usage
Command: npx skills add https://github.com/platonai/Browser4 --skill task-token-usage

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires python3, and includes scripts (resource) components.

What problem does it solve?

This Skill helps users analyze Claude Code session traces and draft task files to report token usage per task, aiding in understanding session costs and task efficiency.

Core Features & Use Cases

  • Token Usage Analysis: Analyzes session traces to report token consumption per task.
  • Session Cost Tracking: Provides insights into session costs and task efficiency.
  • Use Case: Ideal for developers or project managers who need to monitor the resource usage of Claude Code tasks.

Quick Start

Run the script to list tasks with their token usage for the last 24 hours:

python3 coworker/skills/task-token-usage/scripts/list-tasks.py

Frequently Asked Questions about task-token-usage

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I track token usage per task in Claude Code sessions?

Token usage per task in Claude Code is tracked by analyzing session traces to extract input and output tokens, matching them to draft task files, and printing a summary table of the results.

How do I monitor session costs for Claude Code workflows?

Session costs for Claude Code workflows are monitored by running a Python script that analyzes session traces and reports token consumption per task to provide efficiency insights.

What is the best way to analyze Claude Code session traces for token consumption?

The best way to analyze Claude Code session traces for token consumption is executing the list-tasks.py Python script, which extracts token data and matches sessions to draft task files.

Do I need Python to analyze Claude Code task efficiency and token metrics?

Yes, you need Python3 to analyze Claude Code task efficiency and token metrics, as the Skill relies on executing specific Python scripts to process session traces and generate usage summaries.

Can I extract input and output tokens from Claude Code session traces automatically?

Yes, input and output tokens are extracted automatically from Claude Code session traces by running the analysis script, which maps the extracted data to draft task files for reporting.