skills/sdk-integration/SKILL.md
Load when SolvaPay functionality needs to be coded into an app. Handles: billing UI (buttons, plan status, React components) in React dashboards, web apps, or MCP server UIs; paywalls, access gates, or usage limits on routes or handlers; SolvaPay fetch handler or webhook setup; SDK integration across Next.js, React, Express, Supabase edge functions, and MCP servers. Skip for greenfield MCP scaffolding, Lovable checkout, or redirect-only checkout with no SDK code.
npx skillsauth add solvapay/skills sdk-integrationInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Add SolvaPay to an existing TypeScript / JavaScript app via @solvapay/* packages.
SOLVAPAY_SECRET_KEY to client code or public env vars.curl block or test script covering happy path (200) and failure path (402 with checkoutUrl). Prose summaries alone do not satisfy this guardrail.Promise<NextResponse> — update call sites (details: references/nextjs.md).@solvapay/ entries (details: references/supabase-edge.md).payable.mcp() — different wiring paths (details: references/mcp-server.md).solvapay/create-mcp-app, not this skill.From package.json and project layout:
next → references/nextjs.mdreact without next → references/react.mdexpress → references/express.md@modelcontextprotocol/* → references/mcp-server.mdsupabase/functions/ or Supabase without Next/Express → references/supabase-edge.mdIf multiple match, ask which runtime is primary.
package.json.npx -y solvapay@latest init.SOLVAPAY_SECRET_KEY, product refs, webhook secret).node scripts/check-env.mjs — no secrets in NEXT_PUBLIC_* / VITE_*; init completed.curl commands or a test script in outputs/ (not a prose summary). Include both:
checkoutUrl.## Integration handoff
- **Stack:** [Next.js / Express / …]
- **Auth model:** [Supabase JWT / session / …]
- **Routes wired:** [list]
- **Webhooks:** [yes/no + path]
- **Sandbox:** [happy path + one failure path outcome]
- **Verification commands:**
# Failure path (no purchase → 402 + checkoutUrl)
curl -i http://localhost:3000/api/premium/data -H "Authorization: Bearer $TOKEN"
# Happy path (after sandbox purchase → 200)
curl -i http://localhost:3000/api/premium/data -H "Authorization: Bearer $TOKEN"
solvapay/create-mcp-appsolvapay/lovable-checkoutsolvapay/website-checkout| Script | Action | Purpose |
| --- | --- | --- |
| scripts/check-env.mjs | Run | Detect secret leaks in client/public env |
npx -y solvapay@latest inittools
Use when building a checkout or upgrade flow on an existing website: user clicks subscribe or upgrade → server creates a SolvaPay session → browser redirects to SolvaPay's hosted payment page → returns to your site with access unlocked. Also use for adding a customer portal so subscribers can manage, upgrade, or cancel their plan after checkout. Covers Next.js fully; React without a server framework is partial. Skip for: embedding plan cards or billing dashboards, webhook processing, usage metering, Lovable or Vite+Supabase setups, or MCP tool paywalls.
tools
Load when someone is adding SolvaPay to a Lovable app or Vite+Supabase project — especially when they want to install @solvapay/react-supabase @preview packages, paste checkout code into Lovable chat, wire Supabase edge function secrets, or use api-dev.solvapay.com. Also triggers for: keeping SOLVAPAY_SECRET_KEY out of VITE_ env vars, setting up SolvaPayProvider, or getting a paywall running on Lovable fast. This skill handles the full setup: @preview package install, edge function templates, provider wiring, and sandbox testing. Skip for Next.js projects, production solvapay.com deployments, MCP server setup, or general "which SolvaPay product" questions.
tools
Use when the user is building a brand-new paid MCP server from zero — no existing server in play. The two entry points: (1) the user has an OpenAPI or Swagger spec they want converted into monetized MCP tools, or (2) they want to write the tools by hand on a fresh SolvaPay-wired scaffold. Also use for the `npm create solvapay` CLI command with `--type mcp`. This skill covers the full greenfield journey: spec parsing, tool authoring, Cloudflare Workers deployment, and SolvaPay paywall setup on a new codebase. Skip when the user already has a running MCP server and wants to add a paywall without rebuilding — use the existing-server skill. Skip for web checkout pages, Lovable flows, and SDK-only integrations.
tools
Use when work should span one or more detached tasks but still behave like one job with a single owner context. TaskFlow is the durable flow substrate under authoring layers like Lobster, ACPX, plugins, or plain code. Keep conditional logic in the caller; use TaskFlow for flow identity, child-task linkage, waiting state, revision-checked mutations, and user-facing emergence.