Agent skill for virtual currencies
Virtual currencies grant credits to your users when they buy a product or renew a subscription. The virtual-currencies skill manages them from your AI tool. Your agent lists your currencies, shows how many credits each linked product grants, creates a currency, and adds, changes, or removes its linked products. It also reads the credit transactions and the balances of a user, so it can tell you why that user has a balance. It works through the adapty virtual-currencies CLI commands or the Adapty MCP server.
The skill asks before each change. It shows you what changes: each linked product with its credits before and after, or the new currency with its products. It runs the change only after your yes. New amounts apply from the next purchase or renewal: current subscribers get the new amount at their next renewal.
What you can ask
Ask the way you’d brief a colleague. You don’t need to name the skill:
Which virtual currencies does my app have?
How many gems does the Starter pack give?
Give the Starter pack 50 gems.
Create a currency "Gems" and give 100 gems for each Gem pack purchase.
Stop giving gems for the Weekly subscription.
Why does user 4512 have 40 coins?
A player's 400 coins disappeared after they reinstalled the app. Why?Read the currency
adapty virtual-currencies listadapty virtual-currencies get <gems-id>
Change how many gems the Starter pack credits.
- Starter pack: 30 → 50 gems for each purchase.
- The other 3 products of Gems stay as they are.
- The new amount applies from the next purchase. Earlier purchases keep their gems.
Change it?
- Yes
- No
Before you start
- Products in Adapty: A currency grants credits through its linked products in Adapty.
- An AI tool connected to your Adapty account: The skill works through the Adapty MCP server or the Adapty CLI. In Claude Code and Codex, the plugin adds the MCP server, so you only sign in. The skill checks which of the two your AI tool has and uses it. With both, it uses the MCP server. With neither, the skill asks which one to set up.
Install the skill
The virtual-currencies skill is part of the Adapty plugin.
If you already installed the Adapty plugin, you have this skill. If your agent doesn’t list it, update the plugin with the command for your agent in the plugin README.
To install the plugin in a coding agent, in your terminal, run:
npx adapty skills installRestart your agent to load the plugin. To install the plugin in claude.ai or Claude desktop, see Install the plugin. For other installation methods, see the plugin README.
Claude Code doesn’t update the plugin on its own. To get new skills as they ship, in Claude Code, run /plugin, open Marketplaces, select adapty, and choose Enable auto-update. For the update command in other agents, see the plugin README.
What the skill asks before each change
The skill reads the currency right before each change, and shows you what changes. Only your answer to the skill’s question counts. A general “go ahead” before the skill shows the change doesn’t. If you say no, the skill changes nothing.
| Change | What the skill tells you |
|---|---|
| Create a currency | The code, the name, and its linked products. You can’t delete a currency or change its code, and an app can have up to 20 currencies. A balance belongs to one user profile, so if your users don’t sign in, they lose their credits when they reinstall the app or move to a new device. |
| Add or change linked products | Each product that changes: new, or its credits before and after, for each purchase or each subscription period. Current subscribers get the new amount at their next renewal. The other linked products stay as they are. |
| Remove a linked product | The product with its credits now. Its purchases stop granting credits of this currency, and no transaction records the purchases that grant none. Credits already granted stay. |
| Change the name or the description | The name or the description before and after. The rest stays as it is. |
If the currency changes between the skill’s read and its write, in the dashboard or from another tool, the skill doesn’t overwrite that change. Adapty refuses the write, or, for a name change through the CLI, the skill’s read right before the write shows the change. Nothing changes. The skill shows you the change again and waits for a new yes.
If Adapty doesn’t answer a change, the skill doesn’t send it again at once. It reads the currency first and tells you what was saved. For a part of the change that is still missing, it shows you a new question and waits for a new yes.
How the skill explains a balance
Ask why a user has a balance, and the skill reads the user’s credit transactions and balances, by the profile ID or by your own user ID. It tells you which purchases, spends, and grants gave the balance, and which credits expire and when. The user’s profile in the dashboard shows the same data.
If a user’s credits disappear after a reinstall, on a new device, or after a login, the skill asks you for the user’s previous profile and reads its balance. A balance belongs to one profile and doesn’t move to another, so the credits stay on the previous profile. To keep each user’s balance on every device, identify your users.
Limits
- No deletion of a currency: You can’t delete a currency or change its code, in the skill or in the dashboard.
- No balance changes: The skill doesn’t credit or debit a balance. Your server spends and grants credits through the server-side API: see the Virtual currency quickstart and Grant an initial balance. To correct one user’s balance, use the dashboard.
- No unattended changes: In a scheduled run or a script, with no one to answer, the skill only reads. For a change, it reports what the change does and the command for you to run.
To run the commands yourself, without the skill, see Manage virtual currencies from the CLI.