Install any skill in seconds. Free to start, no credit card required.
Get Started Free →aiskillstore/credits-handler
Manage the credit system (allocation, purchasing, usage).
Passed 22 of 22 test cases with the skill, and 5 of 22 without it.
and 19 more in the full report
17 fixed5 passed either way0 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 17 test cases the skill fixed. Same model, same prompt, with and without the skill.
What property structure must be present on the user object passed into the balance check helper function?
| Checked | Without skill | With skill |
|---|---|---|
| Requires the user object to contain a credits property object mapping credit types to values | Missed | Passed |
The instructions your model reads when the skill loads.
This skill guides you through the entire credit system, from backend configuration to frontend UI implementation.
All credit configuration lives in src/lib/credits/config.ts.
Define the Type: Add the new type to creditTypeSchema enum.
export const creditTypeSchema = z.enum([
"image_generation",
"video_generation",
"your_new_credit_type" // Add this
]);
Configure Pricing & Metadata: Add an entry to creditsConfig.
your_new_credit_type: {
name: "New Credit Name",
currency: "USD",
minimumAmount: 10,
// Option A: Fixed Slabs
slabs: [
{ from: 1, to: 100, pricePerUnit: 0.10 },
{ from: 101, to: 1000, pricePerUnit: 0.08 },
],
// Option B: Dynamic Calculator (e.g., based on user plan)
priceCalculator: (amount, userPlan) => {
// Logic here
return amount * 0.1;
}
}
Plan Allocations (Optional): Define how many credits are given when subscribing to a plan in onPlanChangeCredits.
test cases passed, vs 5 / 22 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.