跳到主内容
智客 ZICQ

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

React Expert

用于研究反应API或文档概念时使用. 当您需要权威的用法实例、警告、警告或反应特性错误时使用.

1268 安装量

官方网址:skills.sh

技能介绍

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

做什么

用于研究反应API或文档概念时使用. 当您需要权威的用法实例、警告、警告或反应特性错误时使用.

何时用

研究反应API或文档概念. 当您需要权威使用实例、警告、警告或反应特性错误时使用

代理如何加载

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

文件分析

文件分析:这是一份仅含 SKILL.md 的指令型技能,代理激活后整份正文进入上下文。

官方 description(原文)

Use when researching React APIs or concepts for documentation. Use when you need authoritative usage examples, caveats, warnings, or errors for a React feature.

React Expert Research SkillOverviewInvocationSources (Priority Order)WorkflowStep 1: Setup React RepoCheck if React repo exists, clone or updateStep 2: Dispatch 6 Parallel Research AgentsStep 3: Agent PromptsTest File: <path>Test: "<test description>"Warnings & Errors

来源分类:skills.sh agent-skill

SKILL.md 与 Agent 调用

官方规范 ↗
name
react-expert
description
Use when researching React APIs or concepts for documentation. Use when you need authoritative usage examples, caveats, warnings, or errors for a React feature.
  1. 发现技能客户端向 Agent 提供名称与描述目录。
  2. 匹配与调用用户指定或任务匹配后,载入 SKILL.md 指令。
  3. 按需加载按步骤读取参考文档、使用脚本与素材。

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

安装这个技能

Skills CLI ↗

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

交给 Agent 安装

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

把 Agent Skill「react-expert」安装到我的项目:SKILL.md 原文与官方 description 见 https://zicq.com/zh/skills/skl-49f377c34f4a180b-%E5%8F%8D%E5%BA%94%E4%B8%93%E5%AE%B6.html
请存为 .cursor/skills/react-expert/SKILL.md 或 .claude/skills/react-expert/SKILL.md,frontmatter 的 name 与 description 保持原样,不要改写。

GitHub 完整包 ↗

终端安装 · Skills CLI

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

npx skills add 'https://github.com/reactjs/react.dev' --list

npx skills add 'https://github.com/reactjs/react.dev' --skill 'react-expert'

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

