Community程式設計與開發github.com

lobehub/zustand

LobeHub Zustand 儲存庫約定。用於編輯 src/store、儲存切片、公開/內部動作、分發動作、扁平化動作、樂觀更新、選擇器、映射或類別動作遷移。

zustand 是什麼?

這個技能定義了 LobeHub 專案中 Zustand 狀態管理的編碼約定與最佳實踐。它專注於 `src/store` 目錄下的開發流程,涵蓋了儲存切片(store slices)、公開與內部動作(public/internal actions)、動作分發與扁平化(dispatch actions, flattenActions)、樂觀更新(optimistic updates)、選擇器(selectors)、映射(maps)以及從類別動作遷移至函式型動作(class action migration)等核心概念。此技能主要用於配合 Claude Code、Cursor 等 AI 編碼助手,確保在編輯或重構 Zustand 儲存時,生成的程式碼遵循 LobeHub 的統一規範,從而提高可維護性並減少狀態管理錯誤。支援的平台包括任意使用 Zustand 的前端專案,但特別適用於遵循 LobeHub 架構的應用。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/lobehub/lobe-chat/tree/main/skills/zustand

Installed? Explore more 程式設計與開發 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

zustand 是做什麼的?

LobeHub Zustand 儲存庫約定。用於編輯 src/store、儲存切片、公開/內部動作、分發動作、扁平化動作、樂觀更新、選擇器、映射或類別動作遷移。

Individual skills in this repo

This repo contains 4 individual skills — each has its own dedicated page.

相關技能