Token导航 LogoToken导航TokenDH.com
前端设计执行命令github未标认证来源可访问许可证需确认审计通过

react-routerReact router 前端

Agent Skill

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

总安装

326

周安装

14

GitHub Stars

公开资料未说明

下载量

114
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/iulspop/aidd-skills --skill react-router

简介

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

  • 适合生成或审查 React、Next.js、Vue、Tailwind、CSS 相关代码。
  • 使用时需结合项目现有设计系统、路由和构建方式。
  • 涉及页面改动时应配合本地预览和构建检查确认视觉效果。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

React Router

Act as a senior React Router engineer reviewing code for correctness, performance, and best practices.

Review: $ARGUMENTS

ReactRouter {Loaders {Fetch all data in loaders, never in components with useEffect. Loaders run before render and eliminate loading spinners. Use Promise.all for independent data fetches within a loader to avoid sequential waterfalls. Use request-scoped caching (via context) so multiple loaders can call the same data function without duplicate requests. Control revalidation with shouldRevalidate to skip unnecessary refetches. Use useRevalidator for polling/focus patterns. Type loaders with Route.LoaderArgs and consume with useLoaderData<typeof loader>(). Validate URL params early with zod or invariant — don't trust params to be well-formed. Pass request.signal to fetch calls and database queries so they abort when the user navigates away. Colocate data queries in queries.server.ts next to the route file.}

Actions {Validate all form data with zod schemas. Return validation errors with data({errors}, {status: 400}) — don't throw for validation failures. Use throw redirect("/path") after successful mutations to prevent resubmission (Post/Redirect/Get). Use zod .transform() for input sanitization (trim, lowercase, parse numbers) during validation. Use z.discriminatedUnion("intent", [...]) to handle multiple actions in one route with type-safe intent matching. Use clientAction for instant client-side validation before hitting the server. Re-throw redirects and unknown errors in catch blocks — only catch expected error types.}

Forms {Use useFetcher for in-place mutations (likes, toggles, inline edits) that shouldn't trigger navigation. Use <Form> when the mutation should navigate. Show pending state with fetcher.state!== "idle" or useNavigation().state. Use useSpinDelay to avoid flicker. Reset uncontrolled forms on success with formRef.current?.reset() in an effect. Return field values from actions on validation error so inputs repopulate with defaultValue={actionData?.fields?.email}. Add <HoneypotInputs /> to public-facing forms for bot protection.}

Routing {Organize routes as folders with colocated queries.server.ts, actions.server.ts, route.tsx, and components/. Use resource routes (no default export) for API-like endpoints. Name them api.<resource>.tsx. Use dedicated action routes (actions.<noun>-<verb>.ts) for reusable mutations consumed by multiple pages via useFetcher. Name the default export Component in all route files. Never import from other route files — import shared modules instead. Exception: import type {action} for useFetcher type inference. Access parent route data with useRouteLoaderData in UI. In loaders, re-fetch (request-scoped caching prevents duplicate calls).}

Middleware {Authenticate in middleware, authorize in each loader/action. Keep auth checks close to data access. Store session in middleware so loaders/actions get a single instance per request. Use AsyncLocalStorage for request-scoped context accessible without passing args through every function. Add Server-Timing headers in middleware for performance observability. Generate a request ID in middleware for log correlation across the request lifecycle.}

Security {Protect mutations with CSRF tokens or verify Sec-Fetch-Site headers to reject cross-site requests. Sanitize user-driven redirect URLs with safeRedirect(redirectTo, "/") — never redirect to arbitrary user input. Apply CORS headers only to API resource routes that need cross-origin access. Use specific origins, not wildcards. Validate cookie payloads with schemas using typed cookies. Use prefetch="intent" on <Link> for faster navigation — preloads data on hover/focus.}

ErrorHandling {Export ErrorBoundary from every route with data fetching. Use isRouteErrorResponse to distinguish HTTP errors from unexpected exceptions. In layout routes, make ErrorBoundary layout-aware so errors render within the app shell. Use <Suspense> with <Await resolve={promise}> for streamed loader data — return promises from data() and they auto-stream.}}

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

37.18%
按下载量换算42

Claude

33.96%
按下载量换算39

Cursor

18.06%
按下载量换算21

Gemini CLI

8.59%
按下载量换算10

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/iulspop/aidd-skills --skill react-router 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

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

来源信息

继续浏览同类 Skills