react-refactor by pproenca/dot-skills
npx skills add https://github.com/pproenca/dot-skills --skill react-refactorReact 应用程序的架构重构指南。包含 7 个类别共 40 条规则,按影响程度从关键(组件和状态架构)到渐进(重构安全性)进行优先级排序。
| 类别 | 影响程度 | 规则数量 | 关键主题 |
|---|---|---|---|
| 组件架构 | 关键 | 8 | 复合组件、无头模式、组合优于属性、客户端边界 |
| 状态架构 | 关键 | 7 | 状态就近原则、状态机、URL 状态、派生值 |
| 钩子模式 | 高 | 6 | 单一职责、命名、依赖稳定性、组合 |
| 组件分解 | 高 | 6 | 滚动测试、按变更原因提取、视图/逻辑分离 |
| 耦合与内聚 | 中 |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| 4 |
| 依赖注入、循环依赖、稳定导入、避免桶文件 |
| 数据与副作用 | 中 | 4 | 服务端优先获取、TanStack Query、错误边界 |
| 重构安全性 | 低-中 | 5 | 特征测试、行为测试、集成测试 |
关键模式 — 首先确保这些正确:
常见错误 — 避免这些反模式:
react 技能react-optimise 技能react-hook-form 技能每周安装次数
101
代码仓库
GitHub 星标数
86
首次出现
2026年2月11日
安全审计
安装于
codex96
opencode94
gemini-cli93
github-copilot92
cursor89
kimi-cli87
Architectural refactoring guide for React applications. Contains 40 rules across 7 categories, prioritized by impact from critical (component and state architecture) to incremental (refactoring safety).
| Category | Impact | Rules | Key Topics |
|---|---|---|---|
| Component Architecture | CRITICAL | 8 | Compound components, headless pattern, composition over props, client boundaries |
| State Architecture | CRITICAL | 7 | Colocation, state machines, URL state, derived values |
| Hook Patterns | HIGH | 6 | Single responsibility, naming, dependency stability, composition |
| Component Decomposition | HIGH | 6 | Scroll test, extraction by change reason, view/logic separation |
| Coupling & Cohesion | MEDIUM | 4 | Dependency injection, circular deps, stable imports, barrel-free |
| Data & Side Effects | MEDIUM | 4 | Server-first fetch, TanStack Query, error boundaries |
| Refactoring Safety | LOW-MEDIUM | 5 | Characterization tests, behavior testing, integration tests |
Critical patterns — get these right first:
Common mistakes — avoid these anti-patterns:
react skillreact-optimise skillreact-hook-form skillWeekly Installs
101
Repository
GitHub Stars
86
First Seen
Feb 11, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
codex96
opencode94
gemini-cli93
github-copilot92
cursor89
kimi-cli87
Tailwind CSS v4 + shadcn/ui 生产级技术栈配置指南与最佳实践
2,600 周安装