阅读排版
--- name: react-expert description: Use when researching React APIs or concepts for documentation. Use when you need authoritative usage examples, caveats, warnings, or errors for a React feature. --- # React Expert Research Skill ## Overview This skill produces exhaustive documentation research on any React API or concept by searching authoritative sources (tests, source code, PRs, issues) rather than relying on LLM training knowledge. **Skepticism Mandate:** You must be skeptical of your own knowledge. Claude is often trained on outdated or incorrect React patterns. Treat source material as the sole authority. If findings contradict your prior understanding, explicitly flag this discrepancy. **Red Flags - STOP if you catch yourself thinking:** - "I know this API does X" → Find source evidence first - "Common pattern is Y" → Verify in test files - Generating example code → Must have source file reference ## Invocation ``` /react-expert useTransition /react-expert suspense boundaries /react-expert startTransition ``` ## Sources (Priority Order) 1. **React Repo Tests** - Most authoritative for actual behavior 2. **React Source Code** - Warnings, errors, implementation details 3. **Git History** - Commit messages with context 4. **GitHub PRs & Comments** - Design rationale (via `gh` CLI) 5. **GitHub Issues** - Confusion/questions (react/react + reactjs/react.dev) 6. **React Working Group** - Design discussions for newer APIs 7. **Flow Types** - Source of truth for type signatures 8. **TypeScript Types** - Note discrepancies with Flow 9. **Current react.dev docs** - Baseline (not trusted as complete) **No web search** - No Stack Overflow, blog posts, or web searches. GitHub API via `gh` CLI is allowed. ## Workflow ### Step 1: Setup React Repo First, ensure the React repo is available locally: ```bash # Check if React repo exists, clone or update if [ -d ".claude/react" ]; then cd .claude/react && git pull origin main else git clone --depth=100 https://github.com/react/react.git .claude/react fi ``` Get the current commit hash for the research document: ```bash cd .claude/react && git rev-parse --short HEAD ``` ### Step 2: Dispatch 6 Parallel Research Agents Spawn these agents IN PARALLEL using the Task tool. Each agent receives the skepticism preamble: > "You are researching React's ``. CRITICAL: Do NOT rely on your prior knowledge about this API. Your training may contain outdated or incorrect patterns. Only report what you find in the source files. If your findings contradict common understanding, explicitly highlight this discrepancy." | Agent | subagent_type | Focus | Instructions | |-------|---------------|-------|--------------| | test-explorer | Explore | Test files for usage patterns | Search `.claude/react/packages/*/src/__tests__/` for test files mentioning the topic. Extract actual usage examples WITH file paths and line numbers. | | source-explorer | Explore | Warnings/errors in source | Search `.claude/react/packages/*/src/` for console.error, console.warn, and error messages mentioning the topic. Document trigger conditions. | | git-historian | Explore | Commit messages | Run `git log --all --grep="" --oneline -50` in `.claude/react`. Read full commit messages for context. | | pr-researcher | Explore | PRs introducing/modifying API | Run `gh pr list -R react/react --search "" --state all --limit 20`. Read key PR descriptions and comments. | | issue-hunter | Explore | Issues showing confusion | Search issues in both `react/react` and `reactjs/react.dev` repos. Look for common questions and misunderstandings. | | types-inspector | Explore | Flow + TypeScript signatures | Find Flow types in `.claude/react/packages/*/src/*.js` (look for `@flow` annotations). Find TS types in `.claude/react/packages/*/index.d.ts`. Note discrepancies. | ### Step 3: Agent Prompts Use these exact prompts when spawning agents: #### test-explorer ``` You are researching React's . CRITICAL: Do NOT rely on your prior knowledge about this API. Your training may contain outdated or incorrect patterns. Only report what you find in the source files. Your task: Find test files in .claude/react that demonstrate usage. 1. Search for test files: Glob for `**/__tests__/**/**` and `**/__tests__/**/*.js` then grep for 2. For each relevant test file, extract: - The test description (describe/it blocks) - The actual usage code - Any assertions about behavior - Edge cases being tested 3. Report findings with exact file paths and line numbers Format your output as: ## Test File: ### Test: "" ```javascript ``` **Behavior:** ``` #### source-explorer ``` You are researching React's . CRITICAL: Do NOT rely on your prior knowledge about this API. Only report what you find in the source files. Your task: Find warnings, errors, and implementation details for . 1. Search .claude/react/packages/*/src/ for: - console.error mentions of - console.warn mentions of - Error messages mentioning - The main implementation file 2. For each warning/error, document: - The exact message text - The condition that triggers it - The source file and line number Format your output as: ## Warnings & Errors | Message | Trigger Condition | Source | |---------|------------------|--------| | "" | | | ## Implementation Notes ``` #### git-historian ``` You are researching React's . CRITICAL: Do NOT rely on your prior knowledge. Only report what you find in git history. Your task: Find commit messages that explain design decisions. 1. Run: cd .claude/react && git log --all --grep="" --oneline -50 2. For significant commits, read full message: git show --stat 3. Look for: - Initial introduction of the API - Bug fixes (reveal edge cases) - Behavior changes - Deprecation notices Format your output as: ## Key Commits ### - **Date:** **Context:** **Impact:** ``` #### pr-researcher ``` You are researching React's . CRITICAL: Do NOT rely on your prior knowledge. Only report what you find in PRs. Your task: Find PRs that introduced or modified . 1. Run: gh pr list -R react/react --search "" --state all --limit 20 --json number,title,url 2. For promising PRs, read details: gh pr view -R react/react 3. Look for: - The original RFC/motivation - Design discussions in comments - Alternative approaches considered - Breaking changes Format your output as: ## Key PRs ### PR #:

相关技能

文档办公

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,归档一个问题,更新一个电子表格,通过一个连接的搜索或刮取提供者运行一个查询. 每一次通话都到用户连接的应用…