跳到主内容
智客 ZICQ

技能库 智客分类:文档办公 react

React

使用当前React文档构建,审查,调试,迁移,或计划React应用程序和组件. 用于 React, React DOM, hooks, JSX, 服务器组件, 服务器函数, 动作/形式, React 编译器, 水合, 渲染根, React 19/19.3 升级, View Transits, Flagment refs, 仅浏览器渲染, 信任类型, 或关于现代 React 模式和最佳做法的问题.

43 安装量

官方网址:skills.sh

技能介绍

先看中文介绍;官方 description 原文单独保留,不改写 SKILL.md。

做什么

使用当前React文档构建,审查,调试,迁移,或计划React应用程序和组件. 用于 React, React DOM, hooks, JSX, 服务器组件, 服务器函数, 动作/形式, React 编译器, 水合, 渲染根, React 19/19.3 升级, View Transits, Flagment refs, 仅浏览器渲染, 信任类型, 或关于现代 React 模式和最佳做法的问题.

何时用

官方 description 未单独写出 Use when。按规范,代理会在用户任务与这段 description 的关键词匹配时激活本技能。

代理如何加载

按 Agent Skills 渐进披露:启动时只加载 name 与 description(约 100 token);任务匹配后才读入整份 SKILL.md 正文;scripts/、references/、assets/ 仅在需要时再读。 本文件正文结构:React、Workflow、React Judgment。 其中含规范建议的小节:分步指令。

文件分析

文件分析:除 SKILL.md 外,正文引用了 references/source-map.md、references/core-react.md、references/react-19.md、references/react-dom.md,属于带资源的技能包,这些文件按需再读。

官方 description(原文)

Build, review, debug, migrate, or plan React applications and components using current React documentation. Use for React, React DOM, hooks, JSX, Server Components, Server Functions, Actions/forms, React Compiler, hydration, rendering roots, React 19/19.3 upgrades, View Transitions, Fragment refs, browser-only rendering, Trusted Types, or questions about modern React patterns and best practices.

ReactWorkflowReact Judgment

来源分类:skills.sh agent-skill

SKILL.md 与 Agent 调用

官方规范 ↗
name
react
description
Build, review, debug, migrate, or plan React applications and components using current React documentation. Use for React, React DOM, hooks, JSX, Server Components, Server Functions, Actions/forms, React Compiler, hydration, rendering roots, React 19/19.3 upgrades, View Transitions, Fragment refs, browser-only rendering, Trusted Types, or questions about modern React patterns and best practices.
  1. 发现技能客户端向 Agent 提供名称与描述目录。
  2. 匹配与调用用户指定或任务匹配后,载入 SKILL.md 指令。
  3. 按需加载按步骤读取参考文档、使用脚本与素材。
指令中引用的文件 · 4
  • references/source-map.md
  • references/core-react.md
  • references/react-19.md
  • references/react-dom.md

以下路径提取自原文;文件是否齐全请以来源仓库中的完整目录为准。

具体调用语法与可用工具以目标 Agent 客户端为准。 查看调用机制说明 ↗

安装这个技能

Skills CLI ↗

先选择目标 Agent 和安装范围,保留技能包的附属文件,安装后检查客户端能否发现该技能。

该技能引用了附属文件,请从来源获取完整目录;仅复制 SKILL.md 可能缺少依赖。

交给 Agent 安装

复制安装指令给支持 Agent Skills 的代理,确认其中的目标目录与客户端匹配。

把 Agent Skill「react」安装到我的项目:SKILL.md 原文与官方 description 见 https://zicq.com/zh/skills/skl-67fbc1ca4d1bb3d7-%E5%8F%8D%E5%BA%94.html
请存为 .cursor/skills/react/SKILL.md 或 .claude/skills/react/SKILL.md,frontmatter 的 name 与 description 保持原样,不要改写。
该技能还带 scripts/、references/、assets/ 等文件,请从 https://github.com/dobroslavradosavljevic/skills 取完整目录,不要只建一个 SKILL.md。

GitHub 完整包 ↗

终端安装 · Skills CLI

需要 Node.js 与 npx。先查看仓库技能列表,确认实际名称。

npx skills add 'https://github.com/dobroslavradosavljevic/skills' --list

npx skills add 'https://github.com/dobroslavradosavljevic/skills' --skill 'react'

CLI 会交互选择目标 Agent,默认安装到项目;用户级安装使用 -g。先通过查看命令核对仓库内容,再用 npx skills list 检查已安装技能。

