workos
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese<!-- refined:sha256:4bc2401b2288 -->
<!-- refined:sha256:4bc2401b2288 -->
WorkOS Skill Router
WorkOS 技能路由
How to Use
使用方法
When a user needs help with WorkOS, consult the tables below to route to the right skill.
当用户需要WorkOS相关帮助时,请参考下表路由到对应的技能。
Loading Skills
加载技能
AuthKit skills are registered plugins — load them directly via the Skill tool.
All other skills are bundled files. To load one, Read from this plugin directory and follow its instructions.
skills/workos/{name}.mdAuthKit技能是已注册的插件——可通过Skill工具直接加载。
所有其他技能均为捆绑文件。如需加载,请从插件目录中读取并按照其中的说明操作。
skills/workos/{name}.mdDisambiguation Rules
歧义消除规则
Feature Skill vs API Reference
功能技能与API参考文档
- User asks about implementation (how to set up, configure, integrate) → Load the feature skill
- User explicitly asks for "API reference", "endpoints", "request/response format", or "API docs" → Load the API reference skill
- User asks "how does X work" or "what does X do" → Load the feature skill (conceptual guide)
- 用户询问实现相关问题(如如何设置、配置、集成)→ 加载功能技能文档
- 用户明确询问「API参考文档」「端点」「请求/响应格式」或「API文档」 → 加载API参考技能文档
- 用户询问「X是如何工作的」或「X有什么作用」 → 加载功能技能文档(概念指南)
AuthKit vs Feature-Specific Skills
AuthKit与特定功能技能
- User mentions "login", "sign-up", "authentication", "sign-in", "session management" WITHOUT naming a specific feature → Route to AuthKit (detect framework below)
- User mentions "SSO", "SAML", "OAuth connection" explicitly → Load (not AuthKit)
workos-sso.md - User mentions "MFA", "multi-factor", "2FA", "TOTP" explicitly → Load
workos-mfa.md - User mentions "roles", "permissions", "RBAC" explicitly → Load
workos-rbac.md - User mentions "directory sync", "SCIM", "user provisioning" explicitly → Load
workos-directory-sync.md
Priority rule: If the user mentions BOTH AuthKit AND a feature (e.g., "set up AuthKit with SSO"), load AuthKit first. The AuthKit skill will reference SSO configuration as a next step.
- 用户提及「登录」「注册」「身份认证」「登入」「会话管理」但未指定具体功能 → 路由到AuthKit(如下检测框架)
- 用户明确提及「SSO」「SAML」「OAuth连接」 → 加载(而非AuthKit)
workos-sso.md - 用户明确提及「MFA」「多因素认证」「2FA」「TOTP」 → 加载
workos-mfa.md - 用户明确提及「角色」「权限」「RBAC」 → 加载
workos-rbac.md - 用户明确提及「目录同步」「SCIM」「用户配置」 → 加载
workos-directory-sync.md
优先级规则:如果用户同时提及AuthKit和某一功能(例如「设置AuthKit与SSO」),请先加载AuthKit。AuthKit技能会将SSO配置作为下一步操作进行说明。
Multiple Features Mentioned
提及多个功能
Route to the MOST SPECIFIC skill first. Examples:
- "SSO with MFA" → Load (SSO is the primary integration, MFA is a configuration option)
workos-sso.md - "Audit logs for admin portal" → Load (audit logs is the feature being configured)
workos-audit-logs.md - "Directory sync with RBAC" → Load (directory sync is the primary feature)
workos-directory-sync.md
The user can request additional skills after completing the first one.
优先路由到最具体的技能。示例:
- "SSO搭配MFA" → 加载(SSO是主要集成功能,MFA为配置选项)
workos-sso.md - "管理门户的审计日志" → 加载(审计日志是待配置的功能)
workos-audit-logs.md - "目录同步搭配RBAC" → 加载(目录同步是主要功能)
workos-directory-sync.md
用户可在完成第一个技能后请求其他技能。
Migration Context
迁移场景
- User says "migrate from [provider]" or "switch from [provider]" → Load the migration skill for that provider
- User asks "how to import users" or "bring existing users" WITHOUT naming a source → Load (generic migration guide)
workos-migrate-other-services.md - User mentions a provider not in the migration table → Load
workos-migrate-other-services.md
- 用户提及「从[服务商]迁移」或「从[服务商]切换」 → 加载对应服务商的迁移技能文档
- 用户询问「如何导入用户」或「迁移现有用户」但未指定来源 → 加载(通用迁移指南)
workos-migrate-other-services.md - 用户提及的服务商不在迁移表格中 → 加载
workos-migrate-other-services.md
Ambiguous Requests
模糊请求
- "How do I use WorkOS?" → Load for architectural overview, then detect framework if they want to proceed with installation
workos-authkit-base - "WorkOS setup" → Ask: "Are you setting up authentication (AuthKit), or a specific feature like SSO, MFA, or Directory Sync?"
- "WorkOS API" → Ask: "Which WorkOS feature are you working with?" Then route to the corresponding API reference
- "WorkOS integration" → Ask: "Are you integrating an identity provider (SSO/Directory Sync), or embedding WorkOS features in your app?"
- 「如何使用WorkOS?」 → 加载获取架构概述,若用户需要继续安装则检测其使用的框架
workos-authkit-base - 「WorkOS设置」 → 询问:「您是要设置身份认证(AuthKit),还是特定功能如SSO、MFA或目录同步?」
- 「WorkOS API」 → 询问:「您正在使用WorkOS的哪项功能?」然后路由到对应的API参考文档
- 「WorkOS集成」 → 询问:「您是要集成身份提供商(SSO/目录同步),还是要在应用中嵌入WorkOS功能?」
Topic → Skill Map
主题→技能映射
AuthKit (load via Skill tool)
AuthKit(通过Skill工具加载)
| User wants to... | Skill tool name |
|---|---|
| Install AuthKit in Next.js | workos-authkit-nextjs |
| Install AuthKit in React SPA | workos-authkit-react |
| Install AuthKit with React Router | workos-authkit-react-router |
| Install AuthKit with TanStack Start | workos-authkit-tanstack-start |
| Install AuthKit in vanilla JS | workos-authkit-vanilla-js |
| AuthKit architecture reference | workos-authkit-base |
| 用户需求... | Skill工具名称 |
|---|---|
| 在Next.js中安装AuthKit | workos-authkit-nextjs |
| 在React单页应用中安装AuthKit | workos-authkit-react |
| 搭配React Router安装AuthKit | workos-authkit-react-router |
| 搭配TanStack Start安装AuthKit | workos-authkit-tanstack-start |
| 在原生JS中安装AuthKit | workos-authkit-vanilla-js |
| AuthKit架构参考文档 | workos-authkit-base |
Features (Read skills/workos/{name}.md
)
skills/workos/{name}.md功能技能(读取skills/workos/{name}.md
)
skills/workos/{name}.md| User wants to... | Read file |
|---|---|
| Configure email delivery | |
| Add WorkOS Widgets | |
| Encrypt data with Vault | |
| Configure Single Sign-On | |
| Implement RBAC / roles | |
| Add Multi-Factor Auth | |
| Set up IdP integration | |
| Handle WorkOS Events / webhooks | |
| Set up Directory Sync | |
| Set up Custom Domains | |
| Set up Audit Logs | |
| Enable Admin Portal | |
| 用户需求... | 读取文件 |
|---|---|
| 配置邮件发送 | |
| 添加WorkOS组件 | |
| 使用Vault加密数据 | |
| 配置单点登录 | |
| 实现RBAC/角色管理 | |
| 添加多因素认证 | |
| 设置身份提供商集成 | |
| 处理WorkOS事件/ Webhooks | |
| 设置目录同步 | |
| 设置自定义域名 | |
| 设置审计日志 | |
| 启用管理门户 | |
API References (Read skills/workos/{name}.md
)
skills/workos/{name}.mdAPI参考文档(读取skills/workos/{name}.md
)
skills/workos/{name}.md| User wants to... | Read file |
|---|---|
| Admin portal API Reference | |
| Audit logs API Reference | |
| Authkit API Reference | |
| Directory sync API Reference | |
| Events API Reference | |
| Organization API Reference | |
| Roles API Reference | |
| Sso API Reference | |
| Vault API Reference | |
| Widgets API Reference | |
| 用户需求... | 读取文件 |
|---|---|
| 管理门户API参考文档 | |
| 审计日志API参考文档 | |
| AuthKit API参考文档 | |
| 目录同步API参考文档 | |
| 事件API参考文档 | |
| 组织API参考文档 | |
| 角色API参考文档 | |
| SSO API参考文档 | |
| Vault API参考文档 | |
| Widgets API参考文档 | |
Migrations (Read skills/workos/{name}.md
)
skills/workos/{name}.md迁移(读取skills/workos/{name}.md
)
skills/workos/{name}.md| User wants to... | Read file |
|---|---|
| Migrate from Supabase Auth | |
| Migrate from Stytch | |
| Migrate from the standalone SSO API | |
| Migrate from other services | |
| Migrate from Firebase | |
| Migrate from Descope | |
| Migrate from Clerk | |
| Migrate from Better Auth | |
| Migrate from AWS Cognito | |
| Migrate from Auth0 | |
| 用户需求... | 读取文件 |
|---|---|
| 从Supabase Auth迁移 | |
| 从Stytch迁移 | |
| 从独立SSO API迁移 | |
| 从其他服务商迁移 | |
| 从Firebase迁移 | |
| 从Descope迁移 | |
| 从Clerk迁移 | |
| 从Better Auth迁移 | |
| 从AWS Cognito迁移 | |
| 从Auth0迁移 | |
AuthKit Installation Detection
AuthKit安装框架检测
If the user wants to install AuthKit, detect their framework by checking their project in this exact priority order (first match wins):
1. package.json contains "@tanstack/start" → Skill tool: workos-authkit-tanstack-start
2. package.json contains "react-router" → Skill tool: workos-authkit-react-router
3. next.config.js OR next.config.mjs exists → Skill tool: workos-authkit-nextjs
4. vite.config.* exists AND package.json has "react" → Skill tool: workos-authkit-react
5. None of the above detected → Skill tool: workos-authkit-vanilla-jsWhy this order?
- TanStack Start and React Router are checked FIRST because they can coexist with Vite+React, and we need the most specific match.
- Next.js is checked BEFORE generic Vite+React because Next.js projects may also have React in deps.
- Vanilla JS is the fallback for projects with no detectable framework (plain HTML/JS, non-React SPAs, or server-rendered apps without a supported framework).
Edge cases:
- Multiple frameworks detected (e.g., Next.js config + TanStack Start dep): Follow the priority order — TanStack Start wins.
- Monorepo with multiple frameworks: Ask the user which app/package they want to add AuthKit to, then detect framework in that specific directory.
- Framework not listed (e.g., SvelteKit, Remix, Angular): Load for architectural guidance, then direct the user to https://workos.com/docs/llms.txt to check if their framework is supported.
workos-authkit-base
如果用户想要安装AuthKit,请按照以下精确优先级顺序检测其项目框架(匹配到第一个即停止):
1. package.json包含"@tanstack/start" → Skill工具:workos-authkit-tanstack-start
2. package.json包含"react-router" → Skill工具:workos-authkit-react-router
3. 存在next.config.js或next.config.mjs → Skill工具:workos-authkit-nextjs
4. 存在vite.config.*且package.json包含"react" → Skill工具:workos-authkit-react
5. 未检测到上述任何框架 → Skill工具:workos-authkit-vanilla-js为何采用此顺序?
- 优先检测TanStack Start和React Router,因为它们可与Vite+React共存,我们需要最具体的匹配结果。
- 先检测Next.js再检测通用Vite+React,因为Next.js项目的依赖中也可能包含React。
- 原生JS是未检测到框架的项目的 fallback 选项(纯HTML/JS、非React单页应用或不支持的服务端渲染应用)。
边缘情况:
- 检测到多个框架(例如同时存在Next.js配置文件和TanStack Start依赖):遵循优先级顺序——TanStack Start优先。
- 包含多个框架的单体仓库:询问用户要为哪个应用/包添加AuthKit,然后在对应目录中检测框架。
- 未列出的框架(例如SvelteKit、Remix、Angular):加载获取架构指导,然后引导用户访问https://workos.com/docs/llms.txt 查看其框架是否受支持。
workos-authkit-base
General Decision Flow
通用决策流程
User request about WorkOS?
|
+-- Mentions "migrate", "switch from", or "import from [provider]"?
| → Read skills/workos/workos-migrate-[provider].md
| → If provider not in table → Read skills/workos/workos-migrate-other-services.md
|
+-- Mentions SPECIFIC feature by name (SSO, MFA, RBAC, Directory Sync, Audit Logs, Vault, etc.)?
| → Read skills/workos/workos-[feature].md
| → Exception: If also mentions "API reference" → Read skills/workos/workos-api-[feature].md
|
+-- Explicitly asks for "API reference", "endpoints", or "request/response format"?
| → Read skills/workos/workos-api-[feature].md
| → If feature unclear → Ask which feature's API they need
|
+-- Mentions "login", "sign-up", "authentication", "sign-in", or "session" WITHOUT naming a feature?
| → Detect framework using AuthKit Installation Detection rules above
| → Skill tool: workos-authkit-[framework]
|
+-- Mentions "IdP", "identity provider", "SAML setup", or "OAuth provider setup"?
| → Read skills/workos/workos-integrations.md
|
+-- Mentions "webhooks" or "events"?
| → Read skills/workos/workos-events.md
|
+-- Request is vague ("How do I use WorkOS?", "WorkOS setup", "WorkOS integration")?
| → Ask clarifying question (see "Ambiguous Requests" above)
|
+-- No clear match?
| → WebFetch https://workos.com/docs/llms.txt
| → Find the relevant section URL
| → WebFetch that section
| → Synthesize an answer OR route to the closest skill if one exists用户请求关于WorkOS?
|
+-- 提及「迁移」「从...切换」或「从[服务商]导入」?
| → 读取skills/workos/workos-migrate-[provider].md
| → 若服务商不在表格中 → 读取skills/workos/workos-migrate-other-services.md
|
+-- 明确提及特定功能名称(SSO、MFA、RBAC、目录同步、审计日志、Vault等)?
| → 读取skills/workos/workos-[feature].md
| → 例外:若同时提及「API参考文档」→ 读取skills/workos/workos-api-[feature].md
|
+-- 明确询问「API参考文档」「端点」或「请求/响应格式」?
| → 读取skills/workos/workos-api-[feature].md
| → 若功能不明确 → 询问用户需要哪项功能的API文档
|
+-- 提及「登录」「注册」「身份认证」「登入」或「会话」但未指定功能?
| → 根据上述AuthKit安装框架检测规则检测框架
| → Skill工具:workos-authkit-[framework]
|
+-- 提及「IdP」「身份提供商」「SAML设置」或「OAuth提供商设置」?
| → 读取skills/workos/workos-integrations.md
|
+-- 请求模糊(「如何使用WorkOS?」「WorkOS设置」「WorkOS集成」)?
| → 询问澄清问题(见上方「模糊请求」部分)
|
+-- 无明确匹配?
| → WebFetch https://workos.com/docs/llms.txt
| → 找到相关章节的URL
| → WebFetch该章节内容
| → 合成答案或路由到最接近的技能文档(如果存在)Edge Cases
边缘情况
Multiple Features in One Request
单个请求包含多个功能
Examples:
- "Set up SSO with MFA" → Load first (SSO is the primary integration). The skill will reference MFA configuration.
workos-sso.md - "AuthKit with custom domains" → Load the AuthKit skill for their framework first. After installation, load .
workos-custom-domains.md - "Directory Sync with RBAC" → Load first (directory sync is the source of user data). RBAC is configured after users are synced.
workos-directory-sync.md
General rule: Route to the skill that represents the PRIMARY integration or feature being configured. Dependent features can be loaded as follow-up steps.
示例:
- 「设置SSO搭配MFA」 → 先加载(SSO是主要集成功能),该技能文档会提及MFA配置。
workos-sso.md - 「AuthKit搭配自定义域名」 → 先加载对应框架的AuthKit技能文档,安装完成后再加载。
workos-custom-domains.md - 「目录同步搭配RBAC」 → 先加载(目录同步是用户数据的来源),用户同步完成后再配置RBAC。
workos-directory-sync.md
通用规则:路由到代表主要集成或待配置功能的技能文档。附属功能可作为后续步骤加载。
Framework Detection Failures
框架检测失败
- No framework detected → Load (covers plain HTML/JS and server-rendered apps)
workos-authkit-vanilla-js - Unsupported framework (e.g., Laravel, Django, Ruby on Rails) → Load for architecture overview, then WebFetch https://workos.com/docs/llms.txt to check for backend SDK docs
workos-authkit-base
- 未检测到框架 → 加载(涵盖纯HTML/JS和服务端渲染应用)
workos-authkit-vanilla-js - 不支持的框架(例如Laravel、Django、Ruby on Rails)→ 加载获取架构概述,然后WebFetch https://workos.com/docs/llms.txt 查看后端SDK文档
workos-authkit-base
User Asks About Multiple Topics
用户询问多个主题
Examples:
- "How do SSO and Directory Sync work together?" → Load first (explains SSO connections), then load
workos-sso.md(explains user provisioning from IdP)workos-directory-sync.md - "What's the difference between SSO and AuthKit?" → Load (explains AuthKit's role), then explain that SSO is a CONNECTION TYPE that AuthKit can use
workos-authkit-base
示例:
- 「SSO和目录同步如何配合工作?」 → 先加载(解释SSO连接),再加载
workos-sso.md(解释从身份提供商同步用户)workos-directory-sync.md - 「SSO和AuthKit有什么区别?」 → 加载(解释AuthKit的作用),然后说明SSO是AuthKit可使用的一种连接类型
workos-authkit-base
No Skill Matches
无匹配技能
If the user's request does not match ANY skill in the tables above:
- WebFetch https://workos.com/docs/llms.txt to get the full documentation index
- Identify the relevant section URL from the index
- WebFetch that section URL
- If the fetched content suggests a skill exists but wasn't matched, re-evaluate routing rules
- Otherwise, synthesize an answer from the fetched documentation
如果用户的请求与上述表格中的任何技能都不匹配:
- WebFetch https://workos.com/docs/llms.txt 获取完整文档索引
- 从索引中找到相关章节的URL
- WebFetch该章节内容
- 如果获取的内容表明存在匹配的技能但未被匹配,则重新评估路由规则
- 否则,根据获取的文档内容合成答案
If No Skill Matches
无匹配技能时的处理
WebFetch the full docs index: https://workos.com/docs/llms.txt
Then WebFetch the specific section URL for the user's topic.
WebFetch完整文档索引:https://workos.com/docs/llms.txt
然后WebFetch用户主题对应的具体章节URL。