rn-state-management

rn-state-management is a skill for Claude Code, Codex from cmaranho/rn-agent-skills. It costs 54 tokens per session (467 once invoked), scanned A, original, MIT.

A guide for organizing app state in React Native, meaning the data an app needs to remember and share between screens or components. It covers local state, shared stores, selectors, and asynchronous actions.

In plain words
What is it for?
Use it when sharing data between screens, creating domain-specific stores, adding asynchronous actions, or choosing between local state, context, and a global store.
Why use it?
It helps keep data changes predictable and prevents unrelated parts of the app from updating unnecessarily. It also helps decide where each piece of state should live.

Skill for Claude CodeCodex

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

Good fit Use it when sharing data between screens, creating domain-specific stores, adding asynchronous actions, or choosing between local state, context, and a global store.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/cmaranho/rn-agent-skills/rn-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 cmaranho/rn-agent-skills --skill rn-state-management
Clone the repo
git clone --depth 1 https://github.com/cmaranho/rn-agent-skills

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 rn-state-management

README.md
[![agentmods](https://agentmods.dev/badge/skills/cmaranho/rn-agent-skills/rn-state-management/github.svg)](https://agentmods.dev/skills/cmaranho/rn-agent-skills/rn-state-management)
Your own site
<a href="https://agentmods.dev/skills/cmaranho/rn-agent-skills/rn-state-management"><img src="https://agentmods.dev/badge/skills/cmaranho/rn-agent-skills/rn-state-management/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for rn-state-management

Your own site · 80×15
<a href="https://agentmods.dev/skills/cmaranho/rn-agent-skills/rn-state-management"><img src="https://agentmods.dev/badge/skills/cmaranho/rn-agent-skills/rn-state-management.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 54 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 467 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00054 $0.00467
Opus 5 $0.00027 $0.00234
Sonnet 5 $0.00011 $0.00093
Haiku 4.5 $0.00005 $0.00047

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

Security

Grade A, and why

rn-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 11d 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.

skills/rn-state-management/SKILL.md · 53 lines

What it actually says

React Native — Gerenciamento de Estado

Objetivo

Manter estado previsível, com fonte única da verdade e mínimo de re-render.

Quando utilizar

  • Compartilhar estado entre telas/componentes.
  • Criar store/slice de domínio e ações assíncronas.
  • Decidir entre estado local, contexto ou store global.

Conhecimentos necessários

  • Biblioteca de estado do projeto (ex.: Zustand, Redux Toolkit, Jotai) e padrão de slices.
  • Selectors e comparação rasa para evitar re-render.
  • Imutabilidade; atualização de estado apenas pela API do store.
  • Integração estado → caso de uso.

Fluxo de execução

  1. Escolha o escopo, do menor ao maior: local (useState) → contexto → store global.
  2. Defina o tipo do slice (estado + ações) e o initialState.
  3. Ações assíncronas chamam casos de uso e ramificam por resultado tipado.
  4. Aplique o resultado com atualização imutável; sem mutação fora da API do store.
  5. Consuma via selectors granulares; use comparação rasa para objetos/arrays.

Boas práticas

  • Stores pequenas e por domínio; componha por slices.
  • Selector no ponto de uso; nunca selecione o store inteiro.
  • Estado derivado calculado com memo/selector, não duplicado.
  • Reset explícito para initialState.

Armadilhas comuns

  • Mutar estado diretamente.
  • Guardar no global o que é local; estado duplicado/derivado.
  • Chamar repositório/HTTP direto do store (use caso de uso).
  • Re-render em excesso ao selecionar objetos instáveis sem comparação rasa.

Critérios de sucesso

  • Fonte única da verdade; sem estado duplicado.
  • Re-renders limitados ao que mudou.
  • Ações assíncronas com loading/erro/sucesso tratados.
  • Store coberto por testes.
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. 11d ago First seen · 53 lines · 54 tokens per session scan A 2a4428769fdf

Subscribe to this mod's changes

rn-state-management is a skill published in the GitHub repository cmaranho/rn-agent-skills (2 stars, last pushed 2mo ago), licensed MIT. It adds 54 tokens to every session and 467 once invoked, about $0.0003 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-31.

Related

Other skills, from other repositories

agent-spec-mobile-react-native

Agent skill for spec-mobile-react-native - invoke with $agent-spec-mobile-react-native.

ruvnet/ruflo · 22 tokens

expo-native-ui

Framework (OSS). Build beautiful, native-feeling Expo screens. Covers Apple HIG styling, semantic colors, native controls, SF Symbols, media, visual effects, gradients, storage, and responsive layout. For routing and navigation, use the expo-router skill; for motion and animation, use the expo-animation skill.

expo/skills · 67 tokens

expo-web-to-native

Framework (OSS). Migrate an existing web React app to a native iOS/Android app with Expo. Use when the user wants to turn a website into a mobile app, port a Next.js/Vite/CRA React codebase to React Native, reuse web code on native incrementally, or asks how web idioms (the DOM, CSS, React Router, localStorage…

expo/skills · 111 tokens

expo-brownfield

Framework (OSS). Integrate Expo and React Native into an existing native iOS or Android app. Use for brownfield, embedding a React Native screen in SwiftUI/UIKit or Kotlin, or AAR/XCFramework packaging. Covers isolated and integrated approaches. For building or distributing a purely native app with EAS, use…

expo/skills · 74 tokens

truesheet-usage

Consumer-side guide for integrating @lodev09/react-native-true-sheet into a React Native app. Use this skill whenever the user wants to add, configure, control, or debug a bottom sheet using TrueSheet — including ref-based sheets, named global sheets, web support with TrueSheetProvider/useTrueSheet, React Navigation…

lodev09/react-native-true-sheet · 169 tokens

building-ui

Complete guide for building beautiful apps with Expo Router. Covers fundamentals, styling, components, navigation, animations, patterns, and native tabs.

Intelligent-Internet/ii-agent · 30 tokens