Token导航 LogoToken导航TokenDH.com
开发敏感数据github未标认证来源可访问许可证需确认审计提醒

workos-authkit-react-routerworkos authkit React router 开发

Agent Skill

用于辅助前端页面、组件、样式和交互逻辑的开发与维护。它适合让 Agent 生成或审查 React、Next.js、Vue、Tailwind、CSS 等相关代码,整理组件结构,或定位布局和性能问题。使用时需要结合项目现有设计系统、路由和构建方式,避免只生成孤立片段;涉及页面改动时,应配合本地预览和构建检查确认视觉效果。

总安装

661

周安装

27

GitHub Stars

20

下载量

214
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:workos-authkit-react-router(workos authkit React router 开发)
来源仓库:https://github.com/workos/skills
仓库路径:skills/workos-authkit-react-router
安装命令:
npx skills add https://github.com/workos/skills --skill workos-authkit-react-router
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/workos/skills --skill workos-authkit-react-router

简介

workos-authkit-react-router 用于辅助前端页面、组件、样式和交互逻辑的开发与维护。

  • 它适合让 Agent 生成或审查 React、Next.js、Vue、
  • Tailwind、CSS 等相关代码,整理组件结构,或定位布局和性能问题。
  • 使用时需要结合项目现有设计系统、路由和构建方式,避免只生成孤立片段;
  • 涉及页面改动时,应配合本地预览和构建检查确认视觉效果。

SKILL.md

WorkOS AuthKit for React Router

Decision Tree

1. Fetch README (BLOCKING)
2. Detect router mode
3. Follow README for that mode
4. Verify with checklist below

Phase 1: Fetch SDK Documentation (BLOCKING)

STOP - Do not write any code until this completes.

WebFetch: https://github.com/workos/authkit-react-router/blob/main/README.md

The README is the source of truth. If this skill conflicts with README, follow the README.

Phase 2: Detect Router Mode

ModeDetection SignalKey Indicator
v7 Frameworkreact-router.config.ts existsRoutes in app/routes/
v7 DatacreateBrowserRouter in sourceLoaders in route config
v7 Declarative<BrowserRouter> componentRoutes as JSX, no loaders
v6package.json version "6.x"Similar to v7 Declarative

Detection order:

  1. Check for react-router.config.ts (Framework mode)
  2. Grep for createBrowserRouter (Data mode)
  3. Check package.json version (v6 vs v7)
  4. Default to Declarative if v7 with <BrowserRouter>

Phase 3: Follow README

Based on detected mode, apply the corresponding README section. The README contains current API signatures and code patterns.

Critical Distinctions

authLoader vs authkitLoader

FunctionPurposeWhere to use
authLoaderOAuth callback handlerCallback route ONLY
authkitLoaderFetch user data in routesAny route needing auth

Common mistake: Using authkitLoader for callback route. Use authLoader().

Root Route Requirement

Auth loader MUST be on root route for child routes to access auth context.

Wrong: Auth loader only on /dashboard Right: Auth loader on / (root), children inherit context

Environment Variables

Required in .env or .env.local:

  • WORKOS_API_KEY - starts with sk_
  • WORKOS_CLIENT_ID - starts with client_
  • WORKOS_REDIRECT_URI - full URL (e.g., http://localhost:3000/auth/callback)
  • WORKOS_COOKIE_PASSWORD - 32+ chars (server modes only)

Verification Checklist

After implementation, verify:

  • SDK installed in node_modules (package name from README)
  • Callback route path matches WORKOS_REDIRECT_URI path segment
  • Auth loader/provider on root route (not just child routes)
  • Build succeeds: npm run build exits 0
  • Correct mode pattern applied (loaders vs hooks)

Error Recovery

"loader is not a function"

Cause: Using loader pattern in Declarative/v6 mode Fix: Declarative/v6 modes use AuthKitProvider + useAuth hook, not loaders

Auth state not available in child routes

Cause: Auth loader missing from root route Fix: Add authkitLoader (or AuthKitProvider) to root route so children inherit context

useAuth returns undefined

Cause: Missing AuthKitProvider wrapper Fix: Wrap app with AuthKitProvider (required for Declarative/v6 modes)

Callback route 404

Cause: Route path mismatch with WORKOS_REDIRECT_URI Fix: Extract exact path from env var, create route at that path

"Module not found" for SDK

Cause: SDK not installed Fix: Install SDK, wait for completion, verify node_modules before writing imports

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

34.47%
按下载量换算74

Claude

30.77%
按下载量换算66

Cursor

19.87%
按下载量换算43

Gemini CLI

9.4%
按下载量换算20

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills