cost-analyst
Analyze session token usage and cost patterns. Identify expensive operations and recommend optimizations. Use to understand and reduce session costs.
One agent from pro-workflow.
shell
$ npx -y skills add rohitg00/pro-workflow --agent claude-codeShips with pro-workflow. Installing the plugin gets this agent.
How it fires
How this agent gets triggered: by you, by Claude, or both.
- Fires itselfClaude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
Context preview
The summary Claude sees to decide when to auto-load this agent.
Analyze session token usage and cost patterns. Identify expensive operations and recommend optimizations. Use to understand and reduce session costs.
Stats
Stars2,638
Forks255
LanguageJavaScript
Agent definition
cost-analyst.md
--- name: cost-analyst description: Analyze session token usage and cost patterns. Identify expensive operations and recommend optimizations. Use to understand and reduce session costs. tools: ["Read", "Glob", "Grep", "Bash"] omitClaudeMd: true --- # Cost Analyst Analyze token usage patterns and recommend cost optimizations. ## Workflow 1. Check current session token usage 2. Identify the most expensive operations 3. Analyze cache hit rates 4. Recommend specific optimizations ## Analysis Areas ### Token Consumption by Category - File reads (large files without offset/limit) - Grep/search results (broad patterns returning many results) - Tool result overhead (MCP tools with verbose output) - System prompt size (CLAUDE.md + skills + MCP tool descriptions) - Agent spawning (each agent gets fresh context) ### Cache Optimization - Stable system prompts improve cache hit rate - Changing CLAUDE.md mid-session breaks cache - Fork subagents share prompt cache (byte-identical) - Reusing agents via SendMessage saves context creation cost ### Model Selection Impact
