Token导航 LogoToken导航

Agent Skill · 研究检索

react-expert(React expert 搜索)

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

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

总安装 1,458周安装 62GitHub Stars 25下载 511核验 2026-05-01

安装说明

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

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/oimiragieo/agent-studio --skill react-expert

这个 Skill 是做什么的

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

react-expert 用于辅助前端开发,支持 React、Next.js、Vue 等框架的代码生成与审查。适用于组件结构整理、样式优化和布局问题排查。通过 npx skills add 命令从 GitHub 仓库安装并使用。需结合项目现有设计系统和构建方式使用,避免孤立片段。页面改动后应通过预览确认视觉效果。

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

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

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

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

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

常见问题

6 条

react-expert 怎么安装?

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

react-expert 支持哪些 AI 工具?

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

react-expert 需要什么权限?

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

react-expert 是免费的吗?

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

react-expert 用的人多吗?

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

react-expert 安全吗?

第三方扫描有未通过项,风险较高。除非你确认过源码,否则不建议直接安装到常用环境。

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

值得选的地方

  • 同时适配 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-expert

React expert 搜索 · 本页

1,45825操作浏览器未明确未通过

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

SKILL.md 原文

React Expert

Component Structure

  • Use functional components over class components
  • Keep components small and focused
  • Extract reusable logic into custom hooks
  • Use composition over inheritance
  • Implement proper prop types with TypeScript
  • Split large components into smaller, focused ones

Hooks

  • Follow the Rules of Hooks
  • Use custom hooks for reusable logic
  • Keep hooks focused and simple
  • Use appropriate dependency arrays in useEffect
  • Implement cleanup in useEffect when needed
  • Avoid nested hooks

State Management

  • Use useState for local component state
  • Implement useReducer for complex state logic
  • Use Context API for shared state
  • Keep state as close to where it's used as possible
  • Avoid prop drilling through proper state management
  • Use state management libraries only when necessary

Performance

  • Use React Compiler (available in React 19) for automatic memoization — remove manual useMemo/useCallback where the compiler can infer them
  • Only add React.memo, useMemo, useCallback when the compiler cannot help (complex object identity, external deps, stable callback refs for third-party libraries)
  • Avoid unnecessary re-renders; verify with React DevTools Profiler before adding manual memoization
  • Implement proper lazy loading with React.lazy and Suspense
  • Use proper key props in lists
  • Keep components small and focused — small components maximize compiler optimization surface

React 19 Features

React Compiler

  • The React Compiler (stable in React 19) performs automatic memoization at build time
  • Remove redundant React.memo, useMemo, useCallback wrappers — the compiler handles them
  • Compiler opt-out: add // @no-react-compiler pragma to a component/file when manual control is needed
  • Still use useMemo/useCallback for: stable refs passed to third-party libs, expensive computations with external deps the compiler cannot see

Actions

  • Use async functions as form action props for automatic pending/error state management
  • Actions replace the onSubmit + manual loading/error state boilerplate pattern
  • Server Actions (in Next.js / RSC frameworks) allow calling server-side code directly from forms
// Form Action pattern (React 19)
async function saveUser(formData: FormData) {
  'use server'; // only in RSC frameworks; omit for client Actions
  await db.users.update({ name: formData.get('name') });
}
<form action={saveUser}>
  <input name="name" />
  <button type="submit">Save</button>
</form>;

useActionState

  • Use useActionState to track the result and pending state of a form Action
  • Signature: const [state, formAction, isPending] = useActionState(fn, initialState)
  • isPending replaces the manual useState(false) loading flag pattern
  • state holds the return value of the last action invocation (success data or error)
import { useActionState } from 'react';

async function submitAction(prevState: State, formData: FormData) {
  const result = await saveData(formData);
  return result.error ? { error: result.error } : { success: true };
}

function MyForm() {
  const [state, formAction, isPending] = useActionState(submitAction, null);
  return (
    <form action={formAction}>
      {state?.error && <p>{state.error}</p>}
      <button disabled={isPending}>{isPending ? 'Saving...' : 'Save'}</button>
    </form>
  );
}

