nylo-auth

An authentication guide for Nylo v7 Flutter apps. It covers user sessions, login tokens, sign-in checks, protected app pages, device IDs, and more than one named session.

In plain words
What is it for?
Use it to implement login and logout, store or refresh tokens, check whether a user is signed in, manage user or device sessions, create device identifiers, and protect routes.
Why use it?
It gives authentication data a defined place and keeps it available both securely and for quick checks inside the app. This reduces repeated code for login, logout, and protected routes.

Skill for Claude CodeCodex

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-auth
Any agent
npx skills add nylo-core/claude-code --skill nylo-auth
Clone the repo
git clone --depth 1 https://github.com/nylo-core/claude-code

Made for: Claude Code, Codex.

Per session 44 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,409 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.00044 $0.02409
Opus 5 $0.00022 $0.01205
Sonnet 5 $0.00009 $0.00482
Haiku 4.5 $0.00004 $0.00241

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

Security

Grade A, and why

nylo-auth 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 2d 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-auth/SKILL.md · 395 lines

How it starts

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

Nylo Authentication

Overview

Nylo v7 authentication is managed through the Auth class, which stores user session data securely and syncs it to Backpack (an in-memory key-value store) for fast synchronous access. It supports multiple named sessions, token management, and integrates with the router for authenticated routes.

When to Use

  • Implementing login/logout flows
  • Storing and retrieving auth tokens
  • Checking if a user is authenticated
  • Updating stored auth data (e.g., token refresh)
  • Managing multiple auth sessions (user, device, admin)
  • Setting up routes that require authentication
  • Generating unique device identifiers
  • When NOT to use: For general-purpose key-value storage unrelated to auth, use nylo-storage instead

Quick Reference

Action Code
Authenticate user await Auth.authenticate(data: user)
Get all auth data Auth.data()
Get specific field Auth.data(field: 'token')
Check if authenticated await Auth.isAuthenticated()
Update auth data await Auth.set((data) { data['token'] = newToken; return data; })
Logout await Auth.logout()
Logout all sessions await Auth.logoutAll(sessions: ['device', 'admin'])
Sync to Backpack await Auth.syncToBackpack()
Get device ID await Auth.deviceId()
Set authenticated route router.add(HomePage.path).authenticatedRoute()
Navigate to auth route routeToAuthenticatedRoute()

Auth.authenticate()

Stores user session data. Accepts a Map, a Model instance, or no data (timestamp only):

// Store a Map
await Auth.authenticate(data: {
  "token": "ey2sdm...",
  "userId": 123,
  "email": "[email protected]",
});

// Store a Model instance
User user = User(id: 123, email: "[email protected]", token: "ey2sdm...");
await Auth.authenticate(data: user);

// Authenticate with no data (stores timestamp only)
await Auth.authenticate();

// Named session
await Auth.authenticate(
  data: {"deviceToken": "abc123"},
  session: 'device',
);

Read the full file on GitHub · 395 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. 2d ago First seen · 395 lines · 44 tokens per session scan A 49fa3b2d0331

Subscribe to this mod's changes

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

Related

Other skills, from other repositories