From plugin-introspector
Model-specific pricing tables and cost calculation utilities for Claude API usage tracking and budget management.
How this skill is triggered — by the user, by Claude, or both
Slash command
/plugin-introspector:cost-trackingThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
> Provides pricing data and calculation methods for API cost estimation.
Provides pricing data and calculation methods for API cost estimation.
| Model | Input | Output | Cache Write (5m) | Cache Read |
|---|---|---|---|---|
| claude-opus-4-6 | $5.00 | $25.00 | $6.25 | $0.50 |
| claude-sonnet-4-5 | $3.00 | $15.00 | $3.75 | $0.30 |
| claude-haiku-4-5 | $1.00 | $5.00 | $1.25 | $0.10 |
Prices as of 2026-02. Source: platform.claude.com/docs/en/about-claude/pricing. Update when pricing changes.
cost = (input_tokens × input_price / 1_000_000) +
(output_tokens × output_price / 1_000_000) +
(cache_write_tokens × cache_write_price / 1_000_000) +
(cache_read_tokens × cache_read_price / 1_000_000)
When actual API token counts are unavailable, use estimates:
estimated_input_tokens = sum(tool_input_chars) / 4
estimated_output_tokens = sum(tool_result_chars) / 4
estimated_cost = estimated_input_tokens × input_price / 1_000_000 +
estimated_output_tokens × output_price / 1_000_000
Accuracy note: chars/4 estimation has ±20% error. Actual API usage data (from api_traces.jsonl) provides exact costs when available.
| Level | Threshold | Action |
|---|---|---|
| INFO | >$0.50/session | Log to stats |
| WARNING | >$2.00/session | Alert (MEDIUM severity) |
| CRITICAL | >$10.00/session | Alert (HIGH severity) |
| Metric | Formula | Target |
|---|---|---|
| Cost per tool call | session_cost / tool_calls | <$0.03 |
| Cost per productive call | session_cost / productive_calls | <$0.05 |
| Input/Output ratio | input_tokens / output_tokens | 3:1 to 6:1 (normal range) |
Formula for prioritizing improvement proposals:
ROI_score = (Impact × Confidence) / (Effort × Risk)
token_impact = min(tokens_saved_per_session / 1000, 10)
quality_impact = quality_score_improvement_est × 3
Impact = max(token_impact, quality_impact)
base = 0.3 if sessions < 3, 0.6 if sessions 3-7, 0.85 if sessions >= 8
corroboration_bonus = (confirming_agents - 1) × 0.1
Confidence = min(base + corroboration_bonus, 1.0)
| Level | Description |
|---|---|
| 1 | Single line addition/change |
| 2 | Multi-line section modification |
| 3 | New section or procedure step |
| 4 | Structural change across multiple sections |
| 5 | Component rewrite or new component |
| Level | Description |
|---|---|
| 1 | Additive only (no existing behavior changed) |
| 2 | Minor behavior modification in non-critical path |
| 3 | Critical path modification with clear rollback |
| 4 | Cross-component change with interaction risk |
| 5 | Core algorithm/flow change |
ROI >= 2.0 → CRITICAL
ROI >= 1.0 → HIGH
ROI >= 0.5 → MEDIUM
ROI < 0.5 → LOW
npx claudepluginhub hungrytech/hungrytech-claude-skills --plugin plugin-introspectorGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.