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 skills add kouroshez/coding-os --skill state-managementgit clone --depth 1 https://github.com/kouroshez/coding-osWrote 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/kouroshez/coding-os/state-management)<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>- NVIDIA SkillSpector pass
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.1 | $0.00110 | $0.03791 |
| Opus 5 | $0.00055 | $0.01895 |
| Sonnet 5 | $0.00022 | $0.00758 |
| Haiku 4.5 | $0.00011 | $0.00379 |
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}`); 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
useStateto 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)
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 · 429 lines · 110 tokens per session scan A 4cd1518cf73d
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.
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.
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.
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…
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…
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.
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.