state-management-guidelines

Community

Guidelines for robust app state management.

Authorgileck
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill provides a structured approach to standardizing and optimizing state management across client, server, and offline contexts to prevent UI inconsistencies and data staleness.

Core Features & Use Cases

  • Clarifies state-type decisions: API data uses React Query, persisted UI state uses Zustand, and ephemeral UI uses useState.
  • Enforces a standardized Zustand Store Factory pattern (createStore) with persisted and inMemoryOnly options for cross-project consistency.
  • Provides guidelines for imports, React Query usage, and optimistic mutation patterns to reduce race conditions and improve UX.
  • Includes recommended architecture and workflow for route stores, feature stores, TTL validation, and maintenance utilities.

Quick Start

  • Review the Zustand guidelines and migrate stores to follow the createStore pattern with proper persistOptions or inMemoryOnly.
  • Apply the React Query hooks convention and Zustand imports across features like auth, settings, and router.
  • Implement optimistic UI patterns as described to avoid updating UI from server responses on success.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: state-management-guidelines
Download link: https://github.com/gileck/app-template-ai/archive/main.zip#state-management-guidelines

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.