setup-react-native-storybook

A setup workflow for adding Storybook, a tool for developing and previewing interface components, to React Native projects. It supports Expo, React Native CLI, and Re.Pack projects, with or without Expo Router.

In plain words
What is it for?
Use it to install and configure Storybook, Metro, routes, and the required project files in a React Native app.
Why use it?
It removes the guesswork from choosing the correct setup for the project's framework and build system. It also uses the project's existing package manager and config structure.

Skill for Claude CodeCodex

Part of the react-native plugin — 3 skills, 1 command, 1 MCP server 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/storybookjs/react-native/setup-react-native-storybook
Any agent
npx skills add storybookjs/react-native --skill setup-react-native-storybook
Clone the repo
git clone --depth 1 https://github.com/storybookjs/react-native

Made for: Claude Code, Codex.

Or install react-native, the plugin that ships this one along with the rest of its 3 skills, 1 command, 1 MCP server.

Per session 102 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,273 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.00102 $0.01273
Opus 5 $0.00051 $0.00636
Sonnet 5 $0.00020 $0.00255
Haiku 4.5 $0.00010 $0.00127

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

Security

Grade A, and why

setup-react-native-storybook 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/setup-react-native-storybook/SKILL.md · 121 lines

How it starts

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

React Native Storybook Setup

Add @storybook/react-native v10 to a React Native project.

Important: Detect the project's package manager (look for yarn.lock, pnpm-lock.yaml, or bun.lockb) and use it for all install/run commands instead of npm. The examples below use npm but substitute accordingly (e.g. yarn add instead of npm install, yarn storybook instead of npm run storybook). For Expo projects, use npx expo install (or bunx expo install, etc.) to install dependencies so Expo can resolve compatible versions.

For the init command, use <pm> create storybook with the flags shown below. Only npm needs -- before the flags. Never use npx/bunx etc for this.

Four setup flows based on project type:

  1. Expo (no router) - see references/expo-setup.md
  2. Expo with Expo Router - see references/expo-router-setup.md
  3. React Native CLI (no Expo) - see references/react-native-cli-setup.md
  4. Re.Pack (rspack/webpack) - see references/repack-setup.md

Flow Selection

  • Project has rspack.config or webpack.config and uses @callstack/repack -> Re.Pack
  • Project has app/ directory with _layout.tsx and uses expo-router -> Expo Router
  • Project uses Expo but not file-based routing -> Expo
  • Project uses @react-native-community/cli with no Expo -> React Native CLI

Common Steps (all flows)

1. Run CLI Init

npm create storybook -- --type react_native --yes
# or: pnpm create storybook --type react_native --yes
# or: bun create storybook --type react_native --yes

This installs dependencies and creates .rnstorybook/ with main.ts, preview.tsx, and index.tsx.

2. Enable WebSockets in .rnstorybook/index.tsx

Update the generated .rnstorybook/index.tsx to enable WebSocket support. This is required for remote control and syncing with the Storybook web companion:

Read the full file on GitHub · 121 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 · 121 lines · 102 tokens per session scan A 6f0a7ade144f

Subscribe to this mod's changes

setup-react-native-storybook is a skill published in the GitHub repository storybookjs/react-native (1,311 stars, last pushed 1mo ago), licensed MIT. It adds 102 tokens to every session and 1,273 once invoked, about $0.0005 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-30.

Related

Other skills, from other repositories

react-native-docs

Comprehensive React Native reference covering core components, APIs, styling, flexbox, navigation, networking, animations, platform-specific code, debugging, performance, TypeScript integration, Fast Refresh, environment setup, React fundamentals, running on devices, and the New Architecture (Fabric, JSI…

pledgeandgrow/pledge-skills · 97 tokens

mobile-development

React Native mobile app development patterns with Expo 54, Tamagui, and expo-router. Use when creating screens, components, or navigation in the mobile app.

Ampli-Group/agentic-mobile-blueprint · 36 tokens

rn-app-builder

基于真实项目沉淀的 React Native 移动端 App 一键构建方案。覆盖 Expo 初始化、monorepo 共享包、鉴权路由、API 适配、主题系统与构建发布。.

LSTM-Kirigaya/jinhui-skills · 53 tokens

animate-expo

Build animation and gestures in React Native and Expo with Reanimated worklets on the UI thread — sheets, drawers, screen transitions, swipe, drag, press feedback, haptics. Use when adding gestures to an Expo app, or when motion stutters, janks or drops frames on a real Android or iOS device.

ericrisco/rsc-harness · 70 tokens

expo-best-practices

Expo and React Native done right. Expo Router, EAS Build, native modules, platform-specific patterns, and navigation.

ofershap/expo-best-practices · 30 tokens

react-native-brownfield-migration

Provides an incremental adoption strategy to migrate native iOS or Android apps to React Native or Expo using @callstack/react-native-brownfield for initial setup. Use when planning migration steps, packaging XCFramework/AAR artifacts, and integrating them into host apps.

maikotrindade/awesome-react-native-skills · 59 tokens