This codifies LobeHub's three-layer Zustand architecture: public actions for UI calls, internal_* methods for business logic with optimistic updates, and internal_dispatch* reducers for state mutations. The real value is in the patterns: when to use reducers versus simple set calls, how to handle optimistic updates for maps like messagesMap and topicMaps, and the ongoing migration from plain StateCreator objects to class-based actions with flattenActions composition. If you're working in src/store/**, this gives you the naming conventions and structural rules the codebase actually follows, including the newer class pattern with private fields and explicit store augmentation types for cross-slice dependencies.
npx skills add https://github.com/lobehub/lobe-chat --skill zustand