Usage pricing simulator
@agentcosts/usage-pricing-simulator
Test pricing models for an AI product on your real usage before you change a price: per seat, per task, credits, and hybrid (platform fee plus included credits plus overage). Shows revenue, gross margin after LLM cost, and which customers' bills would jump or drop under each model.
- Activity
- New: be the first to try it
- Installs
- 0 installs
- Likes
- 0 likes
- Clones
- 0 clones
- 1{
- 2 "name": "usage-pricing-simulator",
- 3 "owner": "agentcosts",
- 4 "version": "1.0.0",
- 5 "type": "skill",
- 6 "description": "Test pricing models for an AI product on your real usage before you change a price: per seat, per task, credits, and hybrid (platform fee plus included credits plus overage). Shows revenue, gross margin after LLM cost, and which customers' bills would jump or drop under each model.",
- 7 "category": "finance",
- 8 "license": "MIT",
- 9 "compat": ["claude-code"],
- 10 "permissions": {
- 11 "shell": ["node scripts/simulate.mjs"],
- 12 "files": { "read": ["./data/**"], "write": ["./data/pricing.json", "./out/pricing-sim*"] }
- 13 },
- 14 "tests": {
- 15 "cases": [
- 16 {
- 17 "name": "compares four pricing models on the example usage",
- 18 "inputs": {},
- 19 "checks": [
- 20 { "type": "command_exits_zero", "command": "node scripts/simulate.mjs examples/usage.csv --customers examples/customers.csv --pricing examples/pricing.json --prices examples/prices.csv --out out/pricing-sim" },
- 21 { "type": "file_contains", "path": "out/pricing-sim.md", "text": "| cobalt-labs | 3 | $66.22 | $60 (-10%) |" },
- 22 {
- 23 "type": "output_matches_schema",
- 24 "path": "out/pricing-sim.json",
- 25 "schema": {
- 26 "type": "object",
- 27 "required": ["models", "customers"],
- 28 "properties": {
- 29 "models": {
- 30 "type": "array",
- 31 "minItems": 5,
- 32 "maxItems": 5,
- 33 "items": { "type": "object", "required": ["model", "revenue", "gross_margin", "negative", "big_increases"] }
- 34 },
- 35 "customers": { "type": "array", "minItems": 6, "maxItems": 6 }
- 36 }
- 37 }
- 38 },
- 39 { "type": "file_contains", "path": "out/pricing-sim.md", "text": "| Hybrid | $768 | +3% | $147 | 80.9% | 1 | 0 | cobalt-labs, foxglove-retail |" }
- 40 ]
- 41 },
- 42 {
- 43 "name": "bills seats, tasks, credits, and hybrid overage exactly",
- 44 "inputs": {
- 45 "data/usage.csv": "timestamp,customer,task,run_id,model,cost_usd,outcome\n2026-10-01T10:00:00Z,a,big,r1,m,2,success\n2026-10-01T11:00:00Z,a,big,r2,m,2,failure\n2026-10-02T10:00:00Z,a,small,r3,m,0.1,success\n",
- 46 "data/customers.csv": "customer,seats,mrr\na,3,20\n",
- 47 "data/pricing.json": "{\"bill_on\":\"all\",\"credit_rates\":{\"big\":50,\"*\":10},\"models\":[{\"name\":\"Seat\",\"type\":\"per_seat\",\"price_per_seat\":10},{\"name\":\"Task\",\"type\":\"per_task\",\"prices\":{\"big\":5,\"*\":1}},{\"name\":\"Credits\",\"type\":\"credits\",\"credit_price\":0.1},{\"name\":\"Hybrid\",\"type\":\"hybrid\",\"platform_fee\":5,\"included_credits\":100,\"overage_credit_price\":0.2}]}"
- 48 },
- 49 "checks": [
- 50 { "type": "command_exits_zero", "command": "node scripts/simulate.mjs data/usage.csv --customers data/customers.csv --pricing data/pricing.json --out out/pricing-sim" },
- 51 { "type": "file_contains", "path": "out/pricing-sim.csv", "text": "Seat,a,30,4.1," },
- 52 { "type": "file_contains", "path": "out/pricing-sim.csv", "text": "Task,a,11,4.1," },
- 53 { "type": "file_contains", "path": "out/pricing-sim.csv", "text": "Credits,a,11,4.1," },
- 54 { "type": "file_contains", "path": "out/pricing-sim.csv", "text": "Hybrid,a,7,4.1," }
- 55 ]
- 56 }
- 57 ]
- 58 }
- 59}
