costslisted
Install: claude install-skill spikelab/multiplai-cc-mktplace
# Costs — Usage Cost Accounting
Reports what multiplai usage *would have billed* at Claude API list prices,
from the append-only cost ledger in `<data_dir>/costs/`. Two scripts:
- `collect_costs.py` — incrementally scans `$CLAUDE_CONFIG_DIR/projects/**/*.jsonl`
and appends priced records to the ledger. Idempotent; first run is a full
backfill, later runs read only new bytes.
- `costs_report.py` — aggregates the ledger.
## Steps
1. **Collect first** so the report includes recent sessions:
```
uv run --project "${CLAUDE_PLUGIN_ROOT}/scripts" "${CLAUDE_PLUGIN_ROOT}/scripts/collect_costs.py"
```
2. **Report** based on what the user asked:
| User asks | Command |
|---|---|
| overall / this month | `costs_report.py` |
| a specific month | `costs_report.py --month YYYY-MM` |
| this chat / a session | `costs_report.py --session <id-prefix>` (current session id is in the transcript filename) |
| per skill | `costs_report.py --all --by skill` |
| per project / model / day / component | `costs_report.py --by project\|model\|day\|component` |
| per branch | `costs_report.py --all --by branch` |
| one branch | `costs_report.py --branch <name>` (reads all months; `--branch "(none)"` for unattributed) |
| a PR | resolve the branch with `gh`, then `--branch` — see below |
| cost per completed task | `costs_report.py --all --group task --pr-join --project-dir <repo>` |
| cost per buildme block | `costs_report.py --all --group build --proje