Skip to content
Back to skills

Update Pricing

ASecurity

Refresh the Anthropic price table in src/core/pricing.ts with current list prices and any new models seen in the Claude Code logs. Use when asked to update pricing or add a model's prices, or when a model shows as "unpriced" in the UI.

  • 6 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 9, 2026
ai-agentsbashapi

Works with

  • claude code
  • api

Security analysis

A100/100

Scanned November 9, 2026

npx -y skills add flolefebvre/claude-convo-analyzer --skill update-pricing --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Update Pricing?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Update Pricing
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/flolefebvre-update-pricing/badge)](https://www.skillsdirectory.com/skills/flolefebvre-update-pricing)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: update-pricing
description: Refresh the Anthropic price table in src/core/pricing.ts with current list prices and any new models seen in the Claude Code logs. Use when asked to update pricing or add a model's prices, or when a model shows as "unpriced" in the UI.
---

# Update the price table

Prices live in one hardcoded, versioned table, `PRICES` in `src/core/pricing.ts`. Cost is computed at query time, so editing it reprices every conversation. Policy is ADR-0003: current public API list price, never batch, fast-mode or subscription rates.

1. **Get prices.** WebFetch `https://platform.claude.com/docs/en/about-claude/pricing` (base input/output per MTok, and any per-model cache-read rate) and the prompt-caching page for the multipliers: write 5m 1.25x, write 1h 2x, read 0.1x of input.
2. **Find missing models.** Rows are keyed by resolved model ids seen in the logs; add none speculatively.
   ```bash
   grep -rhoE '"claude-[a-z0-9-]+"' "${CCA_LOGS_ROOT:-$HOME/.claude/projects}" --include='*.jsonl' | sort | uniq -c | sort -rn | head -20
   ```
   Ignore non-model hits such as `"claude-code-guide"`.
3. **Red.** Add tests under `computeCost — known resolved models` in `src/core/__tests__/cost.test.ts`: 1M input and 1M output at list rate, plus the cache tiers when they're atypical. `pnpm test` must fail.
4. **Green.** In `src/core/pricing.ts`:
   - add the row with `priceRow(input, output)`, or `priceRow(input, output, cacheReadMultiplier)` when its cache read isn't 0.1x;
   - point `ALIAS_TO_LATEST` (`opus` / `sonnet` / `haiku`) at the family's newest key;
   - update the `SOURCE & DATE` comment and set `PRICE TABLE VERSION` to `<today>.1` (bump `.N` on the same day).
5. **Done** when `pnpm gate` ends with `--gate OK--`.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.