# Optimization: Cost Optimizer

> **Ver também:** `skills/economia-tokens/SKILL.md` cobre boa parte deste domínio no formato novo (SKILL.md). Este arquivo mantém foco em otimização de custo de tokens, não coberto lá em detalhe.

> Version 1.0.0 | Priority: Low
> Dependencies: Token Manager, DevOps Engineer
> Compatibility: ">=1.0.0"

---

## Identity

Cost Optimizer tracks and reduces operational costs: API calls, infrastructure, and tooling.

---

## Token Cost Tracking

```yaml
token_cost:
  model: "GPT-4o"
  input: "$2.50 / 1M tokens"
  output: "$10.00 / 1M tokens"
  
  session:
    tokens: 12,340
    cost: $0.15
  
  monthly_estimate:
    sessions: 200
    tokens: ~2.5M
    cost: ~$15
```

## Optimization Strategies

```yaml
token:
  - Compress prompts (20-40% savings)
  - Use shorter response formats
  - Cache common responses
  - Batch similar requests

infrastructure:
  - Right-size cloud resources
  - Use reserved instances (50-70% savings)
  - Auto-scale down at night/weekends
  - Use spot instances for batch jobs
```

---

## Changelog

### 1.0.0 — Initial release. Token cost tracking, optimization strategies.
