Skip to content
Back to skills

State Audit

ASecurity

Audits React state management - finds prop drilling, redundant state, and suggests improvements

  • 10 stars
  • 0 votes
  • 0 copies
  • 5 views
  • Added May 27, 2026
data-aibashreact

Security analysis

A100/100

Scanned May 27, 2026

npx -y skills add berkcangumusisik/claude-code-practices --skill state-audit --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of State Audit?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for State Audit
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/berkcangumusisik-state-audit/badge)](https://www.skillsdirectory.com/skills/berkcangumusisik-state-audit)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: state-audit
description: Audits React state management - finds prop drilling, redundant state, and suggests improvements
argument-hint: [directory]
user-invocable: true
allowed-tools: Read Grep Glob
effort: medium
---

## State Management Audit

Target: **$1** (or `src/` if not specified)

### 1. Detect State Management
```bash
cat package.json | grep -E '"zustand"|"jotai"|"recoil"|"redux"|"@tanstack/query"|"swr"'
grep -rn "useState\|useReducer\|createStore\|create(" ${1:-src/} --include="*.tsx" | wc -l
```

### 2. Find Prop Drilling
Look for props passed more than 2 levels deep without being used in intermediate components:
```bash
grep -rn "Props {" src/ --include="*.tsx" | head -20
```
Read component trees to identify drilling patterns.

### 3. Find Redundant State
- Derived state stored instead of computed: `const [fullName, setFullName]` when `firstName` and `lastName` exist
- Server data stored in `useState` when a query library is available
- Duplicate state in parent and child

### 4. Find Missing Memoization
- Expensive computations in render without `useMemo`
- Callbacks recreated every render passed to memoized children

### 5. Recommendations
For each issue, recommend the fix:
- Prop drilling → Context, Zustand slice, or composition
- Derived state → remove and compute inline
- Over-fetching → React Query/SWR with proper cache keys

Report severity and effort for each item.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…