Agent skill
reviewing-state-management
Review state management patterns for React 19 best practices. Use when reviewing component state, Context usage, or state architecture.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/design/reviewing-state-management-djankies-claude-configs
SKILL.md
Review: State Management
Checklist
State Immutability
- No direct state mutation
- Using spread operators or immutable update patterns
- Arrays updated with map/filter/concat (not push/splice)
- Objects updated with spread or Object.assign
State Location
- Local state used when appropriate
- Context only for cross-cutting concerns
- No prop drilling through 3+ levels
- Frequently changing state not in Context
useReducer Usage
- Used for complex state logic
- Reducer functions are pure
- Action types are consistent
- State updates follow patterns
Context Patterns
- Split contexts for different concerns
- Using
use()API in React 19 (notuseContext) - Context providers at appropriate level
- No unnecessary re-renders
Anti-Patterns
- ❌ Direct state mutation (
state.push(),state.x = y) - ❌ Context for frequently changing values
- ❌ Excessive prop drilling
- ❌ God components managing too much state
For comprehensive state patterns, see: research/react-19-comprehensive.md.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?