AGENT SKILL
zustand-store-design
Structure Zustand stores for predictable frontend state, derived selectors, and minimal rerenders.
- License 许可
- MIT
- 最近更新
- 2026-05-28
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- zustand-store-design
- author
- Siming
- license
- MIT
- version
- 1.0.0
- metadata
- { "siming": { "tags": [ "frontend", "zustand", "state" ] } }
- description
- Structure Zustand stores for predictable frontend state, derived selectors, and minimal rerenders.
03 SKILL.md 正文
Zustand Store Design
Use this skill when designing frontend state stores.
Workflow
- Keep server state in request/query layers when possible.
- Use Zustand for UI state, auth session snapshots, theme state, and cross-page local state.
- Split large stores by responsibility.
- Expose selectors to avoid rerendering unrelated components.
- Keep actions small and named by user intent.
Checks
- No derived state stored unless it avoids expensive recomputation.
- No hidden mutation outside store actions.
04 同仓库更多 Skills
playwright-visual-check
Use Playwright to verify UI layout, screenshots, responsive behavior, and console/runtime errors.
★ 0
api-smoke-tests
Create API smoke tests for auth, CRUD, pagination, empty states, and error paths.
★ 0
secret-handling
Handle secrets, API keys, tokens, and credentials safely in code, logs, configs, and UI.
★ 0
dependency-risk-scan
Evaluate dependency risk, vulnerability scan results, package updates, and safe upgrade strategy.
★ 0
vector-search-quality
Improve vector retrieval quality with chunk strategy, metadata filters, thresholds, and reranking.
★ 0
rag-ingestion-pipeline
Build RAG document ingestion flows with upload, parsing, chunking, embedding, queueing, and status tracking.
★ 0