legend-state

Installation
SKILL.md

Legend-State

Use this skill for Legend-State v3 work across core observables, React or React Native integration, persistence, remote sync, and migrations.

Workflow

  1. Inspect the project before changing code:
    • Read local agent guidance and nearby state conventions.
    • Check the exact @legendapp/state version and package manager lockfile.
    • Identify the runtime: vanilla TypeScript, React web, React Native, Expo, SSR, or a mixed app.
    • Map observable ownership and lifetime: module singleton, request scoped, provider scoped, component local, or synced resource.
    • Inventory React consumption (useValue, observer, Memo, $React, control-flow components), persistence plugins, sync plugins, and deprecated APIs.
  2. Confirm the release channel before using v3 APIs. Version 3 is prerelease in the current snapshot while npm latest is v2. Start with references/source-map.md, then refresh current docs and package metadata when versions matter.
  3. For observable creation, reads and writes, computed or linked state, reactivity, arrays, events, batching, and helpers, use references/core-observables.md.
  4. For React, React Compiler compatibility, fine-grained rendering, React Native, hooks, control flow, context, and tracing, use references/react-integration.md.
  5. For local persistence, remote sync, CRUD, retries, transforms, plugins, sync status, and local-first reliability, use references/persistence-sync.md.
  6. For v2 migrations, beta drift, architecture, security, performance, SSR, debugging, and tests, use references/production-migration-testing.md.
  7. Match the installed declarations and existing project style. Do not copy v2 examples into v3 code or assume a v3 beta API remains unchanged.
Installs
41
GitHub Stars
1
First Seen
Jul 10, 2026
legend-state — dobroslavradosavljevic/skills