# Claude Cost Tracker

> A Claude skill from tellmefrankie/ai-investment-skills.

- **Type:** Skill
- **Install:** `agentstack add skill-tellmefrankie-ai-investment-skills-claude-cost-tracker`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [tellmefrankie](https://agentstack.voostack.com/s/tellmefrankie)
- **Installs:** 0
- **Category:** [Finance & Payments](https://agentstack.voostack.com/c/finance-and-payments)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [tellmefrankie](https://github.com/tellmefrankie)
- **Source:** https://github.com/tellmefrankie/ai-investment-skills/tree/main/claude-cost-tracker
- **Website:** https://jaehyunpark.gumroad.com/l/tcyahy

## Install

```sh
agentstack add skill-tellmefrankie-ai-investment-skills-claude-cost-tracker
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Claude API Cost Tracker

Track your Anthropic API spend by project, model, and task type. Know exactly what each feature costs before it ships.

## What it does

- Pulls usage data from Anthropic API billing endpoint
- Breaks down cost by: project, model (Opus/Sonnet/Haiku), date range
- Flags expensive operations (prompts > $0.10 per call)
- Projects monthly spend from current daily burn rate
- Identifies which tasks are best candidates for model downgrade (Opus → Sonnet)

## Usage

```
Check my Claude API costs for this week.
Break down by: model, project tag, daily trend.
Flag any single calls over $0.05.
Project monthly spend at current rate.
Suggest which tasks could switch from Opus to Sonnet without quality loss.
```

## Example Output

```
Claude API Cost Report — Week of May 13, 2026

TOTAL THIS WEEK: $4.23
  Opus 4.5:    $3.10  (73%)  — news analysis pipeline
  Sonnet 4.5:  $0.89  (21%)  — investment briefing
  Haiku 4.5:   $0.24   (6%)  — price monitor checks

DAILY BURN: $0.60/day
MONTHLY PROJECTION: ~$18/month

TOP EXPENSIVE CALLS (this week):
  $0.14 — filter.ts:45 — 50-article importance ranking prompt
  $0.09 — analyze.ts:88 — per-article deep analysis (x5 articles)
  $0.04 — briefing.ts:12 — portfolio summary generation

OPTIMIZATION SUGGESTIONS:
  filter.ts ranking prompt: Switch to Sonnet — saves ~$0.06/day ($1.80/month)
  Confidence: HIGH — filtering is structured JSON output, not nuanced reasoning

  price monitor heartbeat: Already on Haiku — optimal
```

## Model Downgrade Analysis

The skill evaluates each prompt type against downgrade criteria:

| Task type | Opus needed? | Recommendation |
|-----------|-------------|----------------|
| Structured JSON extraction | No | → Sonnet |
| Importance ranking (1-5) | No | → Haiku |
| Nuanced sentiment analysis | Yes | Keep Opus |
| Code generation | Situational | Test Sonnet first |
| Multi-step reasoning chains | Yes | Keep Opus |

## Configuration

```
Track Claude costs:
API key: (reads from ANTHROPIC_API_KEY env)
Date range: last 7 days
Group by: model, then by file/prompt tag
Budget alert: warn if projected monthly > $30
Downgrade candidates: flag any Opus task where Sonnet could substitute
```

## Requirements

- `ANTHROPIC_API_KEY` in environment
- Anthropic usage API access (available on all paid plans)

## Free

Fully free and open source.

Part of the **AI Investment Skills Bundle** — $29 one-time.
→ https://jaehyunpark.gumroad.com/l/tcyahy

## Author

Built after an Opus pipeline ran overnight and cost $12 for something Sonnet would have handled at $2. The downgrade analysis alone pays for itself in the first month.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [tellmefrankie](https://github.com/tellmefrankie)
- **Source:** [tellmefrankie/ai-investment-skills](https://github.com/tellmefrankie/ai-investment-skills)
- **License:** MIT
- **Homepage:** https://jaehyunpark.gumroad.com/l/tcyahy

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-tellmefrankie-ai-investment-skills-claude-cost-tracker
- Seller: https://agentstack.voostack.com/s/tellmefrankie
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
