CtrlK
BlogDocsLog inGet started
Tessl Logo
SkillPublic

paddle-usage-based-billing

Add Paddle usage-based billing (early access) to a Next.js app — early access check, usage balance units, meters, price allowances, usage events, balance gating, and `usage_balance.depleted`, using the Paddle API directly.

Quality

89%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

Passed

No findings from the security scan

The canonical home for this skill is paddle-usage-based-billing in PaddleHQ/paddle-agent-skills

SKILL.md
Quality
Evals
Security

Quality

Content

92%Weight 40%Scale 1-5

Reviews the quality of instructions and guidance provided to agents. Good implementation is clear, handles edge cases, and produces reliable results.

An exceptionally strong single-file skill: executable end-to-end code, explicit validation gates and feedback loops, and dense API-specific knowledge with no filler. Its one structural weakness is that everything — constraint catalogs, renewal semantics, pitfalls — lives inline in one ~500-line file with no reference bundle to offload detail to.

Suggestions

Move the stable reference material (meter/price/allowance constraint lists in Step 3, the renewals and plan-changes table, and the early-access limitations list) into a `references/` file such as `references/api-constraints.md`, keeping SKILL.md as the workflow overview with one-level-deep, clearly signaled pointers.

Optionally split the full webhook-handling and outbox-worker code into `scripts/` files so the body keeps only the signatures and the decision logic, reducing SKILL.md's token footprint when only the workflow is needed.

Add a short table of contents or 'jump to step' map near the top so the seven-step sequence and the cross-cutting sections (renewals, pitfalls, verify) are navigable without scrolling the whole monolith.

DimensionReasoningScore

Conciseness

The body is dense with non-obvious, Paddle-specific facts ("Paddle returns `403` for both permission and authentication problems", "PATCH /prices/{price_id} replaces `allowances` in full", "aggregation defaults to `sum`, the only option during early access") rather than concepts Claude already knows; directives are terse ("Don't call Paddle in the middle of the customer's request") and nearly every sentence carries API-specific information the model cannot infer. The rare transitional sentences ("Read this first. These facts change how you build the integration.") are single-line signposts, not padding, so it sits at the 'lean and efficient' anchor rather than the 'minor over-explanation' anchor below it.

5 / 5

Actionability

Every step ships complete, copy-paste-ready TypeScript: the `paddleApi` helper with error/Retry-After handling, `check-usage-billing-access.ts` with an explicit AUTH_ERRORS branch, `setup-usage-billing.ts` with real request bodies, a `sendUsageEvent` worker with a quantity regex (`/^(0|[1-9]\d{0,34})(\.\d{1,9})?$/`) and enumerated retry/failure outcomes, the webhook handler, plus the exact run command (`node --env-file=.env.local --import tsx scripts/<name>.ts`). Specific error codes (`usage_event_timestamp_too_old`, `meter_action_usage_balance_unit_duplicate`, `subscription_prorated_billing_not_allowed_for_allowance`) and concrete SQL make the common cases fully executable — matching the top anchor, not the 'minor gaps' anchor at 4.

5 / 5

Workflow Clarity

Seven numbered steps are strictly ordered with an explicit gate up front (Step 2 "If the account isn't in early access... stop there"), validation checkpoints inside the flow (Step 4 confirms "`remaining.total` should equal the allowance `amount` multiplied by the item quantity" with a failure-troubleshooting list), feedback loops for batch financial operations (outbox retry with backoff, "Stop the run on a `429`", and a 7-item "Verify the integration" checklist including idempotency: "Send the same row again... Confirm `remaining.total` doesn't change"). This exceeds the 'clear sequence with explicit validation steps; feedback loops; checklists' anchor.

5 / 5

Progressive Disclosure

There are no bundle files at all (no `references/`, `scripts/`, `assets/`), so all ~500 lines — including API-constraint lists, the renewals/plan-changes table, and the pitfalls section — are inlined in SKILL.md. Internal structure is good (numbered steps, clear headers, well-signaled external doc links), but content that would naturally live in a one-level-deep reference file (e.g. the meter/price constraint catalog or the renewal semantics table) is inline, and the under-50-lines exception for header-only skills clearly doesn't apply. This matches 'some structure but content that should be separate is inline' better than the 'most content appropriately placed' anchor at 4, which presumes a working split across files.

3 / 5

Total

18

/

20

Passed

Description

83%Weight 40%Scale 1-5

Based on the skill's description, can an agent find and select it at the right time? Clear, specific descriptions lead to better discovery.

A specific, distinctive, third-person description that covers the integration's components comprehensively and pins the trigger scenario (Paddle + usage-based billing + Next.js). Its only weaknesses are the absence of an explicit 'Use when...' trigger clause and of common synonyms like metered/pay-as-you-go billing or prepaid credits.

DimensionReasoningScore

Specificity

The description enumerates the full set of concrete sub-tasks — "early access check, usage balance units, meters, price allowances, usage events, balance gating, and `usage_balance.depleted`" — plus the implementation constraint "using the Paddle API directly", in third person. This matches 'lists multiple specific concrete actions; comprehensive coverage' rather than the anchor 4 example, which would leave visible gaps in the workflow's coverage.

5 / 5

Completeness

The 'what' is explicit and comprehensive, and the 'when' is stated through the fully specified scenario ("Add Paddle usage-based billing (early access) to a Next.js app"), which functions as equivalent explicit trigger guidance rather than a merely implied one — so it is not capped at 3. It is not 5 because there is no dedicated trigger clause ('Use when...' / 'when the user mentions...') naming the user-facing moments to fire, e.g. 'Use when the user wants prepaid or metered usage on Paddle subscriptions'.

4 / 5

Trigger Term Quality

Strong natural domain phrases are present ("usage-based billing", "Paddle", "Next.js", "meters", "usage events", "price allowances", "balance"), which a user asking for this integration would plausibly say. It falls short of the top anchor because common synonyms are missing: "metered billing", "pay-as-you-go", "prepaid usage", "credits", and "overage" — the vocabulary the body itself surfaces in 'When to use this skill' ("10,000 API calls, 1 million tokens") is absent from the description.

4 / 5

Distinctiveness Conflict Risk

The niche is tightly bounded by three distinct markers — Paddle, usage-based billing (early access), and the `usage_balance.depleted` webhook — so it would essentially never fire for a non-Paddle or non-metered billing request, and even sibling Paddle skills (catalog-setup, checkout-web) are differentiated by the 'usage-based billing' qualifier. This matches 'clear niche with distinct triggers; minimal conflict risk'.

5 / 5

Total

18

/

20

Passed

Validation

87%

Checks the skill against the spec for correct structure and formatting. All validation checks must pass before discovery and implementation can be scored.

Validation — 14 / 16 Passed

Validation for skill structure

CriteriaDescriptionResult

skill_md_line_count

SKILL.md is long (511 lines); consider splitting into references/ and linking

Warning

referenced_paths_exist

Referenced path issues: 2 missing

Warning

Total

14

/

16

Passed

Repository

PaddleHQ/paddle-agent-skills

Path

providers/codex/plugin/skills/usage-based-billing/SKILL.md

Reviewed

Table of Contents

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.