/saaskit:migrate-to-saaskitfrom saaskit
Migrates existing auth to SaaSKit so an agent can audit and import it. Use when the user wants to migrate to SaaSKit or replace Auth0 or Clerk. It does not write a first-time login (that's `implement-saaskit`).
Ships in saaskit. 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.
Read when SKILL.md points to them.
Audit existing auth and import it to SaaSKit. Then stop.
external_id.sendInvitationEmail: false on every imported user.implement-saaskit instead.implement-saaskit.SCALEKIT_ENVIRONMENT_URL, SCALEKIT_CLIENT_ID, and SCALEKIT_CLIENT_SECRET. Never SCALEKIT_ENV_URL. Do not prepend https://.implement-sso. IdP secrets are not exportable.If the app has no existing auth, name implement-saaskit and stop.
Collect the three env names from app.scalekit.com → Developers → Settings → API Credentials. Do not invent values.
Done when: this skill is the right path, and the three env names exist.
Open references/AUDIT-CHECKLIST.md. Complete that checklist. Then stop reading it.
Export users, organizations, roles, and SSO/IdP configs. Keep original primary keys.
Before import:
Minimum user fields: email (required), first_name, last_name, email_verified (defaults false).
Done when: the export exists, the flag can roll back, and the audit file is checked off.
Install @scalekit-sdk/node only when the repo has no Scalekit SDK yet. Open references/IMPORT-SAMPLES.md for Python, Go, Java, or cURL.
import { ScalekitClient } from '@scalekit-sdk/node';
const scalekit = new ScalekitClient(
process.env.SCALEKIT_ENVIRONMENT_URL,
process.env.SCALEKIT_CLIENT_ID,
process.env.SCALEKIT_CLIENT_SECRET
);
const { organization } = await scalekit.organization.createOrganization(
org.display_name,
{ externalId: org.external_id }
);
externalId is the source org primary key. Live Node options are externalId, logoUrl, and slug only.
Done when: each source org exists in Scalekit and organization.externalId matches the export.
Create users after their org exists. Use the Scalekit org id from Step 3.
const { user } = await scalekit.user.createUserAndMembership(organization.id, {
email: source.email,
externalId: source.external_id,
sendInvitationEmail: false,
userProfile: { firstName: source.first_name, lastName: source.last_name },
});
Batch in parallel. Respect rate limits. Do not send invite email.
Done when: each source user has a membership, sendInvitationEmail was false, and user.externalId matches the export.
Print this checklist. Wait for the user.
Name implement-sso to rebuild each IdP connection. Do not copy IdP secrets from Auth0 or Clerk.
Done when: both redirect URLs are registered, roles exist, and implement-sso is named or SSO is waived.
Name implement-saaskit for login, callback, cookies, and logout.
Name manage-saaskit-sessions for validate, refresh, and revoke.
Do not write those routes here.
Done when: those skills are named, and this skill has not written login.
Done when: a subset of users signs in through SaaSKit, and the flag still rolls back.
Name run-dryrun to test the env. Name check-saaskit-prod before go-live.
Done when: orgs and users are imported with external_id, the flag is in place, and this skill has stopped.
implement-saaskit for login, callback, cookies, and logoutimplement-sso to rebuild SSOrun-dryrun to test the envcheck-saaskit-prod for the go-live recordWhat SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
15 skills in this plugin
/add-api-authAdds API key or client-credentials auth so an agent can protect an API. Use when the user wants an API key or client credentials. It does not put OAuth 2.1 on an MCP server (that's `add-mcp-oauth`) or write SaaSKit login (that's `implement-saaskit`).
/add-mcp-oauthAdds MCP OAuth so an agent can protect the user's MCP server. Use when the user wants MCP OAuth or to protect their MCP server. It does not add API keys or client credentials (that's `add-api-auth`) or expose AgentKit tools over MCP (that's `expose-agentkit-mcp`).
/check-saaskit-prodChecks SaaSKit production so an agent can finish a go-live checklist. Use when the user wants SaaSKit production or to go live SaaSKit. It does not write login (that's `implement-saaskit`) or run dryrun (that's `run-dryrun`).
/deploy-self-hostedDeploys self-hosted Scalekit so an agent can install Helm or on-prem. Use when the user wants self-hosted Scalekit or Helm. It does not write SaaSKit login (that's `implement-saaskit`).
/implement-access-controlImplements roles and permissions at a route so an agent can protect an endpoint. Use when the user wants roles, permissions, or RBAC. It does not write SaaSKit login (that's `implement-saaskit`).
/implement-saaskitImplements SaaSKit login so an agent can add a login route, a callback, session cookies, and logout. Use when the user wants to add SaaSKit login, a callback, or logout. It does not store, validate, refresh, or revoke a session after login (that's `manage-saaskit-sessions`) or write Next.js App Router auth (that's `implement-saaskit-nextjs`) or write Django, FastAPI, or Flask auth (that's `implement-saaskit-python`).
npx claudepluginhub scalekit-inc/authstack --plugin saaskit