Agent Skills › videojs/video.js › review-react-component

review-react-component

GitHub

审查React组件实现,检查数据流、状态同步、DOM操作合规性、API设计、依赖树摇及SSR/无障碍等,输出分级问题报告。

.agents/skills/review-react-component/SKILL.md videojs/video.js

触发场景

需要审查React UI组件代码质量时 评估组件边界、依赖或性能隐患时

安装

npx skills add videojs/video.js --skill review-react-component -g -y
更多选项

非标准路径

npx skills add https://github.com/videojs/video.js/tree/main/.agents/skills/review-react-component -g -y

不安装直接使用

npx skills use videojs/video.js@review-react-component

指定 Agent (Claude Code)

npx skills add videojs/video.js --skill review-react-component -a claude-code -g -y

安装 repo 全部 skill

npx skills add videojs/video.js --all -g -y

预览 repo 内 skill

npx skills add videojs/video.js --list

SKILL.md

Frontmatter
{
    "name": "review-react-component",
    "description": "Review React UI without editing code. Use for data flow, APIs, customization, styling, transitions, or bundles."
}

React component review

Read the implementation, core and DOM contracts, rendered semantics, tests, exports, package metadata, relevant design record, and nearest comparable component.

  1. Trace the source of truth, selectors, context, callbacks, and effects. Flag mirrored state, synchronization effects, broad subscriptions, unstable context values, or platform behavior that belongs in core.
  2. Flag direct mutation of React-owned DOM or effects that synchronize rendered state; refs should be limited to browser imperatives so React debugging, tests, hydration, and integrations remain authoritative.
  3. Check that each component or compound part has a scoped primitive responsibility; flag app or skin composition embedded in it. Prefer CSS or pseudo-elements when a distinction is purely visual.
  4. Review the whole public surface: props, callbacks, context, refs, render functions, data attributes, CSS custom properties, namespaces, and exports. Controlled or uncontrolled modes must each have a demonstrated consumer. Split independent behavior into another component or hook when the surface is growing around multiple concerns. Flag descendant selectors, :has(), or other complex selectors introduced by composition as likely evidence of a weak primitive boundary or missing data-* or CSS custom-property hooks.
  5. Test opt-outs: optional parts can be omitted, default markup remains useful, render replacements preserve semantics, props, events, and refs, and unsupported features leave no hidden behavior.
  6. Inspect imports, dependencies, re-exports, client boundaries, and production tree shaking. Compound APIs should use export * as Name from './index.parts' with direct part re-exports, not a runtime namespace object. Optional parts or integrations should not force unrelated code into a consumer bundle.
  7. Check transition presence and races, cleanup, SSR behavior, accessibility, and tests for state flow, nested roots, prop/ref composition, rendered output, and customization.

Use packages/react/src/ui/create-media-button.tsx, packages/react/src/utils/use-render.tsx, packages/react/src/ui/play-button/, packages/react/src/ui/slider/, packages/react/package.json, and packages/react/vite.config.ts as comparison anchors.

Report findings by severity with the location, affected consumer, evidence, and smallest viable improvement. Separate correctness and contract gaps from optional trade-offs.

Example

Input: “Review the new React chapter menu.”

Output: Prioritized findings about ownership, compound anatomy, render escape hatches, styling contracts, opt-outs, exports, or bundle boundaries.

版本历史

  • 8a0a3d8 当前 2026-10-20 08:03

同 Skill 集合

.agents/skills/change-spf-behavior/SKILL.md
.agents/skills/commit-pr/SKILL.md
.agents/skills/configure-vite-plus/SKILL.md
.agents/skills/create-html-component/SKILL.md
.agents/skills/create-issue/SKILL.md
.agents/skills/create-react-component/SKILL.md
.agents/skills/create-skill/SKILL.md
.agents/skills/create-spf-behavior/SKILL.md
.agents/skills/design-api/SKILL.md
.agents/skills/document-spf-feature/SKILL.md
.agents/skills/document-spf-use-case/SKILL.md
.agents/skills/implement-accessible-ui/SKILL.md
.agents/skills/implement-spf-feature/SKILL.md
.agents/skills/implement-spf-use-case/SKILL.md
.agents/skills/implement-ui-transition/SKILL.md
.agents/skills/investigate-issue/SKILL.md
.agents/skills/maintain-agent-docs/SKILL.md
.agents/skills/maintain-tests/SKILL.md
.agents/skills/maintain-vjsc-skin-gaps/SKILL.md
.agents/skills/review-accessibility/SKILL.md
.agents/skills/review-api/SKILL.md
.agents/skills/review-branch/SKILL.md
.agents/skills/review-docs/SKILL.md
.agents/skills/review-html-component-design/SKILL.md
.agents/skills/review-html-component/SKILL.md
.agents/skills/review-react-component-design/SKILL.md
.agents/skills/write-api-reference/SKILL.md
.agents/skills/write-design-doc/SKILL.md
.agents/skills/write-docs/SKILL.md
.agents/skills/write-html-component-design/SKILL.md
.agents/skills/write-locale-translations/SKILL.md
.agents/skills/write-react-component-design/SKILL.md
.agents/skills/write-rfc/SKILL.md
.agents/skills/create-rolldown-plugin/SKILL.md
.agents/skills/create-vite-plugin/SKILL.md
.agents/skills/create-vjsc-component/SKILL.md
.agents/skills/transform-rolldown-code/SKILL.md

元信息

文件数
0
版本
8a0a3d8
Hash
48eeaeed
收录时间
2026-10-20 08:03

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-11-03 10:13
浙ICP备14020137号-1