/adapty-skills:audiencesfrom Adapty
Manages Adapty segments and audiences for targeting paywalls/flows by country, language, app version, platform, revenue, subscription state, install date, custom attributes, or attribution. Creates, edits, and reuses segments through the CLI.
Ships in Adapty. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
A segment is a set of filters, all of which a user must match. An audience is one entry in
a placement: one segment (or none), one paywall or flow, one priority. The placement checks its
audiences from the lowest priority up and serves the first one the user matches; the default
audience (segment_ids: []) is last and catches everyone else. Every change this skill makes is
live for real users the moment the placement is written.
This skill owns segments and audiences. It does not own:
flow-generator builds and publishes it. An audience can only
point at content that exists, and a flow only once it is published.migrate-placements.ads-manager,
workflow 13 (asa segments create resolves the Apple ids and keeps the dashboard's naming).
Come back here to route the segment it returns.adapty-integration owns the SDK call. A segment over an attribute nobody sets matches nobody.ab-tests. It owns the life of a
regular paywall or flow test and shows the user the exact effect before each one-way step. This
skill reads the tests on a placement and keeps them (next section); it never starts or stops one.
Two requests from ab-tests are yours, not a hand-back:
ab-tests starts the
test on that row.placements get shows an audience that runs an A/B test as an entry of its own kind:
{"content_type":"ab_test","ab_test_id":…,"ab_test_title":…, "segment_ids":[…],"priority":…}, or "flow_ab_test" on a flow placement. Send it back in
--audiences exactly as read (ab_test_title is optional on a write). The audience serves the
test's running content, so a test entry is not something you build or edit here.
cross_ab_test, flow_cross_ab_test) runs across several placements and
shows read-only. Send each such entry back unchanged and never add, edit or reorder one. The
backend counts its priorities and its default audience apart from the regular ones, so both
groups can hold priority 0 and a default. You add and reorder only regular audiences.placements update with a new title) sends every audience row back exactly as
read, test rows included.ab-tests (ab-tests stop with --winner, --other or
--no-content) and starting one to ab-tests start; each shows the user the exact effect
first. Say so, hand the user to ab-tests, and come back for the placement write after the
test has stopped (read the placement again then).placements get once more. If the placement differs
from the read the user saw, show the new before/after table and ask again. An unattended run
stops there and reports; it does not write.ab-tests. The id of a test that runs on
another audience or placement would move that test.ab-tests step. Creating the
segment through the CLI is still fine.A CLI older than the API refuses these entries on write: what to do is in Never below.
.md URL; the user gets the same URL without .md.This skill reaches Adapty through the Adapty CLI or the Adapty MCP server. Its commands are written for the CLI, and over MCP each one is a tool call. Before the first call, check both, pick one way, and keep it for the run:
adapty auth whoami shows an account. Install nothing for this check.apps_list and auth_whoami,
after any prefix your client adds) and auth_whoami shows an account.| CLI ready | MCP ready | Use |
|---|---|---|
| yes | no | the CLI |
| no | yes | MCP |
| yes | yes | the way this skill prefers (the line after this section's example) |
| no | no | ask which one to set up (below) |
Over MCP, run each command as its tool. $ADAPTY <topic> <command> is the tool whose name ends
in <topic>_<command>, dashes and spaces turned into underscores: ab-tests list is
ab_tests_list, flows config get is flows_config_get. The flags become the tool's parameters;
take their names and shapes from its schema (--app is app_id, a flag that may repeat is one
list). The tools return JSON, so drop --json. --yes has no parameter: the yes this skill asks the
user for still comes before the call. Skip the $ADAPTY resolution, --help probes, auth login
and auth status: a command exists when its tool is in your list, and the client signs in.
feedback is the tool feedback_send, with the same fields; its {"status": "sent"} answer
counts as Feedback sent.
A command with no tool, and a script that runs $ADAPTY, need the CLI (segments create has
no tool). Run that step with the CLI when it is ready. Otherwise say it needs the CLI and offer to
set it up.
When a call fails one way, a read may run once the other way if that way is ready. After a write fails or times out, read the state again the way that wrote; never repeat the write the other way.
Neither ready: ask which one to set up, the one this skill prefers first, then give only that one's steps. Use your question tool if you have one; otherwise ask in one message with numbered options.
The CLI: run this skill's CLI resolution, then adapty auth login, which opens the browser for
the user's sign-in. The Claude app also needs Adapty's domains allowed first:
https://adapty.io/docs/developer-cli-cowork
EU account: first check that the CLI knows the region: ADAPTY_REGION=xx $ADAPTY auth status
exits 2. On any other exit, set ADAPTY="npx --yes adapty@latest" and keep it for the login and
every next call, also in a new shell, whatever the version block printed. Then log in with
$ADAPTY auth login --region eu (or ADAPTY_REGION=eu); where this skill has the user log in,
run no login yourself and tell them to run adapty auth login --region eu. The user opens the
link in a browser signed in through https://app.adapty.io/eu-login. After a damaged login file,
log in again with the same region; if you do not know it, ask the user.
MCP: the server is https://mcp.adapty.io/mcp, and the user signs in in the browser. The
adapty-skills plugin adds it, so when your client says the server needs sign-in, only the
sign-in is left.
An account on Adapty's EU servers uses the EU instance, https://mcp-eu.adapty.io/mcp, instead.
The plugin adds only the default server, so add the EU one in your agent by hand:
Adapty on EU servers.
/mcp, pick plugin:adapty-skills:adapty, Authenticate. Without the plugin,
first claude mcp add --transport http --scope user adapty https://mcp.adapty.io/mcp.codex mcp add adapty --url https://mcp.adapty.io/mcp, then codex mcp login adapty.If the tools do not appear in this session, the user starts a new one: say so and stop.
Example of the question's shape, not words to copy:
I can reach your Adapty account in two ways. Which one should I set up?
- The Adapty CLI: I install it, and you sign in once in the browser.
- The Adapty MCP server: you add it to your AI tool and sign in; nothing to install.
This skill prefers the CLI: segments create and segments update have no tool, and a
new segment is most of its work. With MCP only, say so in one line and offer the CLI; on a no,
go on over MCP, and build a new segment in the dashboard the way the 405 line in "The CLI"
says.
Resolve $ADAPTY once and use it for every call:
if [ "${ADAPTY-}" != "npx --yes adapty@latest" ]; then ADAPTY="adapty"; VMSG=$(
_a() { if [ -n "${HTTPS_PROXY-}${https_proxy-}" ]; then NODE_USE_ENV_PROXY=1 $ADAPTY "$@"; else $ADAPTY "$@"; fi; }
_v() { _a --version 2>/dev/null | sed -n 's|^adapty/\([^ ]*\).*|\1|p'; }
command -v adapty >/dev/null 2>&1 || { npm i -g adapty@latest >/dev/null 2>&1 \
&& command -v adapty >/dev/null 2>&1; } || { echo npx; exit; }
J=$(_a version --json 2>/dev/null) && printf '%s' "$J" | node -e 'let s = "";
process.stdin.on("data", d => s += d).on("end", () => { try { const j = JSON.parse(s);
if (j && typeof j.installed == "string" && (j.latest === null || typeof j.latest == "string")
&& typeof j.update_available == "boolean") process.exit(j.update_available ? 1 : 0);
} catch (e) {} process.exit(1); });' && exit
old=$(_v); npm i -g adapty@latest >/dev/null 2>&1 || { echo npx; exit; }
new=$(_v); [ -n "$new" ] || { echo npx; exit; }
[ "$new" != "$old" ] && echo "CLI updated from $old to $new." || echo "Could not update the CLI: still $new."
); [ "$VMSG" = npx ] && ADAPTY="npx --yes adapty@latest" \
&& VMSG="Could not install or update the CLI globally, so I run it through npx."
if [ -n "$VMSG" ]; then echo "$VMSG"; fi; fi
Run this block as its own command, right after the readiness check adapty auth whoami and
before any other CLI command. Copy it as it is: it runs $ADAPTY version --json and updates a
CLI that is behind or too old to have that command. If it prints a line, your reply to the user
starts with that line, in their language, with nothing added. Say nothing else about the CLI
version: no "up to date", no version number. A new shell does not keep $ADAPTY: set it again, to
npx --yes adapty@latest after the npx line, else to adapty.
In zsh a multi-word $ADAPTY needs setopt shwordsplit. Write commands out for the user with a
literal adapty.
segments list and segments get are old. segments create and segments update are newer
— probe $ADAPTY segments create --help before planning a write; if it does not describe
the command, try npx --yes adapty@beta segments create --help once (use that form for the writes
if it works). Two refusals are not flag problems, so do not retry with variations:
unknown command → the CLI lacks the command; when the beta try fails too, build the segment
in the dashboard as the next line says.405 → the server has not opened segment writes yet. Build the segment in the dashboard
(https://adapty.io/docs/segments), read its id with segments list, and continue at step 5.| Command | What it does |
|---|---|
segments list --app <app> --page-size 100 | id, title, description only — no filters |
segments get --app <app> <id> --json | adds filters[], profile_count, refresh_in_progress |
segments create --app <app> --title <t> --filter <f> [--filter <f>…] [--description <d>] | filters are ANDed |
segments update --app <app> <id> --title <t> --filter <f> […] | replaces the whole segment |
placements list --app <app> --page-size 100 --json | the default page is 20, so a short list hides placements |
placements get --app <app> <id> --json | title, developer_id, audiences[] (A/B test entries included) |
placements update --app <app> <id> --title <t> --developer-id <d> --audiences '<json>' | replaces every audience, so send every entry back, test entries included. Nothing in the CLI warns when the list would stop, start or move a test: keep every test entry as read (see above) |
--app is the Adapty app UUID from $ADAPTY apps list. A filter is field:OPERATOR:value[,value…]:
IN, NOT IN, >, >=, <, <=, BETWEEN, or field:IS NULL / field:IS NOT NULL with no
value. There is no =: equality is IN with one value (ip_country:IN:DE). For a typed or
nested value, pass one JSON object:
'{"field_name":"age","operator":">","value_list":[18]}'. Numbers go in plain (age:>:18).
The server refuses an unknown field name and accepts almost any value for a known one: a
misspelled state, a lowercase country, pt-BR, female all save a segment that matches nobody,
with no error. Only paid_access_level is checked (it must be a UUID). So take the name and the
value format from here. Labels are the dashboard's.
field_name | Dashboard label | Values |
|---|---|---|
ip_country | Country | ISO alpha-2, uppercase: DE |
store_country | Country from store account | ISO alpha-2, uppercase |
locale | Language | 2-letter ISO 639-1: pt, never pt-BR |
app_version | App version (current) | strict SemVer: 2.0.0, never 2.0 or 02.1.0 |
app_version_on_install | App version (on install) | strict SemVer |
os | OS | a version, compared as one: 17 |
platform | Platform | iOS, macOS, iPadOS, visionOS, Android |
device | Device | the model as stored: iPhone 13 |
store | (store) | app_store, play_store, stripe, paddle, adapty |
subscription_state | Calculated subscription state | subscribed, active_trial, auto_renew_off, subscription_cancelled, trial_cancelled, never_subscribed, billing_issue, grace_period |
paid_access_level | Paid access level | the access level's UUID from access-levels list, never its name |
subscription_product_id | Subscription product | the Adapty product UUID from products list |
subscription_expiration_date | Subscription expiration date | YYYY-MM-DD |
total_revenue_usd | Calculated total revenue USD | a number |
virtual_currency_balance__<code> | Virtual currency: () | the balance the user can spend now, a whole number 0 or more; <, <=, >, >=, BETWEEN, IN, NOT IN. The code is the currency's, letter case kept, from virtual-currencies list or analytics values --dimension virtual_currency; a code the app does not have is refused |
age | Age | a number |
gender | Gender | f, m, o |
customer_user_id | App User ID | usually IS NULL / IS NOT NULL |
install_date, created_at | Installation date, Creation date | YYYY-MM-DD |
install_date_relative, created_at_relative, subscription_expiration_date_relative | the same, as a relative range | now-7d, now-3M; comparisons only, no BETWEEN |
status | Attribution: Status | organic, non_organic, unknown |
source | Attribution: Source | adjust, branch, apple_search_ads, appsflyer, custom |
channel, campaign, ad_group, ad_set, creative | Attribution: Channel, Campaign, Ad Group, Ad Set, Creative | the raw strings the attribution sends; for Apple Search Ads they are Apple ids, so route to ads-manager |
Custom attributes are attributes__<key>@string (IN, NOT IN, IS NULL, IS NOT NULL) or
attributes__<key>@float (comparisons too). The key is the one the app sets through the SDK, and
the suffix must match its type: a value stored with the other type counts as not set. No command
lists an app's keys, so take the key from, in order: an existing segment's filters[]
(segments list, then segments get --json), the app's code, or the user. Never guess a key.
A balance segment counts a user who never got the currency, and a new anonymous install, as 0,
so "fewer than 30" includes them: say so on the card. Its user count is not computed
(profile_count_available: false): never report one.
Last seen is in the dashboard but not in this list: the server refuses it. A segment on it is made in the dashboard.
These look like one attribute and are two, or have a format that fails silently. Ask before building, and say what each option means. Labels are the dashboard's (https://adapty.io/docs/segments).
| The user says | The choice | Why it matters |
|---|---|---|
| "users in Germany" | Country (latest IP, refreshed weekly, moves with VPNs and travel) or Country from store account (iOS 13+ only) | Pricing and legal copy usually want the store country |
| "on version 2.0", "updated to 2.0" | App version (current) or App version (on install) | "On install" silently drops everyone who upgraded |
| any app version | Strict SemVer: 2.0.0, never 2.0 or 02.1.0 | An invalid version matches nobody, with no error |
| "never paid", "non-payers" | Which signal: total revenue, subscription state (never_subscribed), paid access level | Comparisons and NOT IN skip profiles where the attribute is unset, and filters in one segment are ANDed — so "zero or unset" is two segments in two audiences, never one segment with both filters |
| a language | 2-letter ISO 639-1 (pt, not pt-BR) | Extended locales match nobody |
| two conditions | Both (one segment, two filters) or either (two segments, two audiences) | One audience holds one segment, so "or" is two entries |
placements list --page-size 100 --json, match developer_id, then
placements get --json. Record title, developer_id, and every audience, A/B test and
shared test entries included. Note the content_type the entries carry: it is fixed for the
placement. Asked to serve a flow at a paywall placement, or the reverse? The placement
cannot; stop and route to migrate-placements.segments list --page-size 100, then segments get --json on any
title that could match, and compare filters[]. A segment with the same filters is the one to
use — say so. Never create a twin.profile_count is 0 on creation and fills in later, so it proves nothing yet.0…n with the default last, test entries included (a priority change alone keeps a
test running). Leave every shared-test entry exactly as read.content_type and the matching id: {"content_type":"paywall", "paywall_id":…} or {"content_type":"flow","flow_id":…}, plus segment_ids (one id, or []
for the default) and priority. The CLI refuses an entry without them before sending. An A/B or
shared test entry goes back as read.placements update, reusing title and developer_id exactly.placements get --json: same entries, your new one where you put it, one
default, last, and every test entry still there with its ab_test_id and segments.adapty-integration's job.ab-tests. Never
write on a placement that changed since the read the user saw.ab-tests; the id of a test that runs elsewhere moves that test.cross_ab_test, flow_cross_ab_test).placements get. On an
entry you did not write, this CLI does not know this audience kind; update the CLI, or from an
older CLI content_type is required and must be "paywall" or "flow", means your CLI is older than
the API and the entry is a running A/B test. Tell the user to update the CLI, re-resolve
$ADAPTY once and retry the same list. If it still refuses, send the change to the dashboard.
Deleting the entry makes the write go through and stops the test. (content_type is required:
followed by the list of kinds means an entry has no content_type at all: fix the entry you
wrote.)paywall_id, or an entry without content_type.segments update with only the filter you changed — it replaces the segment; read it
and pass back every filter you keep. A segment can serve several placements and A/B tests, so
name that before editing a shared one; a new segment is often the safer change.placements --paywall-id. It rewrites every audience into one default.| What the agent told itself | What is actually true |
|---|---|
| "The user said to go ahead without checking back, so I run the writes without asking and send a summary message after." | Their yes covers their request. It does not cover moving VIP users off the VIP paywall, which is what putting the new audience first does to anyone in both segments. |
| "I put the new segment at priority 0 so DE/AT users reliably get the cheaper paywall." | Priority 0 also outranks every existing segment. "Before the default" is the position that changes nobody else. |
| "If the server rejects a field name or value, it reports one error per field. I'd fix the names from that error and re-run, without guessing further." | A wrong name is refused; a right name with the wrong meaning is accepted. Read the name off an existing segment. |
"app_version, with value 2.0." | Versions are strict SemVer. 2.0 matches nobody, with no error. Write 2.0.0, and settle current versus on-install first. |
"I put the flow id in the audience's paywall_id field. The reference covers only paywalls" | Every entry carries content_type, and a flow entry carries flow_id. The placement's own entries show which one it takes. |
Quotes are verbatim from baseline runs without this skill (2026-10-12).
priority number than an existing segment's, and no answer from the
user about who wins--audiences array with fewer entries than placements get returned, plus oneplacements update with no placements get just before itab_test_id in the array that no audience of this placement carried when you read itfield_name or a value not in the table, or a custom attribute key nobody read off a segment, the code or the userplacements get removed after the CLI refused itplacements get returnedplacements list without --page-size 100$ADAPTY <topic> <command> --help for flags on the installed version; the adapty-docs skill for
any dashboard behaviour. Do not guess a flag, a field name, or a URL.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
adapty, segments, audiences, paywall-targeting, placement-routing
npx claudepluginhub adaptyteam/adapty-skills --plugin adapty-skills18 skills in this plugin
/ab-testsUse when a user wants to run, check or end a regular A/B test of paywalls or flows through the Adapty CLI — plan it, create the draft, change it, start it, read its results, stop it with a winner, replace a running test with a changed one, archive it, or see which tests an app has. Triggers on "run an A/B test of these two paywalls", "test my new flow against the old one", "split traffic 50/50", "start the test", "stop the test, B wins", "end this experiment", "change the weights of my test", "which tests are running", "archive the old tests", "should I stop this test", "how did the test go", "who is ahead"./adapty-attributionUse when someone asks how their ad campaigns, channels, ad sets, ads, countries or keywords are performing in Adapty Attribution — ROAS, payback, CPI, cost per trial, installs, trial-to-paid, refunds, predicted revenue — which channel or campaign to scale or cut, where to move budget, why installs dropped, why Meta, TikTok or Google report different numbers than Adapty, or how to set up Adapty Attribution with Meta, TikTok, Google Ads, custom tracking links or a web funnel./adapty-docsUse when an Adapty question has no page already linked in the skill you are holding — how a product or dashboard feature behaves, what a setting does, a limit, store connections, Flow Builder, the Developer CLI, the server-side API, or an SDK method on any platform. Also use when you need a docs page and have no URL for it, or when a docs URL you tried returned 404. Not for making a change to an app's Adapty setup — connecting a store, or creating products, access levels or placements — which `adapty-integration` carries out through the Adapty CLI./adapty-integrationUse when a user wants to integrate Adapty SDK into a mobile app, set up in-app purchases with Adapty, add a paywall to their app, or move to Adapty from another purchase system. Triggers on "integrate Adapty", "add Adapty to my app", "set up subscriptions", "add a paywall", "migrate from RevenueCat", "replace RevenueCat with Adapty", "move off Superwall", or similar./adapty-mailUse when someone wants to work in Adapty Mail — email campaigns or sequences, email flows on triggers like never purchased, expired, refunded, billing issue or renewal cancelled, trial-conversion or win-back emails, translating emails, a sending domain and its DNS records, deliverability, bounces, unsubscribes or suppression, double opt-in, email A/B tests, open, click, conversion or email revenue numbers, or why someone did not get an email. Also use when someone wants to connect the Adapty Mail MCP server to their agent, or a Mail tool call fails with an authentication error./ads-managerUse when managing Apple Search Ads through the Adapty CLI — reading campaign, ad group, keyword or ad performance, changing bids or budgets, getting keyword recommendations for an app, adding or pausing keywords, launching or pausing a campaign, creating a whole campaign structure in bulk from JSON or an Apple Ads template, harvesting search terms, setting up rule-based ad automations, finding who changed a campaign, bid or keyword and when, or turning campaigns, ad groups or keywords into Adapty segments so users from one campaign see their own paywall or flow.Other plugins' skills for the same job