revenuecat/ai-toolkit/revenuecat-audiences
Claude Code and agent skill by revenuecat/ai-toolkit
- community
Checking that the SKILL.md file is still in the repository.
Use before sharing a link to a filtered customer list or audience, and when identifying, filtering, or ranking the user's customers (a segment, who they are, a product or duration, spend, renewals, status, country, attribution).
Install
npx vskill@latest install revenuecat/ai-toolkit/revenuecat-audiencesSKILL.md
The same SKILL.md was published earlier as revenuecat/ai-toolkit/revenuecat-audiences.
Audience filters and dashboard links
Use Audiences to filter the user's customers and to share a dashboard link to that set. Filters select the segment; sort_by / sort_direction on preview-audience order the returned sample.
There is no first-class CLI command for audiences. Do not tell the user RevenueCat cannot filter or segment customers.
Identifying, filtering, or ranking customers
Audiences filter on the fields below, including:
- Product and duration —
latestProduct,allPurchasedProductIds,latestPurchasedOffering,
entitlements, offers
- Spend and renewals —
totalSpent(filter, andsort_by: total_spent),totalRenewals(filter
only; there is no renewal sort)
- Subscription state —
status, trial, auto-renew intent, ownership - Store, platform, and country —
platform,latestStore,country,storefront - Dates — first seen, purchases, renewals, expiration, trial, cancellation
- Attribution and experiments — media source, campaign, ad group, keywords, price experiment
- Identity and custom attributes — app user ID, email, locale,
customAttribute:{key}
Map the question onto those fields, filter, then read a sample.
- Fetch project-specific values with
get-audience-filter-optionsfor any field marked
project-specific that the question uses (project_id, fields).
- Call
preview-audiencewithproject_idandbody.rulesin the filter rule
shape (for a saved audience from list-audiences, pass body.audience_uuid instead). It is read-only and saves nothing. Do not create-audience just to inspect a segment.
- To rank or name a superlative, pass
sort_by(status,latest_auto_renew_intent,
first_seen_at, last_seen_at, total_spent) and sort_direction (asc default, or desc) as top-level parameters, not inside body. sort_by: total_spent with sort_direction: desc returns the highest spenders first, so the first customer_sample row is the top spender. The sample is capped (typically 50): it is the top or bottom matches, not every customer.
- Answer "how many" from
stats(total_customers,active_subscriptions,active_trials,
total_revenue in currency), never from the sample size. When stats.is_approximate is true, give counts and revenue as approximate ("about 6,400 customers").
- Name customers only from fields
customer_samplereturned (app_user_id,email,status,
total_spent, latest_product_name, first/last seen). Without sort_by the sample is unordered: say it is a sample of matches, not a ranking.
totalRenewalsis a filter only, not asort_byvalue or a sample column. Filter on a high
threshold and report the matches; do not invent a renewal count or claim a unique maximum.
- Share the dashboard link. The
preview-audienceresult forbody.rulesincludes a line
starting "Dashboard URL for this result"; link that exact URL. Build one yourself (constructing a link) only when no tool result gave you a URL.
Constructing a link
Use this only when no tool result gave you a "Dashboard URL for this result" line. Two shapes: a filtered all-customers link for ad-hoc exploration, and a saved-audience link after create-audience.
- Get the project ID from
list-projects. For dashboard URLs, strip the `proj` prefix. - Pick fields and operators from the field tables. Do not invent field or operator
names.
- For project-specific fields, fetch valid values with
get-audience-filter-optionsfirst. - Assemble the rule JSON: one group per OR-branch, conditions inside a group
for AND, values encoded per value formats.
- Serialize and URL-encode the rule with a short script (see encoding the rule)
— do not encode by hand.
- Append it as the
filtersquery param on
https://app.revenuecat.com/projects/{project_id}/customer-lists/all-customers.
URL format
{project_id}— short hex ID fromlist-projectswithprojstripped.- Filters only work on the
all-customerslist. The unfiltered Audiences home is
/projects/{project_id}/customer-lists.
Linking to a saved audience
The create-audience and get-audience results include a "Dashboard URL for this result" line; link that exact URL. If you only have list-audiences output, link with customer_list_id, the field returned alongside id:
An audience's `id` (`aud…`) and its `customer_list_id` (`list…`) are different identifiers. The dashboard route only resolves customer_list_id; an aud… id in that slot renders "Audience not found".
Correct:
Wrong (the audience id instead of the customer_list_id):
Do not add a filters param to a saved-audience link — the audience carries its own rules. If the response has no customer_list_id, link to /customer-lists and name the audience rather than guessing an id.
Offering to save the filtered view
A filtered all-customers link is ad-hoc — nothing about it is saved. Say so in one short sentence when you share one, and offer to save it: "This view isn't saved — want me to save it as an audience so you can find it later?"
Offer once per conversation. If they accept, call create-audience with the same rule you built for the link, then link to it. Do not offer when the link is already to a saved audience.
The filter rule
The filters value is URL-encoded JSON with this shape:
- Conditions within a group combine with AND.
- Groups combine with OR.
valueis always a JSON string — booleans as"true"/"false", numbers as"42", lists as a
comma-separated string, date ranges and relative dates as stringified JSON (see value formats).
Correct (compact JSON, whole value URL-encoded):
Wrong (raw JSON, spaces, unencoded quotes/braces):
Encoding the rule
Fields
The Audiences preview table shows only Customer, Subscription Status, Auto-Renewal Status, Spent, and Latest Purchase. Other attributes appear in the CSV from Export all, or on a customer's profile.
Use these exact field strings. See Audiences.
Text fields
Operators: is, isNot, contains, doesNotContain, isEmpty, isNotEmpty.
| Field | Meaning | |
|---|---|---|
customerId | App user ID | |
originalAppUserId | Original app user ID | |
email | ||
phoneNumber | Phone number | |
locale | Locale | |
appVersion | App version | |
sdkVersion | SDK version | |
platformVersion | Platform (OS) version | |
projectId | Project ID (e.g. proj1ab2c3d4) | |
projectName | Project name | |
appConfigId | App ID (e.g. app1ab2c3d4) | |
appConfigName | App name | |
idfa | IDFA | |
idfv | IDFV | |
gpsAdId | GPS ad ID | |
latestPurchasedOffering | Latest purchased offering | |
latestOffer | Latest offer identifier | |
latestEntitlements | Latest entitlement identifiers | |
allPurchasedProductIds | All purchased product identifiers |
Enum fields
Operators: is, isNot, isAnyOf, isNotAnyOf, isEmpty, isNotEmpty.
| Field | Values | |
|---|---|---|
platform | iOS, android, web, macOS, amazon, roku, tvOS, visionOS, watchOS | |
status | active, trialing, in_grace_period, in_billing_retry, paused, expired, incomplete, unknown | |
latestStore | app_store, play_store, promotional, mac_app_store, stripe, amazon, roku, rc_billing, paddle, external | |
anyActiveStore | Any active store — same store identifiers as latestStore | |
latestOwnershipType | PURCHASED, FAMILY_SHARED | |
latestOfferType | no_offer, free_trial, introductory_offer, offer_code, promotional_offer, win_back_offer, unspecified_offer | |
priceExperimentVariant | a, b, c, d | |
country | Last seen country — ISO 3166-1 alpha-2 codes (e.g. US, DE) | |
latestStoreCountry | ISO 3166-1 alpha-2 country codes | |
storefront | Store country — ISO 3166-1 alpha-2 codes | |
mediaSource | project-specific — fetch valid values | |
campaign | project-specific | |
adGroup | project-specific | |
ad | project-specific | |
keyword | project-specific | |
creative | project-specific | |
priceExperimentId | project-specific | |
latestProduct | product IDs of the project — fetch valid values |
Boolean fields
Operators: is, isNot. Value is exactly "true" or "false".
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingrevenuecat/skills/revenuecat-audiences/SKILL.md
Popularity
- Repository stars
- 73
- Repository forks
- 9
- 7-day trend score
- 27
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/revenuecat/ai-toolkit/revenuecat-audiences)