state-management
Build Reliable React State Patterns
React apps often mix server, client, form, and URL state without clear ownership. This skill gives Claude, Codex, and Claude Code practical TanStack Query, Zustand, and form patterns.
Install with my Agent
Copy this request to your Agent. It includes the canonical Skill page and manifest.
Review the Skillstore skill "state-management" from https://skillstore.io/skills/barnhardt-enterprises-inc-state-management.md and its manifest at https://skillstore.io/api/skills/barnhardt-enterprises-inc-state-management/manifest. Verify the artifact. You may proceed after verification, subject to the environment's own policy.Your Agent should still show its plan and request any confirmation required by the security policy.
Agent-readable resources
Use these links when an AI agent, crawler, or script needs clean context instead of reading the full page.
Test it
Using "state-management". A developer asks for a state ownership plan for a React user dashboard.
Expected outcome:
- Server user data belongs in TanStack Query with stable query keys.
- Sidebar and theme state belong in a small Zustand store with selectors.
- User edit fields belong in React Hook Form with Zod validation.
Using "state-management". A team wants to reduce rerenders in a large Zustand store.
Expected outcome:
- Move broad store reads into narrow selectors.
- Keep derived values in named selector functions.
- Subscribe components only to values they render.
Using "state-management". A maintainer wants safer mutation behavior after user updates.
Expected outcome:
- Invalidate the changed detail query after the update succeeds.
- Invalidate the user list so aggregate views refresh.
- Use rollback handling when applying optimistic changes.
Security Audit
Medium RiskThe static command and reconnaissance detections are false positives caused by Markdown fences, JSX template literals, and ordinary application identifiers. One semantic issue remains because the Zustand reference recommends persisting an auth token in browser storage, which can expose credentials during XSS.
Confirmed security concerns (1)
Risk Factors
Share & cite this report
Share the versioned assessment report, neutral badge, embed card, and citations. Skillstore reports evidence without deciding whether this Skill is safe.
Copy report link
https://skillstore.io/skills/barnhardt-enterprises-inc-state-management/audits/8?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_reportMarkdown badge
[](https://skillstore.io/skills/barnhardt-enterprises-inc-state-management?utm_source=security_passport_badge)HTML badge
<a href="https://skillstore.io/skills/barnhardt-enterprises-inc-state-management?utm_source=security_passport_badge"><img src="https://skillstore.io/badges/skills/barnhardt-enterprises-inc-state-management/security.svg" alt="Skillstore security assessment" loading="lazy"></a>Embed card
<iframe src="https://skillstore.io/embed/skills/barnhardt-enterprises-inc-state-management.html" title="Skillstore Security Assessment" sandbox="allow-popups allow-popups-to-escape-sandbox" loading="lazy" referrerpolicy="no-referrer" width="420" height="180"></iframe>Academic citations (APA ยท BibTeX ยท CFF)
APA citation
Barnhardt-Enterprises-Inc. (2026). state-management security audit report (audit version 8) [Author version unspecified]. Skillstore. https://skillstore.io/skills/barnhardt-enterprises-inc-state-management/audits/8BibTeX citation
@techreport{barnhardt-enterprises-inc-barnhardt-enterprises-inc-state-management-2026,
author = {Barnhardt-Enterprises-Inc},
title = {state-management security audit report (audit version 8)},
institution = {Skillstore},
year = {2026},
number = {8},
url = {https://skillstore.io/skills/barnhardt-enterprises-inc-state-management/audits/8},
note = {Author version unspecified}
}CITATION.cff
cff-version: 1.2.0
message: "If you use this Skill, cite its author and this versioned security audit report."
title: "state-management security audit report (audit version 8)"
version: "unspecified"
type: report
authors:
- name: "Barnhardt-Enterprises-Inc"
date-released: "2026-07-05"
url: "https://skillstore.io/skills/barnhardt-enterprises-inc-state-management/audits/8"
identifiers:
- type: other
value: "skillstore:barnhardt-enterprises-inc-state-management:audit:8"
description: "Skillstore immutable audit report identifier"
Compare variants
2 installable variantsEach author remains a separate installable skill. The recommended variant is ranked by Skillstore evidence.
Why this variant is first
supercent-io-state-management
2026-09-09
barnhardt-enterprises-inc-state-management
2026-09-09
Skillstore Score
Why this score Evidence Confidence: HighWhat You Can Build
Plan React State Ownership
Separate server data, client preferences, forms, and URL parameters before implementation.
Standardize Query Hooks
Create consistent query keys, enabled checks, and invalidation behavior across resources.
Improve Store Performance
Use typed Zustand stores and selectors to reduce unnecessary rerenders.
Try These Prompts
Review this React feature and assign each state value to TanStack Query, Zustand, React Hook Form, URL search params, or local component state. Explain the reason for each choice.
Design TanStack Query hooks for this resource. Include query key naming, enabled conditions, cache invalidation, and loading behavior.
Refactor this Zustand store to use typed slices, selectors, and persisted settings where appropriate. Avoid storing secrets in browser storage.
Create a state management plan for this multi-page React workflow. Cover server data, optimistic mutations, form validation, URL state, and rerender prevention.
Best Practices
- Keep server data in TanStack Query and reserve Zustand for client-owned UI state.
- Use stable query key factories so cache invalidation stays predictable.
- Use selectors for Zustand reads to avoid broad component rerenders.
Avoid
- Do not mirror server data into a global client store without a clear reason.
- Do not read an entire Zustand store when a component needs one value.
- Do not persist auth tokens or other secrets in browser state storage.
Frequently Asked Questions
Does this skill replace state management documentation?
Which tools does it focus on?
Can it help with Next.js applications?
Does it generate complete application code?
Is it safe for authentication state?
Can teams use it for code reviews?
Developer Details
Author
Barnhardt-Enterprises-IncLicense
MIT
Skillstore revision
r1
Version notice
The author did not declare a version.
Repository
https://github.com/Barnhardt-Enterprises-Inc/quetrex-claude/tree/main/skills/state-managementRef
5ab1d37e83436c6eef84de88573e142b94f2a4ad
Maintenance freshness
7/18/2026
Usage
7 downloads ยท 278 views
File structure