agentleFS
robinebersrobinebers/openusage/.agents/skills/pricing-update/SKILL.md

pricing-update

Skill4.3k starsChanged 5 months agoMITView on GitHub

Sync OpenUsage's pricing supplement with Cursor's published model pricing. Pulls https://cursor.com/docs/models-and-pricing.md, diffs it against pricing_supplement.json, updates entries/aliases/multipliers, validates, and opens a PR. Use when Cursor adds or re-prices models, a spend tile shows a warning triangle for an unpriced model, or a periodic pricing check is due.

Trending

Quiet since October.about the whole repository

Jan 2026: 0 mentionsFeb 2026: 1 mentionMar 2026: 0 mentionsApr 2026: 6 mentionsMay 2026: 0 mentionsJun 2026: 1 mentionJul 2026: 1 mentionAug 2026: 6 mentionsSep 2026: 7 mentionsOct 2026: 4 mentionsNov 2026: 0 mentionsDec 2026: 0 mentions
Jan 2026Jul 2026Dec 2026
Mentions a month of the robinebers/openusage repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about robinebers/openusage

The biggest 5 of 26 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 26

Talked about on GitHub, Bluesky and Hacker News (26 times).

On GitHub · 23

18 more on GitHub

On Hacker News · 1

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 2 are distinctive, and 7 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Only the supplement needs manual care.

    line 10
  2. Very specific:

    Read Sources/OpenUsage/Resources/pricing_supplement.json and compare:

    line 25
  3. Very specific:

    Update updated_at to today (YYYY-MM-DD).

    line 37
  4. Very specific:

    Keep the file's style: 2-space indent, rates as plain numbers, $comment explanations for non-obvious entries.

    line 38
  5. Distinctive:

    Run the same checks CI runs, plus the pricing tests:

    line 43
  6. Very specific:

    If a new alias rule maps a slug that appears in real usage, add a resolution test case in Tests/OpenUsageTests/ModelPricingTests.swift.

    line 68
  7. Very specific:

    Prefer aliasing to LiteLLM/models.dev keys over duplicating prices in the supplement.

    line 92
  8. Distinctive:

    Never delete pricing entries that historical usage may reference.

    line 93
  9. Very specific:

    Always bump updated_at; always go through a PR.

    line 95

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Pricing Update

Sources/OpenUsage/Resources/pricing_supplement.json prices the models no public catalog carries (Cursor-native models like auto, composer-*, github_bugbot), supplies fast-variant multipliers, and maps provider log/CSV slugs to canonical pricing keys. On merge to main, .github/workflows/pricing-supplement.yml validates it and publishes it to GitHub Pages; installed apps pick it up within about an hour — no release needed. Full background: docs/pricing.md.

Only the supplement needs manual care. Normal API models (new Claude/GPT/Gemini/Grok releases) are priced automatically by the daily LiteLLM and models.dev fetches — do not add them to the supplement unless they need an alias rule or the catalogs are wrong.

Steps

1. Pull the source of truth into context

Fetch https://cursor.com/docs/models-and-pricing.md and read the whole thing. This is the canonical source for:

  • Cursor-native model prices (auto, composer-*, Bugbot) — input, cache write, cache read, output, all USD per million tokens.
  • Which models have a fast variant and what the fast pricing is.
  • Long-context tiers (e.g. Sonnet 1M) that bill the whole request at the >200k rate.
  • Model names/slugs as Cursor spells them (needed for alias rules).

2. Diff against the current supplement

Read Sources/OpenUsage/Resources/pricing_supplement.json and compare:

  • Price changes on existing pricing entries.
  • New Cursor-native models missing from pricing.
  • Removed/renamed models — never delete an entry that old usage data may still reference; keep it so historical days keep their dollars. Only remove an entry if it was outright wrong.
  • fast_multipliers — for API models whose fast variant is priced as a multiplier of the base rate. Only needed when the catalogs don't carry a -fast key themselves.
  • alias_rules — a new model usually needs one, because Cursor CSV slugs and Codex/Claude log names rarely match catalog keys exactly (thinking suffixes, effort levels like -low/-high/-xhigh, dot vs dash versions). Follow the existing patterns: anchored regex, escaped dots, optional effort/thinking groups. -fast variants need their own rule ordered BEFORE the base rule (first match wins).

Where a model exists in LiteLLM or models.dev, prefer an alias to that canonical key over duplicating prices in the supplement.

3. Edit the supplement

  • Update updated_at to today (YYYY-MM-DD).
  • Keep the file's style: 2-space indent, rates as plain numbers, $comment explanations for non-obvious entries.
  • Rates are USD per million tokens; cache read defaults matter — copy the exact numbers from the Cursor page, don't infer.

4. Validate

Run the same checks CI runs, plus the pricing tests:

python3 - << 'PY'
import json, re, sys
with open("Sources/OpenUsage/Resources/pricing_supplement.json") as f:
    s = json.load(f)
problems = []
for m, e in s["pricing"].items():
    for f_ in ("input_per_million", "output_per_million"):
        if not isinstance(e.get(f_), (int, float)):
            problems.append(f"pricing[{m}].{f_} missing or not a number")
for r in s["alias_rules"]:
    try: re.compile(r["pattern"])
    except re.error as err: problems.append(f"{r['pattern']!r}: {err}")
    if not r.get("canonical"): problems.append(f"{r['pattern']!r} has no canonical")
for m, x in (s.get("fast_multipliers") or {}).items():
    if not isinstance(x, (int, float)) or x <= 0:
        problems.append(f"fast_multipliers[{m}] must be positive")
sys.exit("FAILED:\n" + "\n".join(problems)) if problems else print("Supplement OK")
PY

swift test --filter "ModelPricing|PricingBundledResource"

If a new alias rule maps a slug that appears in real usage, add a resolution test case in Tests/OpenUsageTests/ModelPricingTests.swift.

5. Open a PR

Branch from main, commit (fix(pricing): ... or feat(pricing): ...), and open a PR following the repo's PR description structure (TL;DR / What was happening / What this changes). Cite the Cursor doc as the source and list each price or alias change explicitly so the owner can verify numbers at a glance. Never push pricing changes directly to main.

6. Verify publication after merge

Once merged, the Publish pricing supplement workflow runs. Confirm it landed:

gh run list --workflow=pricing-supplement.yml --limit 1
curl -s https://robinebers.github.io/openusage/pricing_supplement.json | python3 -c "import json,sys; print(json.load(sys.stdin)['updated_at'])"

The updated_at served must match the merged file. Publishing is two hops: the supplement workflow pushes the file to the gh-pages branch, then .github/workflows/deploy-pages.yml on main deploys that branch to the live site (Pages source is "GitHub Actions"). If the URL is stale after ~10 minutes, check gh run list --workflow=deploy-pages.yml and re-run gh workflow run deploy-pages.yml --ref main (not --ref gh-pages).

Optional: refresh bundled snapshots

The bundled LiteLLM/models.dev snapshots (pricing_*_snapshot.json) are a separate concern — offline fallbacks refreshed with ./script/update_pricing_snapshots.sh, typically before a release. Staleness is harmless; only regenerate them if asked or as part of release prep, in their own commit.

Rules

  • USD per million tokens everywhere; exact numbers from the Cursor page, never inferred.
  • Prefer aliasing to LiteLLM/models.dev keys over duplicating prices in the supplement.
  • Never delete pricing entries that historical usage may reference.
  • -fast alias rules come before their base-model rules.
  • Always bump updated_at; always go through a PR.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.