state-management

state-management is a skill for Claude Code, Codex from kouroshez/coding-os. It costs 110 tokens per session (3,791 once invoked), scanned A, original, Apache-2.0.

A guide for choosing and implementing client-side state in React, React Native, Vue, and Svelte applications. It separates server data, URL values, shared interface state, forms, and local component state so each can use an appropriate tool.

In plain words
What is it for?
Use it when adding application state, choosing a state library, promoting local state to a wider scope, reviewing a store, or adding browser or mobile persistence.
Why use it?
It prevents one oversized shared store and makes state ownership, lifetime, and persistence easier to reason about.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when adding application state, choosing a state library, promoting local state to a wider scope, reviewing a store, or adding browser or mobile persistence.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kouroshez/coding-os/state-management
Install

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.

Any agent
npx skills add kouroshez/coding-os --skill state-management
Clone the repo
git clone --depth 1 https://github.com/kouroshez/coding-os

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for state-management

README.md
[![agentmods](https://agentmods.dev/badge/skills/kouroshez/coding-os/state-management.svg)](https://agentmods.dev/skills/kouroshez/coding-os/state-management)
Your own site
<a href="https://agentmods.dev/skills/kouroshez/coding-os/state-management"><img src="https://agentmods.dev/badge/skills/kouroshez/coding-os/state-management.svg" alt="Measured on agentmods" height="20"></a>
Per session 110 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,791 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00110 $0.03791
Opus 5 $0.00055 $0.01895
Sonnet 5 $0.00022 $0.00758
Haiku 4.5 $0.00011 $0.00379

Measured 4d ago against content hash 4cd1518cf73d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

state-management scanned grade A with 1 finding 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

const res = await axios.get(`/lessons/${id}`);
src/core/skills/state-management/SKILL.md · 429 lines

How it starts

The opening of the file, as written. The whole thing — 429 lines — stays where its author put it; the contents beside it link to each section on GitHub.

State Management — Pick the Right Layer

Most "state management" debates collapse once you split state into the four kinds it actually has. This skill makes that split explicit and prescribes a tool per layer. Stack-agnostic; concrete recipes target React / React Native (this project's UI stack) with Pinia / Riverpod / Svelte runes callouts where they differ.

When to Use This Skill

  • Adding any new client-side state.
  • Promoting a useState to a wider scope.
  • Choosing a tool for a new app (Zustand vs Redux Toolkit vs Jotai vs MobX vs Riverpod vs Pinia).
  • Reviewing a PR that introduces a global store.
  • Untangling a "state tree" that's grown into a god-object.
  • Adding persistence (write to MMKV / localStorage / AsyncStorage) to a store.

The Four Kinds of State

The single most important framing. Everything else falls out of it.

Kind Owner Tool (React/RN) Lifetime Examples
Server state The server TanStack Query Cached + revalidated List of orders, current user profile, unread count
URL state The router React Navigation / Next router URL-bound Selected tab, filter query, modal open flag
Global UI state The store Zustand (default) App session Theme, locale, sidebar open, toast queue
Local component state The component useState / useReducer Component instance Input value, hover state, expanded accordion

Most app state is server state. Treating it as anything else (loading flags, "user data" globals, etc.) is the #1 cause of stale-data bugs. The default move: TanStack Query first; reach for a global store only when server-state doesn't fit.

The Decision Flow

"Where does this state come from?"
├─ Comes from the server (or could) → TanStack Query (server state)
├─ Should be reflected in URL → router params / search params (URL state)
├─ Used by 2+ unrelated screens AND not server-derivable → Global store (Zustand)
└─ Used by one component → useState / useReducer (local state)

Read the full file on GitHub · 429 lines

Files

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.

Changes

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.

  1. 4d ago First seen · 429 lines · 110 tokens per session scan A 4cd1518cf73d

Subscribe to this mod's changes

state-management is a skill published in the GitHub repository kouroshez/coding-os (6 stars, last pushed yesterday), licensed Apache-2.0. It adds 110 tokens to every session and 3,791 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

micro-frontend-architect

Expert guide for designing Micro-Frontend architectures using Webpack Module Federation, Vite Federation, and Single-SPA for large scale Vue and React applications.

roedyrustam/vibes-plug · 36 tokens

web-3d-graphics-expert

Expert guide for WebGL and 3D graphics in the browser using Three.js, Babylon.js, React Three Fiber (R3F), and TresJS. Covers scene optimization, shaders, lighting, 3D model loading (GLTF/GLB), and performance tuning.

roedyrustam/vibes-plug · 65 tokens

component-forge

Build production-grade components for React, Vue 3, and Svelte 5 with all states (loading, empty, error, success, idle), TypeScript strict, WCAG 2.2 accessibility, server components (RSC), and compound component patterns. Includes scaffold script, reference patterns, and template files for React and Vue. Use when user…

EliasOulkadi/shokunin · 112 tokens

mastermind-component-research

Ground a UI change in the codegraph before writing it — find whether the component already exists, who renders it, and what its props contract is. Use before creating or changing any React or Vue component; triggers "add a component", "change these props", "build this screen", or a Figma frame handed over for…

xcrft/mastermind · 73 tokens

Astro Content-Driven Web Framework

Astro is a modern web framework for building content-driven websites. It ships zero JavaScript by default, supports multiple UI frameworks (React, Vue, Svelte, Solid), and provides islands architecture for optimal performance.

agentskillexchange/skills · 51 tokens

frappe-frontend

Frappe frontend guidance for Vue and React, including desk pages, www pages, frappe-ui, Doppio-style frontends, client scripts, and external SPA integrations. Use when building or reviewing Frappe UI work.

Dkm0315/frappe-agent · 55 tokens