/pproenca:zustandfrom pproenca
Zustand state management guide. Use when working with store code (src/store/**), implementing actions, managing state, or creating slices. Triggers on Zustand store development, state management questions, or action implementation.
Ships in pproenca. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Main interfaces for UI components:
createTopic, sendMessage)internal_*)Core business logic implementation:
internal_ prefix (internal_createTopic)internal_dispatch*)State update handlers:
internal_dispatch + entity (internal_dispatchTopic)setUse Reducer Pattern:
messagesMap, topicMaps)Use Simple set:
internal_createTopic: async (params) => {
const tmpId = Date.now().toString();
// 1. Immediately update frontend (optimistic)
get().internal_dispatchTopic(
{ type: 'addTopic', value: { ...params, id: tmpId } },
'internal_createTopic'
);
// 2. Call backend service
const topicId = await topicService.createTopic(params);
// 3. Refresh for consistency
await get().refreshTopic();
return topicId;
},
Delete operations: Don't use optimistic updates (destructive, complex recovery)
Actions:
createTopic, sendMessageinternal_createTopic, internal_updateMessageContentinternal_dispatchTopicinternal_toggleMessageLoadingState:
messageLoadingIds, topicEditingIdstopicMaps, messagesMapactiveTopicIdtopicsInitreferences/action-patterns.mdreferences/slice-organization.mdWe are migrating slices from plain StateCreator objects to class-based actions.
(set, get, api) in the constructor.#private fields (e.g., #set, #get) to avoid leaking internals.StoreSetter<T> from @/store/types for set.Pick<ActionImpl, keyof ActionImpl> to expose only public methods.create*Slice helper that returns a class instance.type Setter = StoreSetter<HomeStore>;
export const createRecentSlice = (set: Setter, get: () => HomeStore, _api?: unknown) =>
new RecentActionImpl(set, get, _api);
export class RecentActionImpl {
readonly #get: () => HomeStore;
readonly #set: Setter;
constructor(set: Setter, get: () => HomeStore, _api?: unknown) {
void _api;
this.#set = set;
this.#get = get;
}
useFetchRecentTopics = () => {
// ...
};
}
export type RecentAction = Pick<RecentActionImpl, keyof RecentActionImpl>;
flattenActions (do not spread class instances).flattenActions binds methods to the original class instance and supports prototype methods and class fields.const createStore: StateCreator<HomeStore, [['zustand/devtools', never]]> = (...params) => ({
...initialState,
...flattenActions<HomeStoreAction>([
createRecentSlice(...params),
createHomeInputSlice(...params),
]),
});
flattenActions.PublicActions<T> helper if you need to combine multiple classes and hide private fields.type PublicActions<T> = { [K in keyof T]: T[K] };
export type ChatGroupAction = PublicActions<
ChatGroupInternalAction & ChatGroupLifecycleAction & ChatGroupMemberAction & ChatGroupCurdAction
>;
export const chatGroupAction: StateCreator<
ChatGroupStore,
[['zustand/devtools', never]],
[],
ChatGroupAction
> = (...params) =>
flattenActions<ChatGroupAction>([
new ChatGroupInternalAction(...params),
new ChatGroupLifecycleAction(...params),
new ChatGroupMemberAction(...params),
new ChatGroupCurdAction(...params),
]);
ChatGroupStoreWithSwitchTopic for lifecycle switchTopicChatGroupStoreWithRefresh for member refreshChatGroupStoreWithInternal for curd internal_dispatchChatGroupStateCreator params (set, get, api).#private to avoid set/get being exposed.flattenActions instead of spreading class instances.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub ulpi-io/plugin-marketplace --plugin pproenca3 plugins in one repository ship this exact skill · first indexed Nov 8, 2026
48 skills in this plugin
/chrome-extensionchrome-extension-uiChrome Extensions UX/UI design and implementation guidelines for popups, side panels, content scripts, and options pages. Triggers on tasks involving browser extension UI, manifest v3, chrome APIs./chrome-extension-uiChrome Extensions UX/UI design and implementation guidelines for popups, side panels, content scripts, and options pages. Triggers on tasks involving browser extension UI, manifest v3, chrome APIs./clean-architectureProvides implementation patterns for Clean Architecture, Hexagonal Architecture (Ports & Adapters), and Domain-Driven Design in Java 21+ Spring Boot 3.5+ applications. Use when structuring layered architectures, separating domain logic from frameworks, implementing ports and adapters, creating entities/value objects/aggregates, or refactoring monolithic codebases for testability and maintainability.Other plugins' skills for the same job