Ai billing safeguards
Skill yigityildiz0/universal-ai-skill-library/skills/common/ai-billing-safeguards
531 searchable AI Agent Skills for Claude Code, OpenAI Codex, and OpenCode — EN/TR catalog, platform and risk notes, direct ZIPs, and curated bundles.
npx -y skills add yigityildiz0/universal-ai-skill-library --skill ai-billing-safeguardsAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
3 things to look at
- 18 days oldThe repository was created 18 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Design and verify provider-neutral spend, token, request, and concurrency controls for AI workloads. Use when an application or agent can incur usage.
The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
2.7 KB, as published. Nobody here has run it
AI Billing Safeguards
Cost controls are enforcement, not a dashboard. Use both provider/account limits and application-side guards.
Requirements
- Define scope: organization, project, user, workflow, agent, request, and billing period.
- Load current rates and units from a versioned configuration or provider billing export. Never embed a reusable "current price" or assume a model tier is permanently cheap/expensive.
- Estimate the maximum authorized cost before each call using requested limits, tool rounds, retries, cache behavior, image/audio units, and fallback routes.
- Atomically reserve budget before work and reconcile it with provider-reported usage afterward. Release unused reservation.
- Reject work that would exceed a hard limit. Warn at configurable thresholds and preserve partial results.
- Bound requests, tokens, output, tool rounds, retries, concurrency, elapsed time, and external operations—not dollars alone.
- Attribute every usage event to a stable task/user/workflow ID without logging prompts, secrets, or personal data.
- Treat fallback/provider routing as a separate authorization and data-boundary decision; a budget guard must not silently send data elsewhere.
Usage ledger
Record timestamp, provider/account, configured model ID, rate-table version, input/output/cache/media units, estimated cost, reconciled cost, currency, reservation ID, task attribution, retry/fallback reason, and limit decisions. Use idempotency keys so retried accounting cannot double-charge the ledger.
Failure policy
- fail closed when rate data or currency conversion required for enforcement is missing;
- distinguish quota, billing, authentication, transient, and application errors;
- never retry a billing/quota denial indefinitely;
- surface a bounded error with spent/reserved/remaining amounts and recovery options;
- prevent concurrent workers from racing past a shared limit.
Validation
Test exact-boundary acceptance, one-unit-over rejection, concurrent reservations, provider under/over-reporting, retry reconciliation, cache units, fallback denial, stale rate tables, partial streaming, cancellation, clock/period rollover, and ledger restart recovery. Compare a sample against the actual provider bill/export.
Completion report
State limits, current rate source/version, enforcement points, alerts, ledger location, tests, observed gaps, and who can raise a limit. Never change quotas, billing accounts, or spending limits without the user's explicit authorization for that external change.
Gives 0 of the 12 instructions most pricing monetisation skills give
Counted across 366 of the 366 authors here whose files we hold, read 2026-08-06
- verify webhook signaturesin 23 of 366, across 19 files
- differentiate tiers using features, limits, or supportin 15 of 366, across 4 files
- read product marketing context before asking questionsin 14 of 366, across 6 files
- base price on perceived value, not costin 14 of 366, across 3 files
- use Van Westendorp to find acceptable price rangein 14 of 366, across 3 files
- use MaxDiff to identify highly valued featuresin 14 of 366, across 3 files
- choose a value metric that scales with customer valuein 14 of 366, across 9 files
- handle webhook events idempotentlyin 12 of 366, across 6 files
- understand the upgrade context before recommendingin 11 of 366, across 4 files
- align the pricing metric with delivered valuein 10 of 366, across 4 files
- install stripe packagein 10 of 366, across 5 files
- calculate unit economics metricsin 10 of 366, across 5 files
Said here and by no other author read
- define scope at each required level
- load current rates from versioned configuration
- estimate maximum authorized cost before each call
- reserve budget atomically and reconcile afterward
- reject work exceeding hard limits
- bound tokens requests concurrency and time
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once.