Token导航 LogoToken导航

Agent Skill · 研究检索

react-advanced(React 高级)

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

react-advanced 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为操作浏览器;许可证信息还不明确,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 43,584。

总安装 974周安装 41GitHub Stars 4下载 341核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/trancong12102/agentskills --skill react-advanced

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

react-advanced 用于辅助前端页面、组件、样式和交互逻辑的开发与维护,适合生成或审查 React、Next.js 等相关代码。适用于组件结构整理、布局问题定位和性能优化建议。通过 npx skills add 命令从 GitHub 仓库安装使用。使用时需结合项目现有设计系统和构建方式,避免生成孤立片段。

涉及页面改动时应配合本地预览和构建检查确认视觉效果。

来源仓库内路径:skills/react-advanced

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/trancong12102/agentskills --skill react-advanc…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要操作浏览器,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

react-advanced 怎么安装?

在终端执行 npx skills add https://github.com/trancong12102/agentskills --skill react-advanced。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

react-advanced 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

react-advanced 需要什么权限?

权限级别是操作浏览器。该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

react-advanced 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

react-advanced 用的人多吗?

公开数据是累计安装 974 次,近一周安装 41 次,下载 341 次,GitHub 4 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

react-advanced 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
react-advanced

React 高级 · 本页

9744操作浏览器未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

React Advanced: Core Patterns & Conventions (Cross-Platform)

This skill defines the rules, conventions, and architectural decisions for building modern React applications with the TanStack ecosystem and XState. It is intentionally opinionated to prevent common pitfalls and enforce patterns that scale.

These patterns work identically on web and React Native. For platform-specific patterns:

  • Web: see react-web-advanced (TanStack Router, Start, Virtual)
  • React Native: see react-native-advanced (Expo Router, FlashList, MMKV)

For detailed API documentation of any library mentioned here, use other appropriate tools (documentation lookup, web search, etc.) — this skill focuses on how and why to use these tools, not their full API surface.

The useEffect Ban

Do not use useEffect for:

  • Data fetching — use React Query (useSuspenseQuery / useQuery) or route loaders
  • Derived state — compute during render or use useMemo
  • Syncing state with props — use the prop directly, or reset with React key
  • Responding to user events — put logic in event handlers
  • Subscribing to external stores — use useSyncExternalStore
  • Complex async flows — use XState machines with invoke / fromPromise

Acceptable uses of useEffect

Legitimate cases:

  1. Synchronizing with non-React external systems — DOM APIs, third-party widgets (maps, charts), imperative libraries that need mount/unmount lifecycle
  2. Browser/native API subscriptions with cleanup — when useSyncExternalStore is too low-level for a one-off case (WebSocket connections, resize observers)
  3. Analytics/logging on mount — fire-and-forget side effects with no state updates
  4. Bridging React Query data into XState — the useEffect bridge pattern for pushing server state into a machine via events (see references/xstate.md)

useMountEffect for mount-only effects

When you have a legitimate mount-only effect (cases 1–3 above), use a useMountEffect helper instead of raw useEffect(fn, []):

// utils/useMountEffect.ts
import { useEffect, type EffectCallback } from "react";

// eslint-disable-next-line react-hooks/exhaustive-deps
const useMountEffect = (effect: EffectCallback) => useEffect(effect, []);

export default useMountEffect;

Usage:

useMountEffect(() => {
  const plugin = $.myPlugin(ref.current);
  return () => {
    plugin.destroy();
  };
});

Why: raw useEffect(fn, []) triggers the react-hooks/exhaustive-deps lint rule and makes the developer prove the empty array is intentional. useMountEffect makes the "run once on mount" intent explicit in code and silences the warning correctly.

What to use instead

Instead of useEffect for...Use
Fetching datauseSuspenseQuery + route loader prefetch
Consuming a Promiseuse() hook (React 19+) + <Suspense>
Derived/computed valuesDirect computation or useMemo
External store subscriptionuseSyncExternalStore
Deferring expensive rendersuseDeferredValue / useTransition
Complex async orchestrationXState invoke with fromPromise
Resetting state on prop changeReact key prop on the component
User-triggered side effectsEvent handlers directly

State Management Philosophy

Server state vs client state — never mix them

Server state (data from APIs/databases) and client state (UI state existing only in the client) are fundamentally different concerns. Mixing them causes stale data bugs, duplication, and synchronization nightmares.

ConcernOwnerExamples
Server dataReact QueryUsers, posts, products, orders
URL/route stateRouterPath params, search params (TanStack Router or Expo Router)
Complex UI flowsXStateMulti-step wizards, auth flows, drag-and-drop
Shared client UIZustandTheme, sidebar, selected items, global filters, preferences
Form fieldsTanStack FormInput values, validation errors, submission
Schema validationZodSearch params, form validators, API contracts
Simple local UIuseStateToggle, accordion expanded, input focus

