entitlement-grant
Use when verified purchases, subscriptions, durable unlocks, consumables, or time-limited access must be granted exactly once across retries, crashes…
by jammyfu★ 27 GitHub stars
Install entitlement-grant in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
About this skill
Entitlement grant
This skill owns verified purchase-event → durable entitlement state. Store UI and pricing belong elsewhere; restore-purchase owns user-initiated/current-entitlement reconstruction.
Product classes
| Class | Durable state |
|---|---|
| non-consumable/durable-unlock | boolean/ownership keyed by product plus store identity |
| consumable | balance mutation keyed by a unique transaction/purchase token/event id |
| subscription/time-pass | entitlement interval/status keyed by the store's stable subscription identity/token |
| battle-track/season | ownership scoped to season/content identity |
Idempotent transaction state machine
Use the immutable store transaction ID, purchase token, or equivalent verified event ID as the deduplication key; do not use UI callbacks or order display strings as the primary key.
A safe abstract flow is:
- receive
pending/purchased event and persist processing state; - verify authenticity/account/product and confirm it is grantable;
- in one durable transaction, record the event ID and apply the entitlement/balance mutation if that event ID is not already committed;
- only after durable grant, acknowledge / consume / finish according to product/store requirements;
- if acknowledgement/consume/finish fails, retry that store-side completion without granting again;
- emit UI refresh from durable entitlement state.
For stores that require consumption before re-purchase, preserve enough pending state that a crash cannot lose a consumed-but-not-accounted grant. Platform adapters may vary the exact store call sequence, but they must prove no crash window can duplicate or lose value.
PENDING or unverified purchases do not grant. Revocation/refund handling updates entitlement through an explicit policy rather than deleting unrelated story progress.
Acceptance
Replay the same transaction/purchase token many times; kill after verification, after durable grant, and before/after acknowledge/consume/finish. The resulting durable entitlement or consumable delta is applied exactly once, and store completion can retry independently. Test pending→purchased and refund/revoke paths. Unrun sandbox/server cases stay not-run.
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
FAQ
What does the entitlement-grant skill do?
Use when verified purchases, subscriptions, durable unlocks, consumables, or time-limited access must be granted exactly once across retries, crashes, duplicate callbacks, and multiple devices.
How do I install the entitlement-grant skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the entitlement-grant skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
theme-factory
AnthropicToolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
access
AnthropicManage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
configure
AnthropicSet up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
access
AnthropicManage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…