SKILL-095 Billing and monetization Locked skill

Usage limits and quotas

Check-and-increment must be one atomic database operation. A read-then-write quota check is a race that lets two requests both pass the last slot.

01

What this skill helps you build

Enforce per-plan limits — seats, projects, credits, API calls — with atomic counters that concurrency can't trick into overshooting the cap.

The production takeaway

Check-and-increment must be one atomic database operation. A read-then-write quota check is a race that lets two requests both pass the last slot.

02

Inside this skill

The full skill expands these implementation areas with decisions, edge cases, prompts, tests, and framework-specific code.

Billing and monetization
What this helps you build

Enforceable limits tied to a plan: "Starter gets 3 projects", "Pro gets 50,000 API calls a month", "this plan includes 10 seats". You build a counter per account per metric, a chec

🔒
Billing and monetization
When to use this

Whenever a plan promises a bounded amount of something and exceeding it should be prevented or charged. Concretely: Seat based pricing members per organization . Resource caps proj

🔒
Billing and monetization
The core idea

The entire correctness of a quota lives in one atomic operation : check the limit and claim a slot in a single, indivisible database step. The naive "read the count, compare, then

🔒
03

Unlock the full implementation

Paid access includes the complete skill body, implementation prompt, common mistakes, production checklist, and code examples where this skill includes them.