npx skills add https://github.com/workos/skills --skill workos当用户需要 WorkOS 相关帮助时,请查阅以下表格以路由到正确的参考文档。
所有参考文档 都是 references/ 目录下的主题文件。请阅读文件并遵循其指示(先获取文档,然后使用注意事项来避免常见陷阱)。
例外情况:Widget 请求通过 Skill 工具使用 workos-widgets skill —— 它有自己的多框架编排逻辑。
references/{name}.md)| 用户想要... | 阅读文件 |
|---|---|
| 在 Next.js 中安装 AuthKit | references/workos-authkit-nextjs.md |
| 在 React SPA 中安装 AuthKit | references/workos-authkit-react.md |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| 使用 React Router 安装 AuthKit | references/workos-authkit-react-router.md |
| 使用 TanStack Start 安装 AuthKit | references/workos-authkit-tanstack-start.md |
| 使用 SvelteKit 安装 AuthKit | references/workos-authkit-sveltekit.md |
| 在原生 JS 中安装 AuthKit | references/workos-authkit-vanilla-js.md |
| AuthKit 架构参考 | references/workos-authkit-base.md |
| 添加 WorkOS Widgets | 通过 Skill 工具加载 workos-widgets skill |
references/{name}.md)| 用户想要... | 阅读文件 |
|---|---|
| 在 Node.js 后端安装 AuthKit | references/workos-node.md |
| 在 Python 中安装 AuthKit | references/workos-python.md |
| 在 .NET 中安装 AuthKit | references/workos-dotnet.md |
| 在 Go 中安装 AuthKit | references/workos-go.md |
| 在 Ruby 中安装 AuthKit | references/workos-ruby.md |
| 在 PHP 中安装 AuthKit | references/workos-php.md |
| 在 PHP Laravel 中安装 AuthKit | references/workos-php-laravel.md |
| 在 Kotlin 中安装 AuthKit | references/workos-kotlin.md |
| 在 Elixir 中安装 AuthKit | references/workos-elixir.md |
references/{name}.md)| 用户想要... | 阅读文件 |
|---|---|
| 配置单点登录 | references/workos-sso.md |
| 设置目录同步 | references/workos-directory-sync.md |
| 实现 RBAC / 角色 | references/workos-rbac.md |
| 使用 Vault 加密数据 | references/workos-vault.md |
| 处理 WorkOS 事件 / webhooks | references/workos-events.md |
| 设置审计日志 | references/workos-audit-logs.md |
| 启用管理门户 | references/workos-admin-portal.md |
| 启用多因素认证 | references/workos-mfa.md |
| 配置邮件发送 | references/workos-email.md |
| 设置自定义域名 | references/workos-custom-domains.md |
| 设置身份提供商集成 | references/workos-integrations.md |
references/{name}.md)上述功能主题文件包含了各自 API 的端点表格。当没有对应的功能主题文件时,请使用这些纯 API 参考文档:
| 用户想要... | 阅读文件 |
|---|---|
| AuthKit API 参考 | references/workos-api-authkit.md |
| 组织 API 参考 | references/workos-api-organization.md |
references/{name}.md)| 用户想要... | 阅读文件 |
|---|---|
| 从 Auth0 迁移 | references/workos-migrate-auth0.md |
| 从 AWS Cognito 迁移 | references/workos-migrate-aws-cognito.md |
| 从 Better Auth 迁移 | references/workos-migrate-better-auth.md |
| 从 Clerk 迁移 | references/workos-migrate-clerk.md |
| 从 Descope 迁移 | references/workos-migrate-descope.md |
| 从 Firebase 迁移 | references/workos-migrate-firebase.md |
| 从 Stytch 迁移 | references/workos-migrate-stytch.md |
| 从 Supabase Auth 迁移 | references/workos-migrate-supabase-auth.md |
| 从独立的 SSO API 迁移 | references/workos-migrate-the-standalone-sso-api.md |
| 从其他服务迁移 | references/workos-migrate-other-services.md |
references/{name}.md)| 用户想要... | 阅读文件 |
|---|---|
| 通过 CLI 命令管理 WorkOS 资源 | references/workos-management.md |
按顺序应用以下规则。首次匹配即生效。
触发条件:用户提到从其他提供商迁移(Auth0、Clerk、Cognito、Firebase、Supabase、Stytch、Descope、Better Auth、独立的 SSO API)。
操作:阅读 references/workos-migrate-[provider].md,其中 [provider] 匹配源系统。如果提供商不在表格中,则阅读 references/workos-migrate-other-services.md。
为何优先:迁移场景优先于特定功能路由,因为用户需要提供商特定的数据导出和转换步骤。
触发条件:用户明确询问“API 端点”、“请求格式”、“响应模式”、“API 参考”,或提到检查 HTTP 详细信息。
操作:对于有主题文件的功能(SSO、目录同步、RBAC、Vault、事件、审计日志、管理门户),请阅读功能主题文件——它包含端点表格。对于 AuthKit 或组织 API,请阅读 references/workos-api-[domain].md。
为何优先:API 参考是低层级的;功能主题是高层级的,但包含用于快速参考的端点表格。
触发条件:用户按名称提到特定的 WorkOS 功能(SSO、MFA、目录同步、审计日志、Vault、RBAC、管理门户、自定义域名、事件、集成、邮件)。
操作:阅读 references/workos-[feature].md,其中 [feature] 是小写的短横线分隔名称(sso、mfa、directory-sync、audit-logs、vault、rbac、admin-portal、custom-domains、events、integrations、email)。
例外情况:Widget 请求通过 Skill 工具加载 workos-widgets skill —— 它有自己的编排逻辑。
歧义消除:如果用户同时提到一个功能和“API”,则路由到功能主题文件(它包含端点)。如果用户提到多个功能,则首先路由到最具体的那个(例如,“带 MFA 的 SSO” → 路由到 SSO;用户可以单独请求 MFA)。
触发条件:用户提到认证设置、登录流程、注册、会话管理,或明确说“AuthKit”但未提及像 SSO 或 MFA 这样的特定功能。
操作:使用下面按优先级排序的检查来检测框架和语言。阅读相应的参考文件。
歧义消除:
workos-sso (#3) —— 功能优先于框架。按此确切顺序检查。首次匹配即生效:
1. package.json 依赖项中存在 `@tanstack/start`
→ 阅读:references/workos-authkit-tanstack-start.md
2. package.json 依赖项中存在 `@sveltejs/kit`
→ 阅读:references/workos-authkit-sveltekit.md
3. package.json 依赖项中存在 `react-router` 或 `react-router-dom`
→ 阅读:references/workos-authkit-react-router.md
4. 项目根目录中存在 `next.config.js` 或 `next.config.mjs` 或 `next.config.ts`
→ 阅读:references/workos-authkit-nextjs.md
5. (存在 `vite.config.js` 或 `vite.config.ts`)且 package.json 依赖项中存在 `react`
→ 阅读:references/workos-authkit-react.md
6. 以上均未检测到
→ 阅读:references/workos-authkit-vanilla-js.md
如果项目不是 JavaScript/TypeScript 前端框架,则检查:
1. 存在 `pyproject.toml` 或 `requirements.txt` 或 `setup.py`
→ 阅读:references/workos-python.md
2. 存在 `go.mod`
→ 阅读:references/workos-go.md
3. 存在 `Gemfile` 或存在 `config/routes.rb`
→ 阅读:references/workos-ruby.md
4. 存在 `composer.json` 且依赖项中存在 `laravel/framework`
→ 阅读:references/workos-php-laravel.md
5. 存在 `composer.json`(无 Laravel)
→ 阅读:references/workos-php.md
6. 存在 `*.csproj` 或 `*.sln`
→ 阅读:references/workos-dotnet.md
7. 存在 `build.gradle.kts` 或 `build.gradle`
→ 阅读:references/workos-kotlin.md
8. 存在 `mix.exs`
→ 阅读:references/workos-elixir.md
9. 存在 `package.json` 且包含 `express` / `fastify` / `hono` / `koa`(后端 JS)
→ 阅读:references/workos-node.md
为何按此顺序:TanStack、SvelteKit 和 React Router 比 Next.js/Vite+React 更具体。一个项目可能同时有 Next.js 和 React Router;在这种情况下,React Router 优先,因为它更具体。当未检测到任何框架时,原生 JS 是后备选项。当未找到前端框架时,检查后端语言。
边界情况 —— 检测到多个框架:如果检测到冲突的信号(例如,同时存在 next.config.js 和 @tanstack/start),请询问用户他们想使用哪一个。不要猜测。
边界情况 —— 从上下文中无法明确框架:如果用户说“添加登录”但您无法扫描文件(远程仓库、无访问权限),请询问:“您使用的是哪个框架/语言?” 未经确认,不要使用默认值。
触发条件:用户提到连接到外部身份提供商、配置第三方集成,或询问“如何与 [提供商] 集成”。
操作:阅读 references/workos-integrations.md。
为何与 SSO 分开:SSO 涵盖认证流程;集成涵盖身份提供商配置和连接设置。如果用户同时提到两者(“设置 Google SSO”),则路由到 SSO (#3) —— 它会在需要时引用集成文档。
触发条件:用户提到管理 WorkOS 资源(组织、用户、角色、权限)、植入数据或 CLI 管理命令。
操作:阅读 references/workos-management.md。
触发条件:用户说“WorkOS 帮助”、“WorkOS 设置”、“WorkOS 能做什么”,或未提供任何功能特定的上下文。
操作:
不要猜测功能 —— 通过展示选项来强制消除歧义。
触发条件:以上规则均不匹配,或者请求确实模糊不清。
操作:
首先路由到最具体的参考文档。例如:“带 MFA 和目录同步的 SSO” → 首先路由到 workos-sso。完成 SSO 设置后,用户可以单独请求 MFA 和目录同步。
路由到功能主题文件 —— 它包含端点表格。例如:“SSO API 端点” → workos-sso.md。
路由到功能参考 (#3),而不是返回 AuthKit 安装。例如:“我正在 Next.js 中使用 AuthKit,想要添加 SSO” → workos-sso.md。
路由到集成 (#5)。例如:“如何连接 Okta?” → workos-integrations.md。
路由到功能参考 (#3)。例如:“设置 Okta SSO” → workos-sso.md(它会引用集成文档进行 Okta 设置)。
如果无法检测到框架且用户未指定,请询问:“您使用的是哪个框架/语言?” 未经确认,不要使用默认值。
如果检测发现冲突的信号(例如,同时存在 Next.js 和 TanStack Start 配置),请询问:“我看到 [框架 A] 和 [框架 B]。您想使用哪一个来配置 AuthKit?”
遵循步骤 #7(模糊或通用请求):获取 llms.txt,展示选项,并强制消除歧义。
每周安装次数
221
仓库
GitHub Stars
6
首次出现
2026年2月10日
安全审计
安装于
codex211
opencode209
gemini-cli206
github-copilot206
amp205
kimi-cli205
When a user needs help with WorkOS, consult the tables below to route to the right reference.
All references are topic files in the references/ directory. Read the file and follow its instructions (fetch docs first, then use gotchas to avoid common traps).
Exception : Widget requests use the workos-widgets skill via the Skill tool — it has its own multi-framework orchestration.
references/{name}.md)| User wants to... | Read file |
|---|---|
| Install AuthKit in Next.js | references/workos-authkit-nextjs.md |
| Install AuthKit in React SPA | references/workos-authkit-react.md |
| Install AuthKit with React Router | references/workos-authkit-react-router.md |
| Install AuthKit with TanStack Start | references/workos-authkit-tanstack-start.md |
| Install AuthKit with SvelteKit | references/workos-authkit-sveltekit.md |
| Install AuthKit in vanilla JS | references/workos-authkit-vanilla-js.md |
| AuthKit architecture reference | references/workos-authkit-base.md |
| Add WorkOS Widgets | Load workos-widgets skill via Skill tool |
references/{name}.md)| User wants to... | Read file |
|---|---|
| Install AuthKit in Node.js backend | references/workos-node.md |
| Install AuthKit in Python | references/workos-python.md |
| Install AuthKit in .NET | references/workos-dotnet.md |
| Install AuthKit in Go | references/workos-go.md |
| Install AuthKit in Ruby | references/workos-ruby.md |
| Install AuthKit in PHP | references/workos-php.md |
references/{name}.md)| User wants to... | Read file |
|---|---|
| Configure Single Sign-On | references/workos-sso.md |
| Set up Directory Sync | references/workos-directory-sync.md |
| Implement RBAC / roles | references/workos-rbac.md |
| Encrypt data with Vault | references/workos-vault.md |
| Handle WorkOS Events / webhooks | references/workos-events.md |
| Set up Audit Logs | references/workos-audit-logs.md |
references/{name}.md)Feature topic files above include endpoint tables for their respective APIs. Use these API-only references when no feature topic exists:
| User wants to... | Read file |
|---|---|
| AuthKit API Reference | references/workos-api-authkit.md |
| Organization API Reference | references/workos-api-organization.md |
references/{name}.md)| User wants to... | Read file |
|---|---|
| Migrate from Auth0 | references/workos-migrate-auth0.md |
| Migrate from AWS Cognito | references/workos-migrate-aws-cognito.md |
| Migrate from Better Auth | references/workos-migrate-better-auth.md |
| Migrate from Clerk | references/workos-migrate-clerk.md |
| Migrate from Descope | references/workos-migrate-descope.md |
| Migrate from Firebase |
references/{name}.md)| User wants to... | Read file |
|---|---|
| Manage WorkOS resources via CLI commands | references/workos-management.md |
Apply these rules in order. First match wins.
Triggers : User mentions migrating FROM another provider (Auth0, Clerk, Cognito, Firebase, Supabase, Stytch, Descope, Better Auth, standalone SSO API).
Action : Read references/workos-migrate-[provider].md where [provider] matches the source system. If provider is not in the table, read references/workos-migrate-other-services.md.
Why this wins : Migration context overrides feature-specific routing because users need provider-specific data export and transformation steps.
Triggers : User explicitly asks about "API endpoints", "request format", "response schema", "API reference", or mentions inspecting HTTP details.
Action : For features with topic files (SSO, Directory Sync, RBAC, Vault, Events, Audit Logs, Admin Portal), read the feature topic file — it includes an endpoint table. For AuthKit or Organization APIs, read references/workos-api-[domain].md.
Why this wins : API references are low-level; feature topics are high-level but include endpoint tables for quick reference.
Triggers : User mentions a specific WorkOS feature by name (SSO, MFA, Directory Sync, Audit Logs, Vault, RBAC, Admin Portal, Custom Domains, Events, Integrations, Email).
Action : Read references/workos-[feature].md where [feature] is the lowercase slug (sso, mfa, directory-sync, audit-logs, vault, rbac, admin-portal, custom-domains, events, integrations, email).
Exception : Widget requests load the workos-widgets skill via the Skill tool — it has its own orchestration.
Disambiguation : If user mentions BOTH a feature and "API", route to the feature topic file (it includes endpoints). If they mention MULTIPLE features, route to the MOST SPECIFIC one first (e.g., "SSO with MFA" → route to SSO; user can request MFA separately).
Triggers : User mentions authentication setup, login flow, sign-up, session management, or explicitly says "AuthKit" WITHOUT mentioning a specific feature like SSO or MFA.
Action : Detect framework and language using the priority-ordered checks below. Read the corresponding reference file.
Disambiguation :
workos-sso (#3) — feature wins over framework.Check in this exact order. First match wins:
1. `@tanstack/start` in package.json dependencies
→ Read: references/workos-authkit-tanstack-start.md
2. `@sveltejs/kit` in package.json dependencies
→ Read: references/workos-authkit-sveltekit.md
3. `react-router` or `react-router-dom` in package.json dependencies
→ Read: references/workos-authkit-react-router.md
4. `next.config.js` OR `next.config.mjs` OR `next.config.ts` exists in project root
→ Read: references/workos-authkit-nextjs.md
5. (`vite.config.js` OR `vite.config.ts` exists) AND `react` in package.json dependencies
→ Read: references/workos-authkit-react.md
6. NONE of the above detected
→ Read: references/workos-authkit-vanilla-js.md
If the project is NOT a JavaScript/TypeScript frontend framework, check:
1. `pyproject.toml` OR `requirements.txt` OR `setup.py` exists
→ Read: references/workos-python.md
2. `go.mod` exists
→ Read: references/workos-go.md
3. `Gemfile` exists OR `config/routes.rb` exists
→ Read: references/workos-ruby.md
4. `composer.json` exists AND `laravel/framework` in dependencies
→ Read: references/workos-php-laravel.md
5. `composer.json` exists (without Laravel)
→ Read: references/workos-php.md
6. `*.csproj` OR `*.sln` exists
→ Read: references/workos-dotnet.md
7. `build.gradle.kts` OR `build.gradle` exists
→ Read: references/workos-kotlin.md
8. `mix.exs` exists
→ Read: references/workos-elixir.md
9. `package.json` exists with `express` / `fastify` / `hono` / `koa` (backend JS)
→ Read: references/workos-node.md
Why this order : TanStack, SvelteKit, and React Router are MORE specific than Next.js/Vite+React. A project can have both Next.js AND React Router; in that case, React Router wins because it's more specific. Vanilla JS is the fallback when no framework is detected. Backend languages are checked when no frontend framework is found.
Edge case — multiple frameworks detected : If you detect conflicting signals (e.g., both next.config.js and @tanstack/start), ASK the user which one they want to use. Do NOT guess.
Edge case — framework unclear from context : If the user says "add login" but you cannot scan files (remote repo, no access), ASK: "Which framework/language are you using?" Do NOT default without confirmation.
Triggers : User mentions connecting to external IdPs, configuring third-party integrations, or asks "how do I integrate with [provider]".
Action : Read references/workos-integrations.md.
Why separate from SSO : SSO covers the authentication flow; Integrations covers IdP configuration and connection setup. If user mentions BOTH ("set up Google SSO"), route to SSO (#3) — it will reference Integrations where needed.
Triggers : User mentions managing WorkOS resources (organizations, users, roles, permissions), seeding data, or CLI management commands.
Action : Read references/workos-management.md.
Triggers : User says "help with WorkOS", "WorkOS setup", "what can WorkOS do", or provides no feature-specific context.
Action :
Do NOT guess a feature — force disambiguation by showing options.
Triggers : None of the above rules match, OR the request is genuinely ambiguous.
Action :
Route to the MOST SPECIFIC reference first. Example: "SSO with MFA and directory sync" → route to workos-sso first. After completing SSO setup, the user can request MFA and Directory Sync separately.
Route to the feature topic file — it includes an endpoint table. Example: "SSO API endpoints" → workos-sso.md.
Route to the feature reference (#3), not back to AuthKit installation. Example: "I'm using AuthKit in Next.js and want to add SSO" → workos-sso.md.
Route to Integrations (#5). Example: "How do I connect Okta?" → workos-integrations.md.
Route to the feature reference (#3). Example: "Set up Okta SSO" → workos-sso.md (it will reference Integrations for Okta setup).
If you cannot detect framework and the user hasn't specified, ASK: "Which framework/language are you using?" Do NOT default without confirmation.
If detection finds conflicting signals (e.g., both Next.js and TanStack Start configs), ASK: "I see both [framework A] and [framework B]. Which one do you want to use for AuthKit?"
Follow step #7 (Vague or General Request): fetch llms.txt, show options, and force disambiguation.
Weekly Installs
221
Repository
GitHub Stars
6
First Seen
Feb 10, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykWarn
Installed on
codex211
opencode209
gemini-cli206
github-copilot206
amp205
kimi-cli205
Better Auth 最佳实践指南:集成、配置与安全设置完整教程
30,700 周安装
| Install AuthKit in PHP Laravel | references/workos-php-laravel.md |
| Install AuthKit in Kotlin | references/workos-kotlin.md |
| Install AuthKit in Elixir | references/workos-elixir.md |
| Enable Admin Portal | references/workos-admin-portal.md |
| Add Multi-Factor Auth | references/workos-mfa.md |
| Configure email delivery | references/workos-email.md |
| Set up Custom Domains | references/workos-custom-domains.md |
| Set up IdP integration | references/workos-integrations.md |
references/workos-migrate-firebase.md| Migrate from Stytch | references/workos-migrate-stytch.md |
| Migrate from Supabase Auth | references/workos-migrate-supabase-auth.md |
| Migrate from the standalone SSO API | references/workos-migrate-the-standalone-sso-api.md |
| Migrate from other services | references/workos-migrate-other-services.md |