一键导入
state-management
State management patterns and implementation. Trigger when the user wants to manage global state, use Redux, Zustand, or other solutions.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
State management patterns and implementation. Trigger when the user wants to manage global state, use Redux, Zustand, or other solutions.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Multi-agent team orchestration with native Agent Teams. Trigger when the user wants to launch a team of agents, coordinate parallel work with inter-agent communication, or use swarm mode.
Perform a thorough code review. Use when the user requests a review, wants to verify code quality, or before merging a PR.
Context transfer between AI sessions. Trigger when the user wants to save the context, resume a task, or hand off the work to another session.
API mock configuration for tests. Trigger when the user wants to mock APIs, use MSW, or test without a backend.
Debug and resolve problems. Use when the user has a bug, an error, an unexpected behavior, or wants to understand why something is not working.
TDD development with Red-Green-Refactor cycle. Use to implement a feature by writing tests BEFORE the code. Trigger automatically when the user asks for TDD, wants to write tests first, mentions "test first", or asks to implement, add, create, fix, correct code, a new feature, a bugfix, or a functionality.
| name | state-management |
| description | State management patterns and implementation. Trigger when the user wants to manage global state, use Redux, Zustand, or other solutions. |
| allowed-tools | ["Read","Write","Edit","Glob","Grep"] |
| context | fork |
| user-invocable | false |
Library APIs, install steps and idiomatic code drift on each release and are canonical at:
useReducer, useOptimistic, use(Context), Actions)Need shared state?
├── No → useState/useReducer
└── Yes →
├── Server state (fetch + cache + invalidate) → TanStack Query / SWR
├── Forms → React Hook Form
├── Small client state (<5 stores) → Zustand
├── Large client state (>5 stores) → Redux Toolkit
└── Theme/Auth singletons → Context + useReducer
dev-react-perf skill — re-render diagnosis when selectors are too broaddev-tdd — store reducers/selectors test well in isolation (no DOM needed)