nylo-state-management

nylo-state-management is a skill for Claude Code, Codex from nylo-core/claude-code. It costs 56 tokens per session (3,077 once invoked), scanned A, original, MIT.

A reference skill for managing application state in Nylo v7 Flutter projects. Flutter is a toolkit for building apps, and application state is the data that controls what the interface shows.

In plain words
What is it for?
Use it when building Nylo widgets or pages, managing asynchronous loading, sharing data between widgets, registering providers or decoders, or dispatching application events.
Why use it?
It explains Nylo’s classes and mechanisms for updating widgets, handling page lifecycles, coordinating events, and processing API data.

Skill for Claude CodeCodex

Part of the nylo-claude-code plugin — 21 skills, 3 agents shipped together

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.

agentmods
npx agentmods add skills/nylo-core/claude-code/nylo-state-management
Any agent
npx skills add nylo-core/claude-code --skill nylo-state-management
Clone the repo
git clone --depth 1 https://github.com/nylo-core/claude-code

Made for: Claude Code, Codex.

Or install nylo-claude-code, the plugin that ships this one along with the rest of its 21 skills, 3 agents.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/nylo-core/claude-code/nylo-state-management.svg)](https://agentmods.dev/skills/nylo-core/claude-code/nylo-state-management)
Your own site
<a href="https://agentmods.dev/skills/nylo-core/claude-code/nylo-state-management"><img src="https://agentmods.dev/badge/skills/nylo-core/claude-code/nylo-state-management.svg" alt="Measured on agentmods" height="20"></a>
Per session 56 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,077 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00056 $0.03077
Opus 5 $0.00028 $0.01538
Sonnet 5 $0.00011 $0.00615
Haiku 4.5 $0.00006 $0.00308

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

Security

Grade A, and why

nylo-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 3d 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/nylo-state-management/SKILL.md · 568 lines

How it starts

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

Nylo State Management

Overview

Nylo v7 state management is built on two core classes: NyState (for reusable widgets) and NyPage (for pages, extending NyState). State updates propagate through named state identifiers, state actions enable cross-widget communication, and the provider/event systems handle app-level initialization and event-driven logic. Decoders bridge API responses to typed models.

When to Use

  • Building stateful widgets that need to update from external triggers
  • Managing page lifecycle (init, loading, reboot)
  • Communicating between widgets via state actions
  • Locking UI during async operations (e.g. preventing double-submit)
  • Registering app services and packages via providers
  • Dispatching and listening to application events
  • Registering model decoders for API response parsing
  • When NOT to use: for simple local state within a single widget, standard Flutter setState is sufficient

Quick Reference

Task Code
Create stateful widget metro make:stateful_widget my_widget
Create state-managed widget metro make:state_managed_widget cart
Update a widget's state updateState(Cart.state)
Update with data updateState(Cart.state, data: "value")
Fire a state action stateAction('refresh', state: MyWidget.state)
Lock during async lockRelease('key', perform: () async { ... })
Check if locked isLocked('key')
Check if loading isLoading(name: 'key')
Reboot page init reboot()
Create provider metro make:provider cache_provider
Create event metro make:event payment_event
Dispatch event event<PaymentEvent>(data: {...})

NyState

Basic Structure

class MyWidget extends StatefulWidget {
  static String state = "my_widget";

  @override
  _MyWidgetState createState() => _MyWidgetState();
}

class _MyWidgetState extends NyState<MyWidget> {
  _MyWidgetState() {
    stateName = MyWidget.state;
  }

  @override
  get init => () async {
    // Async initialization - loader shown automatically
  };

  @override
  void stateUpdated(data) {
    // Called when updateState(MyWidget.state) is invoked
    reboot(); // Re-run init to refresh data
  }

  @override
  Widget view(BuildContext context) {
    return Scaffold(
      body: Text("My Widget"),
    );
  }
}

Read the full file on GitHub · 568 lines

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. 3d ago First seen · 568 lines · 56 tokens per session scan A b708eb95b40f

Subscribe to this mod's changes

nylo-state-management is a skill published in the GitHub repository nylo-core/claude-code (4 stars, last pushed 4mo ago), licensed MIT. It adds 56 tokens to every session and 3,077 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