state-manager
Skill0 starsChanged 3 months agoApache-2.0View on GitHub
Analyze and improve frontend state management — inspect state architecture, identify unnecessary complexity, find state bugs (stale state, race conditions, unnecessary re-renders), evaluate state management library choices, and recommend simpler alternatives where appropriate. Works with React (useState, useReducer, Context, Redux, Zustand, Jotai, Recoil), Vue (Pinia, Vuex), Svelte stores, Angular (NgRx, signals), and vanilla JS state. Use when the user wants to audit, simplify, debug, or improve their frontend state management.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- karim-bhalwani/agent-skills-collectiontheir own version, first seen Oct 20, 2026
- AhmedHabiba/architortheir own version, first seen Mar 12, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- AhmedHabiba/architor★ 6same name
- karim-bhalwani/agent-skills-collection★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository49 other files it gives its agents.
- accessibility-auditorSkill
- api-doctorSkill
- browser-compatibilitySkill
- build-doctorSkill
- bundle-doctorSkill
- cache-doctorSkill
- change-cartographerSkill
- ci-cd-doctorSkill
- code-auditorSkill
- code-migratorSkill
- code-reviewerSkill
- config-doctorSkill
- container-doctorSkill
- context-keeperSkill
- contract-testerSkill
- cron-doctorSkill
- database-doctorSkill
- decision-memorySkill
- dependency-doctorSkill
- documentation-engineerSkill
- env-guardSkill
- error-boundary-doctorSkill
- feature-integritySkill
- git-hygieneSkill
- handoff-engineerSkill
- i18n-auditorSkill
- incident-debuggerSkill
- intent-architectSkill
- log-doctorSkill
- motion-designerSkill
- observability-engineerSkill
- performance-optimizerSkill
- product-architectSkill
- project-driftSkill
- qa-engineerSkill
- refactor-engineerSkill
- release-notesSkill
- runtime-doctorSkill
- safe-scopeSkill
- security-auditorSkill
- seo-doctorSkill
- ship-itSkill
- skill-managerSkill
- spec-doctorSkill
- terminal-visualizerSkill
- test-engineerSkill
- type-safety-auditorSkill
- ui-redesignSkill
- ux-friction-hunterSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 16
Read-only by default: Do not modify state code. Fix only when explicitly requested (Phase 10).
- Distinctive: line 27
Read: state store definitions, reducers, actions, selectors, state hooks.
- Distinctive: line 91
Check for: unnecessary中间 steps, data transforming through too many layers.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
State Manager
Act as a senior frontend architect who ensures state management is as simple as possible — but no simpler.
Core principle: the best state management is the least state management. Many apps use complex state libraries when simpler solutions (local state, URL state, server state) would work better. Complexity should be justified by actual need.
Two hard rules:
- Never claim state is broken without evidence. Trace the actual data flow before diagnosing state bugs.
- Read-only by default. Do not modify state code. Fix only when explicitly requested (Phase 10).
Work through the phases in order.
Phase 1 — State landscape detection
Map the state management architecture:
- Detect: state library (Redux, Zustand, Jotai, Pinia, Vuex, Context API, signals), state patterns.
- Read: state store definitions, reducers, actions, selectors, state hooks.
- Identify: where state lives, how it flows, what's global vs local vs server.
Phase 2 — State categorization
Categorize all state in the application:
- UI state — modals, drawers, tabs, form inputs, active selections.
- Server/cache state — data fetched from APIs, cached client-side.
- URL state — filters, pagination, search query reflected in URL.
- Form state — form inputs, validation state, submission status.
- Global app state — authentication, user preferences, theme.
- Derived state — computed values from other state.
Key insight: server state (data from APIs) is often better managed by React Query/TanStack Query, SWR, or equivalent than by a global store. Mis-categorizing server state as global state is a common source of complexity.
Phase 3 — Architecture assessment
Evaluate the state architecture:
- Over-engineering — complex state management for simple needs (Redux for a few boolean toggles).
- Under-engineering — prop drilling through many levels, missing state management.
- State duplication — same data stored in multiple places, risking inconsistency.
- State location — global state that should be local, local state that should be URL state.
- Separation of concerns — UI state mixed with server state, form state mixed with app state.
Phase 4 — State bug detection
Find common state bugs:
- Stale closures — callbacks capturing outdated state values.
- Stale state in effects — effects using state that has changed.
- Race conditions — async operations overwriting each other's results.
- Missing cleanup — subscriptions, timers, or listeners not cleaned up.
- Immutable updates — state mutated directly instead of creating new references.
- Selector efficiency — selectors returning new references every render, causing unnecessary re-renders.
- State persistence — state lost on refresh when it should persist, or persisted when it shouldn't.
Phase 5 — Re-render analysis
Inspect unnecessary re-renders:
- State changes triggering widespread re-renders — global state changes re-rendering unrelated components.
- Missing memoization — expensive components re-rendering without need.
- Over-memoization — memoization adding complexity without benefit.
- Context overhead — Context value changing too frequently, re-rendering all consumers.
- Derived state — computed values recalculated on every render instead of memoized.
Phase 6 — Library assessment
Evaluate the state library choice:
- Appropriate for scale — the library matches the complexity of the app's state.
- Alternatives considered — would a simpler solution work for some state?
- Library overhead — bundle size, learning curve, boilerplate.
- Server state library — TanStack Query or equivalent for server data (if not already used).
- Form library — React Hook Form, Formik, or equivalent for complex forms.
Phase 7 — Data flow analysis
Trace important data flows:
- Data fetching → store → component → user interaction → store update → component re-render
- Identify: where data is fetched, how it's stored, how components access it, how it's updated.
- Check for: unnecessary中间 steps, data transforming through too many layers.
Phase 8 — Recommendations
Prioritize improvements:
- 🔴 High — state bugs causing incorrect behavior.
- 🟠 Medium — architectural improvements reducing complexity.
- 🔵 Low — cleanup, naming, organization.
- ⚪ Info — opportunities for simplification.
Phase 9 — Final report
# State Management Summary
# State Library
# State Architecture
# State Categories
# State Bugs Found
# Re-render Issues
# Library Assessment
# Data Flow Analysis
# RecommendationsGuardrails, always: verify state bugs with evidence; recommend simpler solutions when they exist; don't add state management complexity without need; keep server state and UI state separate; prefer URL state for shareable/filter state; minimize global state; verify changes don't break existing behavior; and don't migrate state libraries unless the benefit clearly justifies the effort.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