阅读排版
--- name: react description: Build, review, debug, migrate, or plan React applications and components using current React documentation. Use for React, React DOM, hooks, JSX, Server Components, Server Functions, Actions/forms, React Compiler, hydration, rendering roots, React 19/19.3 upgrades, View Transitions, Fragment refs, browser-only rendering, Trusted Types, or questions about modern React patterns and best practices. --- # React Use this skill to make React choices from current docs plus the local app's actual version, framework, and conventions. Snapshot: `[email protected]` / `[email protected]` (2026-09-18). Refresh from [source-map.md](references/source-map.md) if versions differ. ## Workflow 1. Identify the React surface before changing code: - Read the nearest project guidance files and package manifests. - Check installed or declared versions of `react`, `react-dom`, the framework, build tool, test stack, TypeScript, and ESLint. - Determine whether the target is a client-only app, SSR, framework-managed app, React Server Components app, React Native app, component library, or migration. 2. Refresh docs when the user asks for latest/current behavior, when versions are unclear, or when using React 19+ APIs: - Prefer current docs tooling or official docs pages. - Use [source-map.md](references/source-map.md) for the captured latest-version snapshot and official source links. 3. Load the focused reference file for the task: - [core-react.md](references/core-react.md): component design, JSX, state, effects, hooks, purity, performance, and testing judgment. - [react-19.md](references/react-19.md): React 19–19.3 APIs, upgrades, Actions, forms, Server Components, Server Functions, Compiler, View Transitions, Fragment refs, and release-channel caveats. - [react-dom.md](references/react-dom.md): `createRoot`, `hydrateRoot`, `browser()`, DOM forms, hydration, server/static rendering, Trusted Types, resources, and escape hatches. 4. Implement in the existing project style: - Prefer framework primitives over direct React DOM APIs when the framework owns routing, data fetching, SSR, RSC, or hydration. - Preserve local component boundaries, accessibility conventions, tests, and styling patterns. - Avoid introducing React 19.3-only or canary-only APIs unless the app's dependencies support them. 5. Verify the smallest meaningful surface: - Run the project's relevant typecheck, lint, test, build, story, or browser verification command. - For visible UI changes, inspect the real screen state when feasible. - Report any verification you could not run. ## React Judgment - Keep render pure and idempotent. Do not read time, randomness, browser-only globals, or mutate non-local values during render unless the value is safely isolated and repeatable. - Derive values during render when they can be calculated from props or state. Do not add state plus an Effect just to mirror another value. - Use Effects only to synchronize with external systems such as the DOM, subscriptions, timers, imperative widgets, analytics, or non-framework data fetching. - Keep Effect dependencies honest. Prove a value is non-reactive by moving it out of the component or into an Effect/Event boundary instead of suppressing the linter. - Put user-caused side effects in event handlers or Actions. Put render-caused external synchronization in Effects. - Prefer local state. Lift state only when multiple components need to coordinate. Use reducers for complex transitions and `useSyncExternalStore` for external stores. - On React 19.3 SSR, prefer `use(browser())` from `react-dom` over `typeof window` or a mounted-state Effect for Client Components that cannot produce matching HTML. - Treat `` as a Transition/Suspense animation boundary. Do not call the browser `startViewTransition` API for React-managed updates. - Treat Server Components, Server Functions, and React DOM server/static APIs as framework integration territory unless the task is explicitly building framework infrastructure. - Treat canary and experimental docs as unavailable in stable apps unless the project explicitly uses those channels.

相关技能

文档办公

Ontology

为结构化的代理内存和可堆肥技能所打入的知识图. 在创建/征服实体(Person, project, Task, Evention, Document)时使用,链接相关对象,强制约束,规划多步动作作为图变,或技能需要共享状态时使用. 触发到"记住","我知道什么","链接X到Y",…

文档办公

Nano Pdf

使用纳米-pdf CLI编辑带有自然语言指令的PDF.

文档办公

Word / DOCX

创建,检查,并编辑有可靠样式的Microsoft Word文档和DOCX文件,编号,跟踪更改,表格,章节,并进行相容性检查. 当 (1) 任务涉及 Word 或 ".docx " 时使用; (2) 文件包括跟踪的更改,评论,字段,表格,模板,或页面布局限制; (3) 文档必须在不…

文档办公

Api Gateway

通过 Maton 网关调用第三方 API, 它为用户已经连接的应用程序注入证书 。 当用户命名一个连接的应用程序和其中的具体行动时使用此技能——读取一个邮箱,查询一个CMM,归档一个问题,更新一个电子表格,通过一个连接的搜索或刮取提供者运行一个查询. 每一次通话都到用户连接的应用…