/polar:polar-config-cifrom Polar
Sets up CI for Polar billing configs (polar.config.ts/json) with GitHub Actions or Buildkite. Validates config changes on PRs, drafts/publishes on merge, and creates access tokens.
Ships in Polar. 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.
This skill needs a billing config in the repository. If the project has no polar.config.ts or polar.config.json yet, use the polar-config skill first: it also explains what validate, draft and publish do.
CI can show every pricing change to a billing config on its pull request and release it when the pull request merges. Set this up when the user asks for it, and ask them two things first:
polar config publish or in the dashboard, or draft and publish. Publishing from CI makes a merged pricing change live with no further step, so add it only when the user says so.POLAR_ENVIRONMENT: sandbox on the steps that run polar.CI signs in with organization access tokens instead of a login. Ask the user to create two and store them as repository secrets. Piping straight into gh secret set keeps the token off the screen:
polar auth token --scope organizations:read --scope meters:read --scope benefits:read --scope products:read --scope catalogs:read | gh secret set POLAR_READ_TOKEN
polar auth token --scope organizations:write --scope meters:write --scope benefits:write --scope products:write --scope catalogs:read | gh secret set POLAR_WRITE_TOKEN
The first can only read and is for pull requests. The second writes and is for the main branch. When a merge also publishes, replace catalogs:read with catalogs:write in the second: it covers reading too, and publishing needs it. Add custom_fields:read and custom_fields:write when the config has custom fields. Only an owner or admin of the organization can create these tokens.
A GitHub Actions workflow for a TypeScript config:
name: Polar billing config
on:
pull_request:
paths: [polar.config.ts]
push:
branches: [main]
paths: [polar.config.ts]
jobs:
validate:
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: 22 }
- run: npm ci
- run: npm install -g @polar-sh/cli
- run: polar config validate --pr-comment
env:
POLAR_ACCESS_TOKEN: ${{ secrets.POLAR_READ_TOKEN }}
GITHUB_TOKEN: ${{ github.token }}
release:
if: github.event_name == 'push'
runs-on: ubuntu-latest
environment: production
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: 22 }
- run: npm ci
- run: npm install -g @polar-sh/cli
- run: polar config draft --confirm
env:
POLAR_ACCESS_TOKEN: ${{ secrets.POLAR_WRITE_TOKEN }}
- run: polar config publish --confirm
env:
POLAR_ACCESS_TOKEN: ${{ secrets.POLAR_WRITE_TOKEN }}
publish step out when a merge should only save the draft.catalogs:read or catalogs:write, needs a new token with that scope: create it with the commands above and replace the secret.validate --pr-comment posts what would change as one comment on the pull request, updates it on every push and removes it when the config no longer changes anything. It needs GITHUB_TOKEN and the pull-requests: write permission. It fails the job when the config has errors, so a broken config cannot merge.validate job skips pull requests from forks. They get no secrets, so the job would fail without a token.working-directory on the steps that run polar and use the file's full path in paths.npm ci is there because a TypeScript config imports its package. For a JSON config, drop it, point paths at polar.config.json, and add polar config generate --check to the validate job when the project generates names with polar config generate.environment: production is a GitHub environment. Suggest a required reviewer on it: a pricing change then needs a person's approval after the merge and before it reaches Polar.draft stops in CI too when the draft on Polar has changes the file does not have. Do not add --force on your own. Ask the user whether the main branch should always win over a draft someone saved from their machine, and add it only if they say yes.--pr-comment also works in Buildkite for a repository on GitHub. On any other CI system, run the same commands without it and read the job's output.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
6 skills in this plugin
/polar-configManage a Polar catalog as code with a billing config file (polar.config.ts or polar.config.json) and the "polar config" commands of the Polar CLI. Use this skill whenever the user wants to: (1) create or edit a Polar billing config; (2) add or change meters, benefits, products or prices in it; (3) write the config from their app's pricing; (4) check what would change, save it to the draft or publish it with polar config validate, draft or publish; (5) fix an issue those commands report; (6) retire a meter, benefit or product with deprecated and polar config prune; (7) generate the config's names for application code with polar config generate. To run these commands from CI, use the polar-config-ci skill.
/polar-integrationAdd Polar billing to a TypeScript/JavaScript app using the @polar-sh/sdk package. Use this skill whenever the user wants to add a Checkout endpoint, a Customer Portal endpoint, or a Webhooks endpoint for Polar to any framework — Next.js, Express, Hono, Astro, SvelteKit, Remix, TanStack Start, Nuxt, Fastify, Elysia, Deno, Supabase Edge Functions, Cloudflare Workers, Bun, etc./polar-migrationGuide for migrating to Polar from other payment platforms (Stripe Billing, Paddle, Lemon Squeezy). Use this skill when: (1) Planning a migration from another payment provider to Polar; (2) Moving customers, subscriptions and saved cards with Polar's Stripe or Lemon Squeezy migration; (3) Running both billing systems during the transition; (4) Mapping products and pricing between platforms; (5) Updating webhook and access handling for migrated subscriptions; (6) Communicating the migration to customers; (7) Testing the migration in sandbox first.
/polar-testingGuide for testing Polar payment integrations using the sandbox environment. Use this skill when: (1) Setting up the Polar sandbox for development; (2) Testing checkout flows without real payments; (3) Using Stripe test cards with Polar; (4) Writing integration tests for payment flows; (5) Testing webhooks locally with the Polar CLI (`polar webhook listen`, `polar webhook trigger`) and generating webhook fixtures; (6) Mocking Polar in unit tests; (7) Setting up CI/CD pipelines with Polar sandbox; (8) Debugging payment issues in sandbox.
/setup-polarInteractive onboarding wizard to set up Polar payment integration from scratch. Use this skill when: (1) User wants to "set up Polar" or "integrate Polar" in their project; (2) User is starting fresh with Polar and needs guided setup; (3) User asks "how do I get started with Polar"; (4) User wants to add payments/subscriptions/checkout to their app using Polar; (5) User needs help creating their first Polar product and checkout. This skill walks through MCP installation, authentication, product creation, and generates framework-specific integration code.
npx claudepluginhub polarsource/agent-toolkit --plugin polar2 plugins ship this exact skill · first indexed Dec 3, 2026