/descope-skills:descope-flowsfrom descope-skills
Builds new Descope authentication flows (sign-up, sign-in, MFA, SSO, OTP, passkey, etc.) from templates using the Descope MCP. Guides dry-run validation and user-confirmed import. Does not edit existing flows.
Ships in descope-skills. 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.
Build a new Descope flow with the Descope MCP: start from a template, change only what the user asked for, check it
with the server, show what changed, and import only after the user says yes. New flows only. Every fact about actions,
conditions, context keys, screens and connectors comes from the MCP; where it and this skill disagree, the MCP wins.
"flows_read with operation X" means calling the tool with {projectId, operation: "X", args: {...}}. Every call
names the app's project: projectId on flows_read / flows_write, args.projectId on session actions. Use the
Project ID the app is configured with, or ask the user; if the session tool lists a selectProject action, select
the project with it first. If the Descope MCP isn't connected, say so and stop. Built, Changed from the template, Checked, Assumptions and For review are the
sections of the final report (see Report).
Ask in one short message, only what the request leaves open, and wait for the answers. Business facts only the user knows (names of lists or attributes, API contracts, normalization rules) are questions, never assumptions; only technical choices may be assumed. Never decide sign-up or failure behavior yourself.
REPLACE_WITH_... placeholder and list it in the report.A default you offer must come from a template or an MCP result; otherwise say it is unverified. Never default to skipping a security check.
flows_read with operation searchFlowTemplates (the user's request as the query), then
getFlowTemplate (templateId) for the best match; its flow is in the shape ImportFlow takes. Never write a
flow from scratch: copy that flow and edit the copy. No close template? Take the nearest one
and tell the user which parts are new. Template keywords are incomplete: when results are match: any or miss
the request, search again with fewer or other words (a method, a template name) before listing all templates.
N/N.end pairs as M/M.end), and their routes point at the
new ids.flows_read with operation GetActionCatalog (query to find them, then query with full: true
for the inputs and errors of the ones you use; check total and narrow the query when it is cut off). Use input
names exactly; route only the error ids the action lists. An action with non-empty members is never a task's
action: write its members as tasks N and N.end.flows_read GetConditionOperators. Context keys: flows_read GetContextKeys
(prefix or query) for every key you add or change (one call per prefix is enough); the keys an action writes
are its outputs in the full catalog entry. A key with <name> is a pattern: put in a real name from the source
its description gives (custom attribute names: users_read with operation UserCustomAttributes). Never guess
one: a misspelled key resolves empty.connect_read with operation GetConnectorTemplate ({id: "<templateId>"}) for a named vendor's
commands and arguments (LoadAllConnectorTemplates first only when the vendor is unknown); LoadAllConnectors
for the connector ids the project already has. Use a vendor's connector template when one exists; Generic HTTP
is for APIs with none. A connector the request names but LoadAllConnectors doesn't list: ask before
building, never put in a silent placeholder.flow.flowId (the user's, or one you propose) and metadata.name, then
change contents.tasks and screens, and check the copy against Security defaults. Read
Flow JSON reference before writing error routes, row inputs, conditions, connector tasks
or screens.
N.end for the second half of a two-step action), the
action's display name, and no view (the import places new tasks); keep the template's view values.REPLACE_WITH_TERMS_URL / REPLACE_WITH_PRIVACY_URL. Never drop a
requested step for an unknown value: ask, or for a technical choice pick one and list it under Assumptions.
Secrets belong in the connector, never in flow JSON.flows_write with operation ImportFlow and {flow, flowId, traceId, mode: "CREATE", dryRun: true} (traceId: any stable id); it runs the ValidateFlow checks too. Fix every error; for each warning, fix it
or say under For review why it doesn't apply. Repeat until no errors remain. A clean result means the flow
imports, not that it does what was asked. CREATE on a flow id that exists fails ("already exists"): pick another
id, or, only if the user names that flow to replace, use UPSERT in both the dry run and the import. Any later
change needs a new dry run.flows_read with operation DiffFlows, before the template's flow from step 1
unchanged, after your final flow. It takes only full flows; there is no id form.projectId; ask if you can't tell) and the flow id, and wait for an explicit yes.flows_write with operation ImportFlow and {draftToken, mode} from the dry run of the flow the
user approved. If the call says the session must be elevated, get the user's yes, then make the elevate call it
names. A draftToken lasts 30 minutes; after that, dry-run again. Then have the user run it once (console
Run, or the hosted page with ?flow=<flowId>).Apply these unless the user explicitly chooses otherwise, and name every exception in the report. A template is a starting point, not a vetted default: check your copy against every rule below, fix what it breaks (an unknown-account error left on automatic handling, SSO without email binding), and list each fix under Changed from the template.
errorMessage alone still sends that
text to the client. Social, passkey and SSO sign-in give a known account a session with no screen: route their
unknown-account error to a screen with the neutral message and a retry. A screen both reach shows at most the masked
value the user typed, never a different channel (a phone for an email login); elsewhere show the masked value, never
the full email or phone. An explicit "no account" message only on request, with the trade-off stated. On sign-up, keep
the template's "already registered" behavior and list the enumeration trade-off under For review.equal, in, is-true, greater-than) and let ELSE, which catches
missing values, deny; negated operators (not-equal, not-in) hold on a missing value. Risk and fraud checks can
fail open on their own (a failed risk lookup sets riskScore 0.2 and every flag false): name that under For review;
don't move the user's thresholds. A fail-open the user picks: say what it skips.contents.deferUserCreation: true, so an
abandoned verification leaves no unverified user holding a password.verifyInitiatedEmail: true on saml-start, so the
IdP's email must match; list it under For review (it blocks IdP emails that differ from the typed one). Button-only
SSO has no email to match: leave it off.device.webAuthnSupport for devices without passkeys, or a question to the user.{{...}} inside quotes so values are
escaped; unquoted, a value can add fields to the request.Five sections, headed Built, Changed from the template, Checked, Assumptions and For review, and no others, except one status line above them (flow id, imported or draft) when the user asks for it and a short How to test when you couldn't import or run the flow. A user's own format wins; keep the For review items and the security fixes from Changed from the template in it.
DiffFlows result, removals first. After each removal
say why: the user asked, or agreed when you asked. A removal with neither goes back into the flow. Name behavior the
template brings that the user didn't ask for (an existing session skipping verification, an optional field).State a number, default, platform behavior or limit ("can't be done") as fact only when an MCP result or your own check says it; otherwise say you have no source, and ask or try it.
Shapes the MCP catalogs don't spell out. Action ids, inputs, error ids and context keys still come from the MCP; screen components and props come from the template's screens.
A task routes its action's errors in errorHandlingV2, keyed by error id (the action's errors[].type, or for a
connector the command's error ids). A next rule whose interactionId is the error id is followed either way; with no
entry and no such rule, handling is automatic: the user is sent back to the last screen with the error; with no screen
before the task, the flow ends with the error.
"errorHandlingV2": {"UserDoesNotExists": {"errorHandlingType": "custom"}},
"next": {"rules": [{"interactionId": "success", "taskId": "3"},
{"interactionId": "UserDoesNotExists", "taskId": "7"}]}
custom: go to the task named by the next rule whose interactionId is the error id.customWithError: the same, and a screen reached next still shows the error.ignore: continue as on success.abort: end the flow with the error.errorMessage replaces the text the user sees with automatic, abort and customWithError (next task a single
screen); {{key}} is filled from context. custom clears the error, so put the message on the target screen. The
original text still reaches the client: an unknown-account error still needs custom routing (see Security
defaults).After an error, lastError.Type holds its id for a later condition, until a clear-last-error task.
OTP (including embedded OTP), enchanted-link and email-verification sign-in (and push and NOTP) and password reset fail
for an unknown login id with the action's own error id (for example OTPSignUpOrInEmailFailed,
OTPSignInEmbeddedFailed, EmailVerificationSignInFailed, PasswordSendResetFailed), whose automatic message says the
user does not exist. Route that id with custom to the same neutral screen a known account reaches. Password sign-in
already masks it ("Wrong password or unknown user"). UserDoesNotExists (magic link, social, passkey, wallet) and
UserExists say it by name. On sign-up, UserExists may keep the template's "already registered" message; state the
trade-off.
Every task argument is {type, value}, type "inline" for a literal: "command": {"type": "inline", "value": "get"}. A list of rows goes in the same wrapper: "args": {"type": "inline", "value": [rows]}.
An input the catalog shows as visible with type object takes a list of {key, type, value} rows (args,
customClaims, userPropertiesDefinitions and the like); familyPropertiesDefinitions and
dependentPropertiesDefinitions also take rows. Other object inputs are not rows; set one only when the request needs
it. With type "context", value is a context key (with or without {{ }}). With any other type, value is used
as is, and {{key}} inside a string is still filled from context. A value that is itself a list of rows becomes an
object.
[{"key": "email", "type": "context", "value": "form.email"},
{"key": "plan", "type": "string", "value": "pro"},
{"key": "address", "type": "object", "value": [{"key": "city", "type": "context", "value": "form.city"}]}]
A Generic HTTP step is the exception: its payload row is "type": "string" with the JSON body as one string, the
way the Console writes it. Rows there run, but the Console's flow editor can't open the step.
{"key": "payload", "type": "string", "value": "{\"email\": \"{{form.email}}\", \"plan\": \"pro\"}"}
Conditions are tried in order; the first that holds takes the rule with its interactionId. ELSE always holds,
so it goes last. Every condition but ELSE needs atomicConditions, which must all hold unless the condition sets
logicalOr: true: target is the context key, predicate the value compared, operator an id from
GetConditionOperators. The allow case is the tested one; ELSE denies.
{"id": "7", "type": "condition", "name": "Is risk low?",
"conditions": [
{"name": "Low risk", "interactionId": "low", "atomicConditions": [{"operator": "less-than",
"target": {"type": "context", "value": "riskInfo.riskScore"}, "predicate": {"type": "inline", "value": "0.5"}}]},
{"name": "Otherwise", "interactionId": "ELSE"}],
"next": {"rules": [{"interactionId": "low", "taskId": "5"}, {"interactionId": "ELSE", "taskId": "8"}]}}
A vendor integration (reCAPTCHA, Twilio, a CRM) is the connector action with that vendor's templateId, not an
action of its own. Commands, their parameters and error ids come from GetConnectorTemplate with
{id: "<templateId>"}. Each parameter not marked hidden is one args row whose key is the parameter's name;
hidden ones are filled from context and replace any row of that name.
defaultValue is the row's value when it is a real value; when it is an example (a commented sample
query, a placeholder), write the value the request needs.{{form...}}, {{user...}}) into a SQL string; an example default may do it. Ask the user
how the query gets its values.defaultAsync: true gets "async": true. An async task returns no response and its command's
failures are only logged (setup failures, such as a missing or disabled connector, still raise ConnectorFailed):
leave out resultPath and error routing, and never gate access on it.{"id": "4", "type": "automated", "action": "connector", "name": "Check bot",
"arguments": {"connectorId": {"type": "inline", "value": "<connector id>"},
"templateId": {"type": "inline", "value": "http"}, "command": {"type": "inline", "value": "get"},
"resultPath": {"type": "inline", "value": "botCheck"},
"args": {"type": "inline", "value": [{"key": "endpoint", "type": "string", "value": "/v1/checkbot"}]}},
"next": {"rules": [{"interactionId": "success", "taskId": "5"}]}}
connectors.<resultPath> (the template doesn't list its fields).ConnectorFailed. Generic HTTP fails with
request_error on a non-2xx response (connectors.<resultPath>.statusCode and .errorText); an error matching a
retry rule is request_error_rule_<rule id>, handled as request_error (a timeout or network error: as
ConnectorFailed) when the task has no entry for it.with-email (email), with-phone
(phone), with-user-id (userId), with-external-id (externalId), with-external-ids (externalIds),
with-user-agent (userAgent, userIpAddress), with-callback-url (callbackUrl), with-webhook (pendingRef,
webhookUrl), with-analytics-client-id (clientId, unless set). risk adds the risk token and writes
riskInfo.exchangeStepId: for a with-callback-url command, the id of the task the user comes back to; the callback URL
resumes the flow there. Leave it out otherwise.interactions and needs a next rule on the screen task;
without one, the flow fails when the user triggers it.email, phone, name fields) keeps it and is read as form.<name>. A custom
input is named form.<key> and read as form.<key>; a bare custom name reads empty.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
descope, authentication-flows, ciam, mcp-integration, flow-builder
14 skills in this plugin
/auth0-to-descopeUse this skill whenever anyone asks about migrating from Auth0 to Descope — whether they're a developer doing it themselves or a technical lead evaluating the move. Triggers on: "how do I migrate from Auth0", "replace Auth0 with Descope", "we're moving off Auth0", "Auth0 to Descope", "switch from Auth0", "our app uses express-openid-connect / nextjs-auth0 / auth0-fastapi / other Auth0 SDK and we want to use Descope instead", or any question about Auth0 features (Actions, FGA, Organizations, Token Vault, CIBA) in the context of Descope. Works for any language or framework with a Descope SDK. Always use this skill before producing migration guidance — do not rely on memory alone.
/auth-reviewStatic security review for authentication and authorization vulnerabilities. Use when the user invokes /auth-review, asks to audit auth, find identity breaches, review access control, hunt for IDOR/BOLA, or check authorization. Framework- and vendor-agnostic. Enumerates every route/endpoint, builds an authorization matrix, applies a vulnerability catalog, and writes a triage report ready to turn into issues or PRs./azure-ad-b2c-to-descopeUse this skill whenever anyone asks about migrating from Azure AD B2C (Azure Active Directory B2C) to Descope — whether they're a developer doing it themselves or a technical lead evaluating the move. Triggers on: "migrate from Azure AD B2C", "replace Azure B2C with Descope", "we're moving off B2C", "B2C end of sale", "Azure AD B2C to Descope", "our app uses @azure/msal-browser / @azure/msal-react / @azure/msal-angular / @azure/msal-node / Microsoft.Identity.Web / passport-azure-ad with b2clogin.com and we want to use Descope instead", or any question about B2C features (user flows, custom policies / Identity Experience Framework, API connectors, b2c-extensions-app custom attributes, identity providers, ROPC, embedded sign-in, scp claim) in the context of Descope. Works for any language or framework with a Descope SDK. Always use this skill before producing migration guidance — do not rely on memory alone.
npx claudepluginhub descope/skills --plugin descope-skillsOther plugins' skills for the same job