Token导航 LogoToken导航TokenDH.com
开发操作浏览器github未标认证来源可访问许可证需确认审计通过

react-principle-engineerReact principle 工程师

Agent Skill

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

总安装

447

周安装

19

GitHub Stars

131

下载量

157
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/pproenca/dot-skills --skill react-principle-engineer

简介

依据软件工程原理指导 React 架构设计,强调可维护性、扩展性与团队协作规范。

  • 适用于中大型项目前期规划或遗留系统重构时的设计决策支撑。
  • 可提供分层架构建议、接口契约定义及模块化拆分原则落地实施方案。
  • 需平衡短期交付压力与长期技术债务控制,设定合理的演进节奏。
  • 推动团队建立代码评审机制,确保设计原则贯穿整个开发生命周期。

SKILL.md

React Core Team React Principles Best Practices

Comprehensive React development principles extracted from the official React documentation. Contains 52 rules across 8 categories prioritized by impact on code quality and maintainability.

When to Apply

Reference these guidelines when:

  • Writing React components with hooks
  • Managing component and application state
  • Synchronizing with external systems (APIs, browser APIs)
  • Debugging unexpected re-renders or stale state
  • Structuring state for complex UIs
  • Deciding between state, refs, context, and reducers

Rule Categories by Priority

PriorityCategoryImpactPrefix
1Component PurityHIGHpure-
2State StructureHIGHstate-
3State SharingHIGHshare-
4Effect PatternsHIGHeffect-
5Refs UsageMEDIUMref-
6Reducer PatternsMEDIUMreducer-
7Context PatternsMEDIUMcontext-
8Event HandlingMEDIUMevent-

Quick Reference

1. Component Purity (HIGH)

  • pure-no-external-mutations - Never mutate external variables during render
  • pure-same-inputs-same-outputs - Same props/state always produce same JSX
  • pure-local-mutation-allowed - Local mutation during render is fine
  • pure-strict-mode-detection - Use StrictMode to catch purity violations
  • pure-side-effects-in-handlers - Put side effects in event handlers
  • pure-props-as-readonly - Treat props as immutable snapshots
  • pure-render-independence - Render order shouldn't matter
  • pure-use-effect-last-resort - Effects are escape hatches, not primary pattern
  • pure-why-purity-matters - Pure components enable React's features

2. State Structure (HIGH)

  • state-group-related - Group related state variables together
  • state-avoid-contradictions - Avoid contradictory state (use enums)
  • state-avoid-redundant - Don't store values that can be derived
  • state-avoid-duplication - Store IDs, not duplicate objects
  • state-flatten-nested - Flatten deeply nested state
  • state-no-mirror-props - Don't initialize state from props
  • state-immutable-updates - Always create new objects/arrays
  • state-snapshot-behavior - State is a snapshot at render time
  • state-updater-functions - Use updaters for sequential updates
  • state-keys-reset - Use key to reset component state

3. State Sharing (HIGH)

  • share-lift-state-up - Lift state to nearest common ancestor
  • share-single-source-truth - One source of truth for each piece
  • share-controlled-uncontrolled - Controlled vs uncontrolled patterns
  • share-props-down-events-up - Props flow down, events bubble up
  • share-composition-over-drilling - Use composition to avoid drilling
  • share-preserve-reset-identity - Component identity affects state

4. Effect Patterns (HIGH)

  • effect-synchronization - Effects sync with external systems
  • effect-cleanup - Always provide cleanup functions
  • effect-dependencies - Include all dependencies in array
  • effect-separate-concerns - Separate independent synchronizations
  • effect-think-sync-not-lifecycle - Think sync/unsync, not mount/unmount
  • effect-not-for-derived-state - Don't use effects for derived state
  • effect-not-for-events - Don't use effects for event responses
  • effect-data-fetching - Proper patterns for data fetching
  • effect-never-suppress-linter - Never suppress dependency warnings
  • effect-remove-unnecessary - Remove effects that don't need to be effects

5. Refs Usage (MEDIUM)

  • ref-escape-hatch - Refs are escape hatches from React
  • ref-no-render-access - Don't read/write refs during render
  • ref-dom-manipulation - Use refs for DOM manipulation
  • ref-mutable-values - Refs for mutable values like timers
  • ref-best-practices - When to use refs vs state

6. Reducer Patterns (MEDIUM)

  • reducer-when-to-use - When to use reducers over useState
  • reducer-actions - Actions describe what happened
  • reducer-pure-functions - Reducers must be pure
  • reducer-structure - Standard reducer structure patterns
  • reducer-extract-from-component - Extract reducers to separate files

7. Context Patterns (MEDIUM)

  • context-when-to-use - When to use context vs props
  • context-create-use-provide - Create, use, provide pattern
  • context-with-reducer - Combine context with reducers
  • context-default-values - Meaningful default values

8. Event Handling (MEDIUM)

  • event-pass-handlers - Pass handlers, don't call them inline
  • event-side-effects - Side effects belong in handlers
  • event-propagation - Event propagation and stopPropagation
  • event-naming - Handler naming conventions (handle/on)

How to Use

Read individual reference files for detailed explanations and code examples:

Full Compiled Document

For the complete guide with all rules expanded: AGENTS.md

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

33.46%
按下载量换算53

Claude

28.84%
按下载量换算45

Cursor

19.91%
按下载量换算31

Gemini CLI

9.45%
按下载量换算15

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

操作浏览器

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

安装前确认

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

来源信息

继续浏览同类 Skills