cmux-billing
БесплатноБез исполняемых скриптовНе проверенStripe checkout, pricing, subscription, Pro plan, webhook, and entitlement runbook for cmux billing work. Use when editing or debugging billing, pricing…
от manaflow-ai★ 29 049 звёзд на GitHubОб этом скилле
cmux Billing
Read before changing billing, pricing, Stripe, Pro entitlement, checkout, webhook, or subscription code.
Architecture map
/api/billing/checkoutcreates Stripe Checkout Sessions for Pro whenSTRIPE_SECRET_KEYis set. It setsclient_reference_idto the Stack user id, auto-creates an anonymous Stack user for signed-out buyers, and falls back to the legacy Stack purchase path when Stripe is unset orplan=team. The "already active" short-circuit lives here./api/billing/portalresolves the current Stack user, looks up theirstripe_customersrow, and creates a Stripe customer portal session returning to/pricing./api/billing/subscriptioncancels or resumes the active Stripe Pro subscription;/dashboard/billingrenders localized in-dashboard plan state and self-serve actions.web/services/billing/purchase.tsis the shared idempotent recorder used by/api/billing/completeand/api/stripe/webhook. It attaches email to the purchaser, recordsbilling_email_claimson conflict, and never cross-grants based on an unverified email.- VM code reads the plan from Stack
clientReadOnlyMetadata: a non-emptycmuxVmPlan(operator override) takes precedence, otherwisecmuxPlan(the Stripe mirror) supplies the entitlement.resolveProPlanStatusreports Pro for an activestripe_subscriptionsrow or a paidcmuxVmPlanoverride (pro,team,founders);billingManagementstays Stripe-only, so a granted account shows Pro without a portal link. - The staff-only
/api/admin/*routes let admins (a verifiedcmux.com,manaflow.ai, ormanaflow.comemail, or a verified email with an activeadmin_membersrow) search users, teams, and emails and: grant or remove the usercmuxVmPlanoverride (/api/admin/users), grant or remove a team override ofteam(/api/admin/teams), grant Pro to an email with no account yet (/api/admin/email-grants, stored inadmin_plan_grantsand applied by the after-sign-in callback once the mailbox is verified), and downgrade a paying customer by cancelling the Stripe subscription at period end (/api/admin/subscriptions, same service as the self-serve form).services/admin/routeAuth.tsrequireAdminis the gate (domain check inservices/admin/access.ts);members,audit, andpro-usersroutes manage admin invites, the audit log, and the Pro roster.services/admin/proGrants.tswrites under the account-mutation lease and recordsserverMetadata.cmuxAdminPlanGrant(who, when, which plan). Non-admins get 403 on the API; the admin UI is not part of this repository and there is no admin page on cmux.com. Theadmin_plan_grantsmigration is an operator step; until it runs, pending email grants report 503 and search omits them. /api/stripe/webhookis signature-verified, insert-first idempotent throughstripe_webhook_events, safe for foreign events in the shared Stripe account, and gates cmux handling onmetadata.app === "cmux". Return 2xx only after durable writes; return 500 to make Stripe retry.
Dev workflow
- Use
web/scripts/stripe/dev-stack.sh. - Local
bun devaccounts use the development Stack project and receive a non-persistent Pro entitlement automatically. This applies only whenCMUX_LOCAL_DEV_PRO=1,NODE_ENV=development,VERCEL_ENVis unset, andNEXT_PUBLIC_STACK_PROJECT_IDis the development project. Release and preview deployments remain billing-backed. Usedev-grant.shonly when testing an explicit manual grant or a non-local deployment. - The tagged app bakes
CMUX_PORTintoInfo.plist; run the dev server on the tag's printed port, never a hardcoded one. - Per-branch Docker Postgres ports collide with other agents' containers. Use
--db-portand never stop containers you did not create. /app-pricingrequirescmux_app=1.cmux_schemethreads the native deeplink return scheme;cmux-dev-*schemes are honored only for localhost requests.- Repeat dogfood: use a private window for a fresh anonymous buyer, and
web/scripts/stripe/dev-reset.sh <email>to un-Pro a signed-in dev account before retesting checkout. - Fake payment, two ways:
web/scripts/stripe/dev-grant.sh <email>writescmuxVmPlan: "pro"directly (same override as/api/admin/users) (instant, no checkout; undo with dev-reset). For the full checkout path at $0, enter promotion codeCMUXDEV100in test-mode checkout: a 100%-off forever coupon in the test account;allow_promotion_codesis already set on checkout sessions. - Newer Stripe CLI prints
stripe config --listaskey=value(older builds usedkey = 'value'); dev-stack.sh and dev-reset.sh accept both. If key extraction fails, re-runstripe login.
Catalog
Prices live in web/services/billing/plans.ts and are provisioned by web/scripts/stripe/provision-catalog.sh. Current checkout keys: cmux-starter-monthly-15 ($15/mo, Plus; internal plan ID go), cmux-pro-monthly-50 ($50/mo), cmux-pro-yearly-480 ($480/yr, $40/mo equivalen
Установить cmux-billing в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл cmux-billing?
Stripe checkout, pricing, subscription, Pro plan, webhook, and entitlement runbook for cmux billing work. Use when editing or debugging billing, pricing, Stripe Checkout, subscription recording, Pro plan status, webhooks, entitlement metadata, or pricing dev/prod tooling.
Как установить скилл cmux-billing?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл cmux-billing запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set 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…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic