State audit

From berkcangumusisik/claude-code-practices · View interactive version

State audit is an AI agent skill from the GitHub repository berkcangumusisik/claude-code-practices. Audits React state management - finds prop drilling, redundant state, and suggests improvements

How to use this skill

Skill file

State Management Audit

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

1. Detect State Management

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:

grep -rn "Props {" src/ --include="*.tsx" | head -20

Read component trees to identify drilling patterns.

3. Find Redundant State

4. Find Missing Memoization

5. Recommendations

For each issue, recommend the fix:

Report severity and effort for each item.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.