Orders an Expo app's cold start: polyfills, error net, splash hold, storage open, providers, splash release, background flush. Use when editing root _layout.tsx or the app root, or when the splash hangs or flashes.
Ships in react-native. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
The app starts in one fixed order: the entry loads the polyfills and then the router; the root layout installs the error net, holds the native splash and decides the direction before anything opens; the app root opens storage once, connects the error log and hydrates the stores synchronously, mounts the providers in dependency order and releases the splash once the first screen is real. Buffered writes flush from one root hook when the app leaves the foreground. Optional kits (crash reporting, analytics, notifications, ...) plug into typed slots from one registry, so the root files stay canonical when a kit is added. One zero-dependency checker proves it.
expo-router/entry last. Nothing follows the router
import. Why: ES imports evaluate in order; a module after the router entry loads after the root
component was registered. (entry-router-last)root-import-order)hold-splash.ts. Why: Expo Router hides
an unheld splash at "navigation ready", over a direction restart's empty screen or a blocking wait;
called in a component or effect, the hold comes after native content appeared, when iOS and Android
may already have hidden it. (splash-hold)useStartupReady(gate, hideSplash) in the app root). A startup component renders null
only while the splash is held. Why: a hold with no release keeps a release build on the splash
forever; a release in render or above the gate uncovers a frame that is not the first screen.
(splash-release, blank-frame)DirectionGate is its outermost element (directly inside web-support's
WebStorageGate when the app ships the web); everything with effects lives in its child
AppRoot. Why: a direction restart re-runs every module and initializer, so work done
before the decision happens twice (rtl-and-direction's direction-before-render enforces the gate).startApp, run as useState(() => startApp(services, language))). Why: the first frame has the real rows
with no loading state, the buffered errors of the first moments reach the log before any provider
renders, and a second open runs migrations again. (storage-open-once, sink-before-providers)await,
.then, .catch or .finally; async work the first screen truly needs is a non-interactive
blocking task of createStartupGate with a literal deadlineMs at or under 3000. A session
restore follows auth-and-secure-storage: its read is async and non-interactive, so it is a blocking
task under the deadline, and a miss starts the session as unknown or unavailable; a biometric
unlock is never a gate task but a lock screen after the splash. Why: a promise that never settles
keeps a held splash up forever, and a prompt that waits for the person outlasts any deadline; the
gate always opens by its deadline and reports what it missed. (startup-await, startup-deadline)useFonts
either holds the first frame or swaps the font after it. (runtime-font-load)AppProviders), data, query, settings store, stores, preferences (i18n, theme, text locale), root
stack (gesture root, keyboard, RootMotion (the one MotionConfig), navigation theme, session,
feedback, ads, games, then AppStack, whose RootKits slot wraps the Stack in the kits'
providers). Why: each provider reads only those
outside it, a misplaced one throws only when its path renders on a device, and a second copy
silently overrides the first. (provider-order, provider-once)InteractionManager. Why: consent, entitlements, OTA checks and prefetches must not delay
the first frame, and InteractionManager is a deprecated stub in React Native 0.86 that runs on the
next tick. (interaction-manager)useFlushOnBackground(flushers, errorLog) once, in the app root, before
useCheckpointOnBackground; features hand it a Flusher and never write from their own AppState
listener. Why: an iOS swipe-kill from the app switcher sends inactive and no background, and
listeners run in subscription order, so the drafts must land before the WAL is folded.
(flush-root, lifecycle-write)RootKit
(forward, blocking, flushers, motion, opensDebugRoutes, provide, effects; every part
optional) from the app's one registry, src/services/create-root-kits.ts; startApp first calls
the registry's prepareRootKits (the ports every reader uses: a test build's simulated clock and
network), then createRootKits once, after the stores, attaches the kits to the error sink
(which replays the reports it kept) and hands their tasks to the gate and their flushers to the
flush; RootMotion renders the first kit's motion slot in MotionConfig's place; AppStack
opens its (debug) group only while a kit says so and renders <RootKits kits> around the
Stack; a kit that needs Metro lists a MetroKit in scripts/metro/metro-kits.ts, which the
canonical metro.config.js composes. A slot no kit fills does nothing, and a test build's kits
are reached only through the test-only gate. Why: the root skeleton stays the canonical file
every skill cites, a kit is added or removed in one line, and every kit's work still runs at its
place in the startup order (E1, E2, E6, E7, F5, F6, I1). (root-kits)templates/src/app/_layout.tsx, templates/src/features/root-navigator/ (app-root.tsx,
root-stack.tsx, app-stack.tsx, hold-splash.ts, startup-gate.ts, use-startup-ready.ts,
background-flush.ts, use-flush-on-background.ts, root-kits.tsx, the helpers each with its
test), templates/src/services/root-kits/root-kit.ts (+ test, the slot types and helpers),
templates/src/services/create-root-kits.ts (the app's registry, empty) and
templates/contracts/startup.json. These files are the canonical root skeleton that other skills
cite; each of them owns one piece inside it. They expect the composition root
(architecture-and-boundaries), the error net (error-handling-typed-results), DirectionGate
(rtl-and-direction), the data layer (persistence-and-migrations), watchSystemA11y and
MotionConfig (accessibility-as-code), useScreenAnimation (motion-and-animation) and the
navigation theme (design-system-structure); set up a missing one with its skill first. Route groups
and Stack.Protected inside AppStack are navigation-and-routing's.src/services/create-root-kits.ts, as that skill's
example shows; the root files stay unchanged (read references/startup-order.md
section 15, the slot contract). An app piece (a store, a client, the session): its creation in
startApp at its row of the order table, its provider at its place in the tree, and its name in
appRootOrder in contracts/startup.json if it is new; pass what a kit reads (the settings, the
session) on to createRootKits. Imitate examples/app-root-with-session.tsx.createStartupGate({ blocking }) and gets a test that drives it resolving, failing
and hanging.startApp.npx jest src/features/root-navigator --ci --maxWorkers=2, then npm run typecheck and
npx eslint . --max-warnings 0.node ${CLAUDE_SKILL_DIR}/scripts/check-startup.mjs .;
look up a FAIL line's rule in references/checker-rules.md; fix and
rerun until RESULT: PASS.index.ts imports the polyfills first and expo-router/entry last (or main is expo-router/entry).src/app/_layout.tsx imports the error net installer, then hold-splash; renders DirectionGate outermost (inside WebStorageGate when the app ships the web) and AppRoot inside it; opens nothing.AppRoot runs startApp once in a useState initializer: the registry's prepared ports, open, sink, client, settings, stores, kits, gate; no await or promise chain; ServicesProvider gets the prepared services.useStartupReady; every blocking task returns a Result and the gate's deadline is at most 3000 ms.appRootOrder / rootStackOrder, each mounted once; fonts are embedded; no InteractionManager.Flusher to the one useFlushOnBackground, called before useCheckpointOnBackground.createRootKits, created once in startApp after the stores and handed to every slot (errors.attach, kitBlocking, kitFlushers, RootMotion, AppStack's (debug) guard, <RootKits kits>); prepareRootKits runs before the data layer opens; no root file imports a kit; Metro kits live in scripts/metro/metro-kits.ts.npx jest src/features/root-navigator --ci --maxWorkers=2, npm run typecheck and npx eslint . --max-warnings 0 pass.node ${CLAUDE_SKILL_DIR}/scripts/check-startup.mjs . prints RESULT: PASS (no SKIP lines are expected: every file it reads is this skill's).await openDatabaseAsync() in the root layout behind a loading spinner - a second startup path
with nothing on screen. Open synchronously in startApp.SplashScreen.preventAutoHideAsync() inside useEffect - by then the splash may be gone. Hold
it at module scope in hold-splash.ts.hide() in the root layout's effect - it also runs in the JS run that is about to restart for
the direction. Release in the app root.useFonts in the root layout with if (!loaded) return null - an empty frame or a font swap.
Embed the fonts.InteractionManager.runAfterInteractions(prefetch) - runs on the next tick, mid-startup. Start
it from the owner after the release.appErrorNet.connect in useEffect - errors of the first render wait or are lost. Connect in
startApp.AppState listener that saves its draft - gone when the screen unmounts, and
unordered against the checkpoint. Hand a Flusher to the root.background - an iOS swipe-kill from the switcher never sends it.MotionConfig in PreferencesRoot beside the root stack's RootMotion, or a second
I18nProvider - the inner one overrides the person's setting (and two MotionConfigs fight over
Reanimated's global mode). PreferencesRoot provides ReduceMotionPreferenceContext instead.<StrictMode> around AppRoot - React runs the initializer twice in development: two database
opens. Put it around RootStack if wanted.requireAuthentication) as a startup-gate task - the deadline expires under
the Face ID or BiometricPrompt sheet and the answer arrives after the app opened. Show a lock
screen after the splash release.reloadAppAsync in a module body - crashed a Release build while the bundle was still
evaluating. Restart from a mounted component's effect.app-root.tsx, app-stack.tsx or metro.config.js (a Sentry sink in
startApp, a tap hook in AppStack, getSentryExpoConfig in Metro) - forks the canonical skeleton
every skill cites. Register the kit in createRootKits; list a Metro kit in metro-kits.ts.| File | What it is | Read/run when |
|---|---|---|
| references/startup-order.md | The canonical order step by step (entry, imports, first render, gate, startApp, hooks, providers, splash, deferred, flush), owners, reloads, Strict Mode, React Navigation and multi-package notes | Workflow steps 1-3 |
| references/splash-screen.md | Verified splash behaviour of expo-splash-screen and Expo Router on iOS and Android, hold and release, crashes, Expo Go, pitfalls, tests | Workflow step 5 |
| references/startup-gate-and-deferred-work.md | Synchronous vs blocking vs deferred work, the gate, the deadline, where deferred work starts, fonts, InteractionManager, cold start hand-off | Workflow step 4 |
| references/lifecycle-flush.md | AppState sequences per platform, what must flush, one root hook, flush before checkpoint, synchronous flushers, tests | Workflow step 6 |
| references/checker-rules.md | Every check-startup rule, the contract keys, SKIP and NOT APPLICABLE, limits | Workflow step 8, on any FAIL line |
templates/src/app/_layout.tsx | The root layout: net, hold, ErrorBoundary, adapters and language, DirectionGate around AppRoot | Workflow step 2 |
templates/src/features/root-navigator/app-root.tsx | The app root: startApp, lifecycle hooks, splash release, providers | Workflow steps 2-3 |
templates/src/features/root-navigator/root-stack.tsx | The root stack: gesture root, KeyboardProvider, RootMotion, navigation theme around AppStack | Workflow steps 2-3 |
templates/src/features/root-navigator/root-motion.tsx | RootMotion: the one MotionConfig with the preference above it, or the first kit's motion slot | Workflow steps 2-3 |
templates/src/features/root-navigator/root-motion.test.tsx | Its tests: "system" by default, the provided preference, the first kit's motion slot | Workflow step 2 |
templates/src/features/root-navigator/app-stack.tsx | The root Stack with useScreenAnimation(), the test-build (debug) group behind Stack.Protected (opensDebugRoutes), inside the RootKits slot; route groups go inside it | Workflow step 2 |
templates/src/features/root-navigator/root-kits.tsx | RootKits: every kit's provider around the Stack and its effects beside it | Workflow steps 2-3 |
templates/src/features/root-navigator/root-kits.test.tsx | Its tests: no kits, provider nesting in registry order, effects mounted once | Workflow step 2 |
templates/src/services/root-kits/root-kit.ts | The slot contract: RootKit, createKitErrorSink (records, then forwards; replays the first moments), kitBlocking, kitFlushers, kitMotion, kitsOpenDebugRoutes | Workflow steps 2-3 |
templates/src/services/root-kits/root-kit.test.ts | Its tests: records always, replay, limit, attach once, a throwing kit, shared names | Workflow step 2 |
templates/src/services/create-root-kits.ts | The app's one kit registry: prepareRootKits (returns the services unchanged) and createRootKits (empty); part of the composition root | Workflow steps 2-3 |
templates/src/features/root-navigator/hold-splash.ts | The module-scope splash hold | Workflow step 2 |
templates/src/features/root-navigator/hold-splash.test.ts | Its test: once per registry, rejection to the net | Workflow step 2 |
templates/src/features/root-navigator/startup-gate.ts | createStartupGate: blocking tasks under one deadline, never rejects | Workflow steps 2 and 4 |
templates/src/features/root-navigator/startup-gate.test.ts | Its tests: no task, all tasks, failure, hang, throw, start twice, unsubscribe, a throwing listener | Workflow step 4 |
templates/src/features/root-navigator/use-startup-ready.ts | Reads the gate and releases the splash after the commit | Workflow step 2 |
templates/src/features/root-navigator/use-startup-ready.test.ts | Its tests with a real gate | Workflow step 2 |
templates/src/features/root-navigator/background-flush.ts | Flusher, isLeavingForeground, runFlushers | Workflow step 6 |
templates/src/features/root-navigator/background-flush.test.ts | The transition table and the throwing flusher | Workflow step 6 |
templates/src/features/root-navigator/use-flush-on-background.ts | The one root flush hook | Workflow step 6 |
templates/src/features/root-navigator/use-flush-on-background.test.ts | iOS and Android sequences, unmount | Workflow step 6 |
templates/contracts/startup.json | The app's startup facts for the checker (defaults filled in) | Workflow steps 2-3 |
templates/contracts/startup.schema.json | Its JSON schema | When editing the contract |
| examples/app-root-with-session.tsx | Shape: the app root with the session restore (auth-and-secure-storage) as its one blocking task, settings, stores, query and a draft buffer | Workflow step 3 |
| examples/task-draft-buffer.ts | Shape: a debounced writer that hands a Flusher to the root | Workflow step 6 |
scripts/check-startup.mjs | The checker (16 rules) | Workflow step 8, definition of done |
scripts/selftest.mjs | Proves the checker on the fixtures | After changing the checker |
scripts/check-lib.mjs | Shared checker library (synced; do not edit here) | Never by hand |
scripts/lib/source-scan.mjs | Shared source lexer and import resolver (synced; do not edit here) | Never by hand |
scripts/lib/startup-scan.mjs | Scope, function and JSX-span analysis for the checker | When changing the checker |
assets/shared.json | Which shared files this skill syncs | Maintainers |
tests/ | bases/app/ (stand-ins for the error net and the entry) and fixtures/check-startup/ (good, bad-, pass-, error-* cases on the templates) | After changing the checker or a template |
navigation-and-routing - the routes, route groups, guards and Stack options inside AppStack.rtl-and-direction - DirectionGate and the direction restart this order is built around.error-handling-typed-results - the error net and the root ErrorBoundary.persistence-and-migrations - what openDeviceData opens, migrations and the WAL checkpoint.architecture-and-boundaries - the composition root and "nothing at import time".settings-and-preferences, state-management-zustand, networking-and-server-state - the stores, PreferencesRoot and QueryProvider that join startApp.i18n-strings-and-catalogs - the Intl polyfills and language resolution.icons-app-icon-and-splash - the splash image and colours.performance-budgets - measuring cold start.ota-updates, admob-ads-and-consent, in-app-purchases - deferred startup work.deep-links-and-universal-links, push-notifications, local-notifications - the incoming-link gate and the tap hooks that run below the navigator (startup-order step F6; the notification kits plug into the slots).crash-reporting-and-observability, analytics-and-consent - root kits: error forwarding, consent after the splash, screen views, the Metro kit.app-variants-and-environment - the canonical metro.config.js that composes the Metro slot.assets/shared.json (opens in a new tab)examples/app-root-with-session.tsx (opens in a new tab)examples/task-draft-buffer.ts (opens in a new tab)references/checker-rules.md (opens in a new tab)references/lifecycle-flush.md (opens in a new tab)references/splash-screen.md (opens in a new tab)references/startup-gate-and-deferred-work.md (opens in a new tab)references/startup-order.md (opens in a new tab)scripts/check-lib.mjs (opens in a new tab)scripts/check-startup.mjs (opens in a new tab)scripts/lib/source-scan.mjs (opens in a new tab)scripts/lib/startup-scan.mjs (opens in a new tab)scripts/selftest.mjs (opens in a new tab)templates/contracts/startup.json (opens in a new tab)templates/contracts/startup.schema.json (opens in a new tab)templates/src/app/_layout.tsx (opens in a new tab)templates/src/features/root-navigator/app-root.tsx (opens in a new tab)templates/src/features/root-navigator/app-stack.tsx (opens in a new tab)templates/src/features/root-navigator/background-flush.test.ts (opens in a new tab)templates/src/features/root-navigator/background-flush.ts (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
73 skills in this plugin
/accessibility-as-codeEnforces a11y labels, 44pt targets, 200% text, VoiceOver, TalkBack. Use when adding a pressable, swipe or a11y label, text clips when large, contrast fails or Reduce Motion is missed. Not for RTL (rtl-and-direction)./adaptive-layoutLays screens out by window, not device: breakpoints, master-detail panes, readable widths, grids. Use when making screens responsive or for tablets, iPad, foldables, rotation, split screen, orientation lock. Not for tab bars (navigation-and-routing)./admob-ads-and-consentBuilds AdMob ads behind a port - banners, interstitials, rewarded, UMP consent then ATT, pacing, ADS_MODE test IDs. Use when touching ads, consent, ATT, ad IDs or rewarded perks. Not for purchases (in-app-purchases)./react-native:app-startup-and-bootstrapfrom react-native
npx claudepluginhub zakariaf/reactnative-skills --plugin react-nativeOther plugins' skills for the same job