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 | $0.00051 | $0.01010 |
| Sonnet 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 11d 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.
- 11d 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 22d ago), licensed MIT. It adds 102 tokens to every session and 2,021 once invoked, about $0.0005 per session on Opus 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.
Other skills, from other repositories
sector-rotation
An analysis framework for comparing industries in the Chinese A-share stock market, using business conditions, price momentum, valuation, and money flows. It produces rankings and higher- or lower-allocation suggestions.
strategy-pivot-designer
Detect backtest iteration stagnation and generate structurally different strategy pivot proposals when parameter tuning reaches a local optimum.
twitter-reader
Read Twitter/X for financial research using opencli (read-only). Use this skill whenever the user wants to read their Twitter feed, search for financial tweets, view bookmarks, look up user profiles, or gather market sentiment from Twitter/X. Triggers include: "check my feed", "search Twitter for", "show my…
chenhao-limit-up
A framework for judging Chinese A-share stocks that have reached the daily price-rise limit, using market mood, sector leadership, and trading momentum.
trading-risk-gate
Unified pre-trade safety gate: Ruin check (Law #1), ergodicity audit, and win-rate dominance validation. Absorbs: ergodicity-check, law-of-ruin, win-rate-dominance.
furusato
A Japanese hometown-tax donation manager for furusato nozei, a system where donations to municipalities can qualify for an income-tax or local-tax deduction. It reads donation receipts, stores donation records, and calculates deduction limits.