Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/bdiasti/maestro-bundle-cli/state-managementnpx skills add bdiasti/maestro-bundle-cli --skill state-managementgit clone --depth 1 https://github.com/bdiasti/maestro-bundle-cliWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/bdiasti/maestro-bundle-cli/state-management)<a href="https://agentmods.dev/skills/bdiasti/maestro-bundle-cli/state-management"><img src="https://agentmods.dev/badge/skills/bdiasti/maestro-bundle-cli/state-management.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00047 | $0.01660 |
| Opus 5 | $0.00023 | $0.00830 |
| Sonnet 5 | $0.00009 | $0.00332 |
| Haiku 4.5 | $0.00005 | $0.00166 |
Grade A, and why
state-management scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 215 lines — stays where its author put it; the contents beside it link to each section on GitHub.
State Management
Choose and implement the right state management solution for each type of state using Zustand, React Query, and React Hook Form.
When to Use
- User needs to decide between Zustand, React Query, or useState
- User wants to create a global UI store (sidebar, theme, selections)
- User needs to set up server state caching with React Query
- User wants to add real-time WebSocket state
- User needs to manage complex form state
Available Operations
- Set up React Query provider and hooks for server state
- Create Zustand stores for global UI state
- Build WebSocket-connected stores for real-time data
- Configure React Hook Form for form state
- Diagnose and fix state management anti-patterns
Multi-Step Workflow
Step 1: Install Dependencies
npm install @tanstack/react-query zustand react-hook-form @hookform/resolvers zod socket.io-client
npm install -D @tanstack/react-query-devtools
Step 2: Understand the State Decision Matrix
| State Type | Solution | Example |
|---|---|---|
| Server data (API) | React Query | List of items, user profiles, search results |
| Global UI state | Zustand | Sidebar open/closed, theme, selected item ID |
| Local UI state | useState | Modal visibility, input value, toggle |
| Form state | React Hook Form | Form inputs, validation, submission |
| Real-time data | Zustand + WebSocket | Live agent status, event feed |
Step 3: Set Up React Query Provider
// src/main.tsx
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import { ReactQueryDevtools } from '@tanstack/react-query-devtools';
const queryClient = new QueryClient({
defaultOptions: {
queries: {
staleTime: 30_000, // 30 seconds
retry: 2,
refetchOnWindowFocus: false,
},
},
});
function App() {
return (
<QueryClientProvider client={queryClient}>
<Router />
<ReactQueryDevtools initialIsOpen={false} />
</QueryClientProvider>
);
}
Step 4: Create API Service and Query Hooks
// src/services/itemApi.ts
import { api } from '@/lib/api';
export const itemApi = {
list: (filters?: ItemFilters) =>
api.get<PaginatedResponse<Item>>('/api/v1/items', { params: filters }),
get: (id: string) =>
api.get<Item>(`/api/v1/items/${id}`),
create: (data: CreateItemDto) =>
api.post<Item>('/api/v1/items', data),
};
// src/hooks/useItems.ts
import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query';
export function useItems(filters?: ItemFilters) {
return useQuery({
queryKey: ['items', filters],
queryFn: () => itemApi.list(filters),
});
}
export function useCreateItem() {
const qc = useQueryClient();
return useMutation({
mutationFn: itemApi.create,
onSuccess: () => qc.invalidateQueries({ queryKey: ['items'] }),
});
}
What ships with it
2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 4d ago First seen · 215 lines · 47 tokens per session scan A ded54e5c950d
state-management is a skill published in the GitHub repository bdiasti/maestro-bundle-cli (21 stars, last pushed 5mo ago), licensed MIT. It adds 47 tokens to every session and 1,660 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
copilotkit-upgrade
Use when migrating a CopilotKit v1 application to v2 -- updating package imports, replacing deprecated hooks and components, switching from GraphQL runtime to AG-UI protocol runtime, and resolving breaking API changes.
chakra-ui-builder
Build responsive, accessible UI components and layouts using Chakra UI v3, install or configure Chakra UI in new and existing projects, and design scalable themes using tokens, semantic tokens, recipes, and slot recipes. Use this skill whenever a user asks to build, create, or generate any UI component, page, form…
material-ui-tailwind
Integrates Material UI with Tailwind CSS v4 using cascade layers (enableCssLayer, @layer order) and documents Tailwind v3 interoperability (preflight, important, injectFirst, portals). Use when combining MUI with Tailwind utilities, slotProps className, or theme token bridges.
verify
Use when you want to validate changes before committing, or when you need to check all React contribution requirements.
fix
Use when you have lint errors, formatting issues, or before committing code to ensure it passes CI.
extract-errors
Use when adding new error messages to React, or seeing "unknown error code" warnings.