billing-economics-source

billing-economics-source is a skill for Claude Code, Codex from companion-inc/introspect. It costs 102 tokens per session (2,021 once invoked), scanned A, original, MIT.

A source-of-truth guide for Companion's usage credits and subscription prices across web and Apple payment systems. It covers how raw provider costs become credits and where plan prices are defined.

In plain words
What is it for?
Use it when changing credit markups, usage charges, plan prices, top-ups, billing records, or payment-provider mappings. It helps trace the places that must agree before a billing change is complete.
Why use it?
It prevents billing math from being split across inconsistent files or payment providers. It helps ensure a pricing change reaches the relevant web, subscription, and in-app purchase settings.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when changing credit markups, usage charges, plan prices, top-ups, billing records, or payment-provider mappings. It helps trace the places that must agree before a billing change is complete.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/companion-inc/introspect/billing-economics-source
Install

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.

Any agent
npx skills add companion-inc/introspect --skill billing-economics-source
Clone the repo
git clone --depth 1 https://github.com/companion-inc/introspect

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for billing-economics-source

README.md
[![agentmods](https://agentmods.dev/badge/skills/companion-inc/introspect/billing-economics-source/github.svg)](https://agentmods.dev/skills/companion-inc/introspect/billing-economics-source)
Your own site
<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.

agentmods 80×15 button for billing-economics-source

Your own site · 80×15
<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>
Per session 102 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,021 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 11d ago against content hash 13d81c66ee14, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

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.

skills/billing-economics-source/SKILL.md · 169 lines

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

  1. 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.
  2. Read the live source path, not memory:
    • src/lib/billing/economics.ts
    • src/lib/billing/constants.ts
    • workers/agent/lib/billing/rates.ts
    • workers/agent/lib/billing/usage-service.ts
    • autumn.config.ts
    • src/lib/billing/money.ts
    • workers/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
  3. Keep the source of truth narrow:
    • CREDIT_MARKUP, ledger unit constants, and credit price constants belong in src/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.
  4. 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.
  5. 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.
  6. Delete duplicate economics constants instead of syncing them by comment. Prefer imports from src/lib/billing/economics.ts across server, scripts, Autumn config, tests, and UI.
  7. If a raw-cost reporting surface is genuinely needed, name it as raw provider cost and keep it separate from user credit consumption.
  8. 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 costMicroCents to Autumn credit value;
    • grep guard that no second CREDIT_MARKUP definition 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.

Read the full file on GitHub · 169 lines

Changes

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.

  1. 11d ago First seen · 169 lines · 0 tokens per session scan A 13d81c66ee14

Subscribe to this mod's changes

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.

Related

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.

HKUDS/Vibe-Trading · 39 tokens

strategy-pivot-designer

Detect backtest iteration stagnation and generate structurally different strategy pivot proposals when parameter tuning reaches a local optimum.

tradermonty/claude-trading-skills · 28 tokens

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…

himself65/finance-skills · 161 tokens

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.

questflowai/investorskills · 44 tokens

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.

winstonkoh87/Athena-Public · 53 tokens

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.

kazukinagata/shinkoku · 102 tokens