useOptimistic

  • Use useOptimistic for instant UI feedback before a server response arrives
  • Signature: const [optimisticState, setOptimistic] = useOptimistic(value, reducer?)
  • The optimistic value automatically reverts to the real value when the Action resolves
  • Always pair with Actions (the optimistic state is scoped to the Action's lifetime)
import { useOptimistic } from 'react';

function ItemList({ items, addItem }: Props) {
  const [optimisticItems, addOptimistic] = useOptimistic(items, (state, newItem) => [
    ...state,
    { ...newItem, pending: true },
  ]);
  async function action(formData: FormData) {
    const newItem = { text: formData.get('text') as string, id: crypto.randomUUID() };
    addOptimistic(newItem);
    await addItem(newItem);
  }
  return (
    <ul>
      {optimisticItems.map(item => (
        <li key={item.id} className={item.pending ? 'opacity-50' : ''}>
          {item.text}
        </li>
      ))}
      <form action={action}>
        <input name="text" />
        <button>Add</button>
      </form>
    </ul>
  );
}

use() hook

  • use(promise) — read a Promise's resolved value during render (integrates with Suspense/ErrorBoundary)
  • use(Context) — replaces useContext; can be called conditionally (unlike other hooks)
  • Unlike useEffect, use(promise) does not create a new Promise on each render; pass a stable promise
  • Use use(Context) when you need context conditionally or inside loops
import { use } from 'react';

// Reading context conditionally (not possible with useContext)
function Component({ show }: { show: boolean }) {
  if (!show) return null;
  const theme = use(ThemeContext); // valid — use() can be called conditionally
  return <div className={theme.bg}>...</div>;
}

// Reading a promise (wrap in Suspense + ErrorBoundary)
function UserProfile({ userPromise }: { userPromise: Promise<User> }) {
  const user = use(userPromise); // suspends until resolved
  return <p>{user.name}</p>;
}

Other React 19 API Changes

  • ref is now a plain prop — no forwardRef wrapper needed (function Input({ref}) {...})
  • useFormStatus — read the pending/error state of the nearest parent <form> Action
  • Document Metadata API: render <title>, <meta>, <link> anywhere in the component tree; React hoists them to <head>
  • startTransition supports async functions (Transitions) in React 19
  • useDeferredValue now accepts an initialValue parameter for SSR hydration
  • useId stable for server components; use for accessibility IDs (label htmlFor / aria-labelledby)

React Server Components (RSC)

RSC is an architectural boundary, not an optimization toggle. Understand the split before placing components.

Component Classification Rules

  • Server Component (default in Next.js App Router): no useState, no useEffect, no event handlers, no browser APIs — renders on server only, zero client JS shipped
  • Client Component ('use client' directive): interactive, uses hooks, event handlers, browser APIs — hydrates in browser
  • Mark a component 'use client' at the top of the file; all imports below that boundary are also client-side

Data Fetching Patterns

  • Fetch data directly in Server Components using async/await — no useEffect, no loading state boilerplate
  • Co-locate data fetching with the component that needs it (avoid prop drilling fetched data)
  • Use Suspense boundaries to stream Server Component output progressively
// Server Component — fetch directly, no useEffect
async function UserCard({ userId }: { userId: string }) {
  const user = await db.users.findById(userId); // direct DB / API call
  return <div>{user.name}</div>;
}

// Client Component — interactive leaf
('use client');
function LikeButton({ postId }: { postId: string }) {
  const [liked, setLiked] = useState(false);
  return <button onClick={() => setLiked(l => !l)}>{liked ? 'Unlike' : 'Like'}</button>;
}

Composition Boundary Rules

  • Server Components can render Client Components
  • Client Components cannot import Server Components directly — pass Server Components as children props instead
  • Keep Client Components as small leaf nodes; push data fetching up into Server Components
// WRONG: importing a Server Component inside a Client Component
'use client'
import { ServerComp } from './ServerComp' // breaks — ServerComp would be bundled client-side

// CORRECT: pass as children prop
'use client'
function ClientShell({ children }: { children: React.ReactNode }) {
  return <div onClick={...}>{children}</div>
}
// In a Server Component parent:
<ClientShell><ServerComp /></ClientShell>

Caching and Revalidation (Next.js App Router)

  • Use revalidatePath / revalidateTag in Server Actions to bust cache after mutations
  • Use cache() from React to deduplicate fetches within a single render pass
  • Avoid over-caching: fetch with {cache: 'no-store'} for user-specific or real-time data

When NOT to Use RSC

  • Highly interactive components (modals, drag-and-drop, real-time) — use Client Components
  • Components relying on Web APIs (localStorage, geolocation, canvas) — use Client Components
  • When RSC adds complexity without bundle savings — do not force the pattern

Radix UI & Shadcn

  • Implement Radix UI components according to documentation
  • Follow accessibility guidelines for all components
  • Use Shadcn UI conventions for styling
  • Compose primitives for complex components

Forms

  • Prefer React 19 Actions (action prop on <form>) over manual onSubmit + useState loading boilerplate
  • Use useActionState to track pending, error, and result state from form Actions
  • Use useFormStatus inside child components to read the enclosing form's pending state
  • Use useOptimistic for instant feedback during async submissions
  • Fall back to controlled components (value + onChange) when fine-grained validation or character-level feedback is required
  • Use form libraries (React Hook Form, Zod) for complex multi-step forms with schema validation
  • Implement proper accessibility: associate labels with htmlFor, use aria-describedby for error messages, manage focus on error

Error Handling

  • Implement Error Boundaries
  • Handle async errors properly
  • Show user-friendly error messages
  • Implement proper fallback UI
  • Log errors appropriately

Testing

  • Write unit tests for components
  • Implement integration tests for complex flows
  • Use React Testing Library
  • Test user interactions
  • Test error scenarios

Accessibility

  • Use semantic HTML elements
  • Implement proper ARIA attributes
  • Ensure keyboard navigation
  • Test with screen readers
  • Handle focus management
  • Provide proper alt text for images

Templates

export function Button({className, children}: ButtonProps) {return (

type State = {error?: string; success?: boolean} | null

async function submitContact(prevState: State, formData: FormData): Promise {try {// perform mutation return {success: true}} catch (err) {return {error: err instanceof Error? err.message: 'Unknown error'}}}

export function ContactForm() {const [state, formAction, isPending] = useActionState(submitContact, null) return (

// Create the promise OUTSIDE the component (stable reference) function fetchUserProfile(): Promise {return fetch('/api/users').then(r => r.json())}

export function UserProfileDisplay({dataPromise}: {dataPromise: Promise}) {const data = use(dataPromise) // suspends until resolved return {/*render data*/}}

// Usage: <Suspense fallback={}>

interface UseUserDataResult {data: UserData | null loading: boolean error: Error | null}

export function useUserData(): UseUserDataResult {const [data, setData] = useState<UserData | null>(null) const [loading, setLoading] = useState(true) const [error, setError] = useState<Error | null>(null)

useEffect(() => {let cancelled = false async function load() {try {setLoading(true) const result = await fetch('/api/users').then(r => r.json()) if (!cancelled) setData(result)} catch (err) {if (!cancelled) setError(err instanceof Error? err: new Error('Unknown error'))} finally {if (!cancelled) setLoading(false)}} load() return () => {cancelled = true}}, [])

return {data, loading, error}}

Validation

Iron Laws

  1. ALWAYS use functional components with hooks — class components are legacy code and incompatible with React Compiler, Server Components, and future concurrent features.
  2. NEVER violate the Rules of Hooks — hooks must always be called at the top level of a component, never inside conditions, loops, or nested functions.
  3. ALWAYS push state down to the lowest component that needs it — lifting state unnecessarily causes excessive re-renders and couples unrelated components.
  4. NEVER perform side effects directly in component render — use useEffect for post-render effects or Server Components for async data fetching.
  5. ALWAYS keep Client Components as small leaf nodes — the more code in 'use client' components, the more JavaScript shipped to the browser.

Anti-Patterns

Anti-PatternWhy It FailsCorrect Approach
Using class components in new codeIncompatible with React Compiler, Server Components, and concurrent featuresAlways use functional components with hooks
Calling hooks conditionally or in loopsViolates Rules of Hooks; React depends on call order stability across rendersAlways call hooks at the top level; use conditions inside the hook body
Manual useMemo/useCallback everywherePremature optimization; adds noise and complexity without measurable benefitProfile first; use React Compiler; only memoize when DevTools shows real re-render cost
Fetching data in useEffectCauses request waterfalls, loading flicker, and race conditionsUse Server Components for async fetch; React Query for client-side caching
Marking large components as 'use client'Bundles entire component tree including server data into client JSPush 'use client' to small interactive leaf components; keep data components as Server

Memory Protocol (MANDATORY)

Before starting:

cat .claude/context/memory/learnings.md

After completing: Record any new patterns or exceptions discovered.

ASSUME INTERRUPTION: Your context may reset. If it's not in memory, it didn't happen.

平台分布

Codex

35.81%
按下载量换算183

Claude

31.43%
按下载量换算161

Cursor

18.84%
按下载量换算96

Gemini CLI

10.28%
按下载量换算53

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

未通过

权限和风险

操作浏览器

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

安装前确认

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

继续浏览同类 Skills