react-native CLAUDE.md

A set of instructions for Storybook React Native, a tool for previewing and testing React Native interface components. The project is a pnpm workspaces monorepo, meaning several related packages are developed together in one repository.

In plain words
What is it for?
Use it to install dependencies, run the example app, regenerate Storybook files, build documentation, lint, format and run tests.
Why use it?
It documents the commands and package structure needed to develop, generate examples, test and check the project consistently.

Instructions file

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 instructions/storybookjs/react-native/claude-md
Clone the repo
git clone --depth 1 https://github.com/storybookjs/react-native
Per session 783 This file is loaded in full into every session.
When invoked 783 The same file — it is already loaded in full.
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.00783 $0.00783
Opus 5 $0.00392 $0.00392
Sonnet 5 $0.00157 $0.00157
Haiku 4.5 $0.00078 $0.00078

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

Security

Grade A, and why

react-native CLAUDE.md 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.

CLAUDE.md · 96 lines

How it starts

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

This file provides guidance to agents when working with code in this repository.

Development Commands

# Initial Setup
pnpm install
pnpm build

# Development
pnpm dev        # Watch all packages for changes
pnpm example    # Run the expo example app with Storybook

# Story Generation
pnpm -F expo-example storybook-generate # Regenerate storybook.requires.ts

# Testing
pnpm test       # Run unit tests across all packages
pnpm test:ci    # Run tests in CI mode

# Code Quality
pnpm lint       # Run ESLint across the codebase
pnpm format:check   # Check Prettier formatting
pnpm format:fix     # Auto-fix Prettier formatting

# Documentation (from docs/ directory)
cd docs
pnpm start      # Start development server
pnpm build      # Build documentation
pnpm serve      # Serve built documentation

Architecture Overview

pnpm workspaces monorepo containing React Native Storybook packages.

Packages

Apps

  • examples/expo-example - Expo example app showcasing Storybook
  • docs - Documentation site for Storybook React Native

Core:

  • @storybook/react-native - Main package providing Storybook functionality
  • @storybook/react-native-ui - Full UI components for on-device Storybook
  • @storybook/react-native-ui-lite - Lightweight UI components
  • @storybook/react-native-ui-common - Shared UI components
  • @storybook/react-native-theming - Theming utilities

On-Device Addons:

  • @storybook/addon-ondevice-actions - Log component interactions
  • @storybook/addon-ondevice-backgrounds - Change story backgrounds
  • @storybook/addon-ondevice-controls - Dynamically edit component props
  • @storybook/addon-ondevice-notes - Add markdown documentation to stories

Build System & Metro Configuration

  • Uses tsup for TypeScript compilation (ES2022, CommonJS output)
  • Each package has its own tsup.config.ts
  • pnpm prepare in a package builds it

The withStorybook Metro wrapper (for Metro-based projects):

  • Enables unstable_allowRequireContext for dynamic story imports
  • Automatically generates storybook.requires.ts file
  • Optional WebSocket server for remote control
  • Can be conditionally enabled/disabled via enabled option
  • Supports liteMode for reduced bundle size

Read the full file on GitHub · 96 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 · 96 lines · 783 tokens per session scan A 7a6d2c63e991

Subscribe to this mod's changes

react-native CLAUDE.md is an instructions file published in the GitHub repository storybookjs/react-native (1,311 stars, last pushed 1mo ago), licensed MIT. It adds 783 tokens to every session, about $0.0039 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.