Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add companion-inc/introspect --skill billing-economics-sourcegit clone --depth 1 https://github.com/companion-inc/introspectWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/companion-inc/introspect/billing-economics-source)<a href="https://agentmods.dev/skills/companion-inc/introspect/billing-economics-source"><img src="https://agentmods.dev/badge/skills/companion-inc/introspect/billing-economics-source/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/companion-inc/introspect/billing-economics-source"><img src="https://agentmods.dev/badge/skills/companion-inc/introspect/billing-economics-source.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00102 | $0.02021 |
| Opus 5.5 | $0.00041 | $0.00808 |
| Sonnet 5.5 | $0.00020 | $0.00404 |
| Haiku 4.5 | $0.00010 | $0.00202 |
Grade A, and why
billing-economics-source scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 169 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Billing economics source
Problem this handles
Companion bills users by deducting credits from a usage ledger. A real failure mode is treating UI display math as a second billing model, or spreading markup between worker rates, UI money helpers, Autumn config, and scripts. When the user asks "global 1.25x" or "how does pricing work," answer the source-of-truth model first, then edit.
Subscription price changes have a second failure mode: treating Autumn or the repo constants as the only truth layer after native iOS billing is in scope. A request like "fix all pricing" means web and Apple purchase rails, not only the provider surfaced by the first stale CLI output.
Activation boundary
Load when changing any of these:
CREDIT_MARKUP, provider raw-cost to credit conversion, or "global 1.25x / 1.5x" pricing behavior.src/lib/billing/economics.ts,src/lib/billing/money.ts, worker billing rates, usage ledger writes, billing retry/reconcile scripts, or Autumn credit item values.- Plan subscription prices, monthly/annual plan amount changes, RevenueCat product/package/entitlement mapping, App Store Connect subscription price schedules, or paywall/store product price displays, including annual savings badges.
- Usage UI, chat credit footer, billing usage tables, or any display that shows
credits consumed from
usage_events.costMicroCents.
Near-misses:
- Per-plan caps, quotas, storage, vCPU/RAM, or sandbox templates: use
tiered-plan-limits. - Pricing page copy or plan-card marketing without changing billing facts: use
product-surface-polish.
Procedure
- Before editing, state the current model with evidence. For usage economics: raw provider cost is marked up into ledger micro-cents; ledger micro-cents are deducted as credits; UI displays ledger credits. For subscription prices: preserve the user's term for the truth layer and list every rail you will verify before claiming the fix.
- Read the live source path, not memory:
src/lib/billing/economics.tssrc/lib/billing/constants.tsworkers/agent/lib/billing/rates.tsworkers/agent/lib/billing/usage-service.tsautumn.config.tssrc/lib/billing/money.tsworkers/app/services/usage.ts- iOS billing/paywall source and product ID mappings when Apple billing is in scope
- any UI component or script touched by the requested change
- Keep the source of truth narrow:
CREDIT_MARKUP, ledger unit constants, and credit price constants belong insrc/lib/billing/economics.ts.- Subscription target prices start in plan constants/config, but live charge truth is provider-specific: Autumn/Stripe for web, App Store Connect for Apple subscriptions, and RevenueCat for product, entitlement, package, and webhook mapping.
- Apply provider limits at the smallest plan/period scope the evidence proves. An App Store price-point or product-status limit on Max annual disables or changes Max annual only; do not remove annual choices from Plus/Pro or rewrite other rails unless their own records fail the same check.
- For RevenueCat-backed mobile billing, Autumn receives RevenueCat updates; Autumn prices do not decide the mobile charge.
- Worker billing code imports economics helpers and writes already-marked-up
usage_events.costMicroCents. - Autumn tracking uses the same ledger value converted to credits.
- UI money helpers format ledger values; they must not define markup or estimate raw provider cost unless the surface is explicitly internal and labeled as raw provider cost.
- For annual price or savings-badge changes, write the arithmetic table before editing: monthly price x 12 baseline, live provider candidate annual prices, exact savings percentage, displayed badge, and the user's rounding rule. "Round percentage" means integer percentage unless the user names another increment; do not invent 5% steps, "conservative" labels, or a lower savings badge when the stated goal is to show the best deal. If no exact common candidate exists across plans, say that before recommending a business fallback.
- Resolve provider contradictions before mutating. Do not push a catalog or patch code from a summary table when detailed JSON, dashboard UI, or the charge provider disagrees.
- Delete duplicate economics constants instead of syncing them by comment.
Prefer imports from
src/lib/billing/economics.tsacross server, scripts, Autumn config, tests, and UI. - If a raw-cost reporting surface is genuinely needed, name it as raw provider cost and keep it separate from user credit consumption.
- Add focused guards for the drift you changed:
- rate tests for markup and raw-dollar conversion;
- money tests for ledger credit formatting;
- usage tests for
costMicroCentsto Autumn credit value; - grep guard that no second
CREDIT_MARKUPdefinition or raw-cost display helper remains in the UI layer. - for subscription prices, capture the exact provider records checked: Autumn detailed product records, RevenueCat products/offerings/entitlements, and App Store Connect subscription status plus storefront price schedules.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2mo ago First seen · 169 lines · 0 tokens per session scan A 13d81c66ee14
billing-economics-source is a skill published in the GitHub repository companion-inc/introspect (10 stars, last pushed 2mo ago), licensed MIT. It adds 102 tokens to every session and 2,021 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
billing-economics-source compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| billing-economics-sourcecompanion-inc/introspect | Skill | 10 | 2mo ago | MIT | A | 102 | Claude Code, Codex |
| sector-rotationHKUDS/Vibe-Trading | Skill | 38k | yesterday | MIT | A | 39 | Claude Code, Codex |
| twitter-readerhimself65/finance-skills | Skill | 3.5k | 2d ago | MIT | A | 110 | Claude Code |
| strategy-pivot-designertradermonty/claude-trading-skills | Skill | 3.7k | 2d ago | MIT | A | 28 | Claude Code, Codex |
| energy-procurementhashgraph-online/awesome-codex-plugins | Skill | 1.5k | yesterday | Apache-2.0 | A | 93 | Claude Code, Codex |
| airdrop-hunting-guidenirholas/three.ws | Skill | 269 | yesterday | Apache-2.0 | A | 54 | Claude Code, Codex |
| multi-expert-analyzerdigoal/blog | Skill | 8.6k | 2d ago | GPL-2.0 | A | 292 | Codex |