Skip to content
Skills Library
AI & agents · Analysis

cost-summary

/cost-summary

Aggregate past spending (day/week/month) — total USD, per-model, per-endpoint. Use when user runs /cost or asks "how much have I spent?" / "what's my burn?" / "show me the bill".

Licence
Apache-2.0
Last repository change
17.08.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 17.08.2026, without references to retired models or APIs.

Licence

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

What it does and when to use it

Aggregate past spending (day/week/month) — total USD, per-model, per-endpoint. Use when user runs /cost or asks "how much have I spent?" / "what's my burn?" / "show me the bill".

Triggers from the description

how much have I spent?what
Original author description

Aggregate past spending (day/week/month) — total USD, per-model, per-endpoint. Use when user runs /cost or asks "how much have I spent?" / "what's my burn?" / "show me the bill".

How it works

  1. When to invoke
  2. How to invoke
  3. Output (human-readable)
  4. What this skill does
  5. What this skill does NOT do
  6. Daily limit warning
  7. Interpreting the breakdown
  8. Where ledger lives
Original SKILL.md headings · 79 lines, 300 words
SKILL.md preview
---
name: cost-summary
description: Aggregate past spending (day/week/month) — total USD, per-model, per-endpoint. Use when user runs /cost or asks "how much have I spent?" / "what's my burn?" / "show me the bill".
allowed-tools: [Bash, Read]
disable-model-invocation: false
user-invocable: true
---

# Cost Summary

What the user has actually spent. Pairs with `cost-estimator` (forward-looking).

## When to invoke

- `/cost` — today's spending (default)
- `/cost week` — last 7 days
- `/cost month` — last 30 days
- User asks: "how much have I spent?", "what's the bill?", "show me the burn"

## How to invoke

```bash
python -m scripts._core.cost_ledger --summary --period day
python -m scripts._core.cost_ledger --summary --period week
python -m scripts._core.cost_ledger --summary --period month --json
```

## Output (human-readable)

```
Period:  day
Total:   $4.7321
Entries: 38
By model:
  $2.1430  claude-opus-4-7
  $1.8470  gpt-image-2
  $0.5230  claude-sonnet-4-6
  $0.1820  tavily
  $0.0371  gemini-3.1-pro
```

## What this skill does

- Reads `~/.xuanran-seo/cost-ledger.jsonl`
- Filters by time window (day/week/month back from now)
- Aggregates total + by model + by endpoint
- Reports daily burn rate vs configured limit
- Surfaces unusual spending (e.g., >$5 in one task)

## What this skill does NOT do

- ❌ Bill anyone (cost_ledger is local-only)
- ❌ Predict next month (use cost-estimator for forward)
- ❌ Charge a card (no payment integration)

## Daily limit warning

If `total > 0.8 × daily_limit`, surface a warning:
```
⚠ Daily spend at 84% of $50 limit. 7h remaining in day.
```

If `total > daily_limit`:
```
⛔ Daily limit exceeded. cost-ledger.check() will block further LLM calls
   until tomorrow OR until you raise daily_total_usd in ~/.xuanran-seo/config.yaml
```

## Interpreting the breakdown

| Model dominates → | Means |
|---|---|
| claude-opus-4-7 | Drafter + reviewer (expected for production) |
| gpt-image-2 | High image volume — consider --image-quality medium |
| tavily >$1 | Many research-heavy /article runs (normal) |
| gemini >$1 | LLM-judge for quality gates running often (consider sampling) |

## Where ledger lives

`~/.xuanran-seo/cost-ledger.jsonl` — append-only JSONL.

Reset today's entries (admin):
```bash
python -m scripts._core.cost_ledger --reset-today
```

Versions

The database has no other skills named cost-summary.

Database snapshot: 13.11.2026 · package version 85fe162c3e2d (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100cost-guardian
    Real-time cost tracking and budget management for Claude Code sessions. Shows current spend, burn rate, budget status, per-tool and per-model breakdown. Use when user says 'cost', 'budget', 'spending', 'how much', 'token usage', 'export', or '/cost-guardian'. Subcommands:…
  • 90ainb-fleet:cost
    Show fleet spend — per-session, per-model, per-day, and per-group USD cost rollups for every claude/codex session, sourced live from ainb's burndown analytics (which already prices every provider call). Use when you need spend visibility across a multi-session fleet, want to…
  • 100cost-tracking
    Track and report Claude Code token usage, spending, and budgets from the local ECC cost-tracker metrics log. Use when the user asks about costs, spending, usage, tokens, budgets, or cost breakdowns by model, session, or date.
  • 100daily-cost
    Use when the user asks about cost, spending, or budget — e.g. 'how much did I spend today', 'daily cost', 'cost report', 'what's my spend
  • 95exploring-llm-costs
    Investigate LLM spend in PostHog — total cost over time, cost by model, provider, user, trace, or custom dimension, token and cache-hit economics, and cost regressions. Use when the user asks "how much are we spending on LLMs?", "which model / user / feature is most expensive?",…
  • 100cost-tracking
    Track and report Claude Code token usage, spending, and budgets from the local ECC cost-tracker metrics log. Use when the user asks about costs, spending, usage, tokens, budgets, or cost breakdowns by model, session, or date.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.