Decision flowchart

Is the data from a server / API?
  YES -> React Query (queryOptions + useSuspenseQuery)
  NO -> Is it in the URL / route params?
    YES -> Router (platform-specific: TanStack Router or Expo Router)
    NO -> Is it a complex multi-state flow (3+ states, async, guards)?
      YES -> XState (useMachine / createActorContext)
      NO -> Is it a form field?
        YES -> TanStack Form (with Zod validators)
        NO -> Is it shared across components / trees?
          YES -> Zustand (create store + selectors)
          NO -> useState / useReducer

When to reach for XState over useState/useReducer

Use XState when:

  • There are 3+ mutually exclusive states with defined transitions
  • Async side effects must be cancelled on state change (race conditions)
  • The logic has guards (conditions that gate transitions)
  • You need parallel states for independent concerns
  • The flow needs to be tested in isolation from React
  • Multiple steps with back/forward navigation (wizards)

Do not use XState for simple toggles, single boolean flags, or counter state. That is useState territory.


Architecture: Which Library Owns What

LayerLibraryResponsibility
Server stateReact QueryFetching, caching, invalidation, background refetch
Complex UI stateXStateState machines, actor model, flow orchestration
Shared client UIZustandCross-component UI state, preferences, selections
Form lifecycleTanStack FormField values, validation, submission
Schema validationZodSearch params, form validators, API contracts
Data displayTanStack TableHeadless sorting, filtering, pagination, grouping
TestingVitest + TLUnit, component, integration, machine testing
Simple local stateuseStateToggles, local inputs, component-scoped values

The golden rule: queryOptions as single source of truth

Define query options once, import everywhere — loaders, components, invalidation:

export const postsQueryOptions = queryOptions({
  queryKey: ["posts"],
  queryFn: fetchPosts,
  staleTime: 30_000,
});

export const postQueryOptions = (postId: string) =>
  queryOptions({
    queryKey: ["posts", postId],
    queryFn: () => fetchPost(postId),
    staleTime: 30_000,
  });

Component Composition

Compound components

Use Context-based compound components when a group of components shares implicit state. The parent manages state; children consume it through context. Memoize the context value.

Slots pattern

Use named props for slot-like composition (header, footer, actions). Avoid deeply nested render-prop trees.

Inversion of Control

When adding boolean props or branching logic to handle caller-specific behavior, push that logic back to the caller via callbacks, reducers, or render functions. Three similar if-statements is a signal to invert control.


Common Pitfalls

  1. Derived state in useEffect — computing values in an effect and storing in useState causes double renders. Compute during render or use useMemo.
  2. Storing server data in client state — putting API responses in Zustand/Redux means you own caching and invalidation. Use React Query instead.
  3. Duplicating URL state in useState — use your router's search/param hooks directly.
  4. Using React Query AND XState for the same data — React Query owns fetching/caching. XState receives data via events and handles orchestration only.
  5. Calling React hooks inside XState machines — hooks only work in React components. Use fromPromise in machines, bridge data via useEffect events.
  6. Array indices as keys — use stable IDs (item.id). Index keys cause incorrect state association on reorder/insert/delete.
  7. Defining components inside components — creates new component types each render, forcing React to unmount/remount. Define at module level.
  8. Context for high-frequency state — Context re-renders all consumers on every change. Use Zustand with selectors for shared rapidly-changing values (see references/zustand.md), or local state if component-scoped.
  9. Not using .catch() on Zod search param schemas — .default() only handles missing keys; .catch() also handles invalid values from malformed URLs.

Reference Files

Read the relevant reference file when working with a specific library:

FileWhen to read
references/react-query.mdQuery patterns, mutations, cache, Suspense integration
references/table.mdColumn defs, sorting, filtering, pagination, server-side ops
references/form.mdField validation, arrays, schema validation, performance
references/xstate.mdState machines, actors, auth flows, wizards, React integration
references/zustand.mdShared client UI state, selectors, slices, middleware, vanilla stores
references/zod.mdSchema validation, v4 API, Form integration, error handling
references/testing.mdVitest setup, Testing Library, MSW, testing Query/Form/XState
references/integration.mdCombining libraries: Zustand+XState, Query+XState bridge

平台分布

Codex

37.82%
按下载量换算129

Claude

29.91%
按下载量换算102

Cursor

19.52%
按下载量换算67

Gemini CLI

9.17%
按下载量换算31

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

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

继续浏览同类 Skills