OpenParable
Skip to content
← Back to skills

State Management

Development
state-management

State Management is an Agent Skill for development published in the redpanda-data/console repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Manage client and server state with Zustand stores and React Query patterns.

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/redpanda-data/console/blob/HEAD/frontend/.claude/skills/state-management/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/state-management, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

State Management

Choose the right state solution for each use case.

Activation Conditions

  • Managing global state
  • Persisting state across navigation
  • Cross-component data sharing
  • Questions about Zustand vs React Query

Quick Reference

ActionRule
Read from storeuse-zustand-selectors.md
Persist stateuse-zustand-persist.md
Fetch server datause-react-query-for-server.md

Decision Tree

Is it server data (API response)?
├── Yes → React Query / Connect Query
│         (caching, refetching, invalidation)
└── No → Is it URL state?
    ├── Yes → React Router
    │         (search params, path params)
    └── No → Is it form state?
        ├── Yes → React Hook Form
        │         (validation, submission)
        └── No → Is it shared across components?
            ├── Yes → Zustand
            │         (global, persisted)
            └── No → useState / useReducer
                      (local component state)

Rules

See rules/ directory for detailed guidance.