react-native-patterns

react-native-patterns is a skill for Claude Code, Codex from kouroshez/coding-os. It costs 116 tokens per session (4,836 once invoked), scanned A, original, Apache-2.0.

A set of patterns for building bare React Native 0.76+ mobile apps with TypeScript, including screens, hooks, navigation, and native modules. It explains the newer system for connecting JavaScript code with iOS and Android code, plus Hermes, the JavaScript engine used by React Native.

In plain words
What is it for?
Use it when writing or reviewing mobile screens, hooks, native modules, navigation, Metro configuration, or iOS and Android code.
Why use it?
It helps avoid platform-specific bugs, slow frames, native crashes, and mistakes when using React Native's newer architecture.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is import type { LessonScreenProps } from '../../navigation/types';.

Good fit Use it when writing or reviewing mobile screens, hooks, native modules, navigation, Metro configuration, or iOS and Android code.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/kouroshez/coding-os
agentmods
npx agentmods add skills/kouroshez/coding-os/react-native-patterns

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for react-native-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/kouroshez/coding-os/react-native-patterns/github.svg)](https://agentmods.dev/skills/kouroshez/coding-os/react-native-patterns)
Your own site
<a href="https://agentmods.dev/skills/kouroshez/coding-os/react-native-patterns"><img src="https://agentmods.dev/badge/skills/kouroshez/coding-os/react-native-patterns/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for react-native-patterns

Your own site · 80×15
<a href="https://agentmods.dev/skills/kouroshez/coding-os/react-native-patterns"><img src="https://agentmods.dev/badge/skills/kouroshez/coding-os/react-native-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 116 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,836 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 4 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Privilege Escalation · line 302
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 449
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 483
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • medium Excessive Agency · line 90
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
How audits are shown
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.1 $0.00116 $0.04836
Opus 5 $0.00058 $0.02418
Sonnet 5 $0.00023 $0.00967
Haiku 4.5 $0.00012 $0.00484

Measured 5d ago against content hash 41c187288936, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

react-native-patterns 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 5d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/scan_rn_perf.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

src/templates/react-native/skills/react-native-patterns/SKILL.md · 513 lines

How it starts

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

React Native (Bare) — Patterns

For React Native 0.76+ where the New Architecture is the default. Bare RN, not Expo (Expo gets its own template later). TypeScript throughout. Hexagonal client architecture (see src/core/skills/hexagonal-architecture).

When to Use This Skill

  • Writing or reviewing a .tsx screen / .ts hook / .ts use case adapter under src/mobile/src/.
  • Authoring a TurboModule / Fabric component (Swift/Obj-C/Kotlin/Java).
  • Touching anything in src/mobile/ios/ or src/mobile/android/.
  • Configuring Metro / Hermes / R8 / ProGuard.
  • Debugging frame drops, JS-thread blocks, native crashes.

For cross-mobile-platform topics (navigation choices, offline-first, push notifications, deep links) see mobile-fundamentals.

The 0.76+ Baseline

Pin these and assume them everywhere:

  • React Native 0.76 or newer (New Architecture default; newArchEnabled=true).
  • React 18.3+.
  • TypeScript 5.5+, strict: true, noUncheckedIndexedAccess: true.
  • Hermes engine (default on both platforms).
  • Metro 0.81+ with package exports support.
  • Yarn 4 (berry) or pnpm — npm classic gets RN dep resolution wrong on edge cases.

If your project pre-dates 0.76, the upgrade is worth doing before adding meaningful new features. The legacy bridge will be removed in 0.79.

Project Structure

This skill assumes the hexagonal layout (per hexagonal-architecture skill, RN section). Critical recap:

src/mobile/src/
├── domain/                  # pure TS, no RN imports
├── application/             # use cases + ports
├── infrastructure/          # adapters: http/, storage/, push/, analytics/
├── delivery/                # UI: screens/, navigation/, providers/, components/
└── fakes/                   # in-memory adapters for tests + Storybook

The TS source root has strict isolation — no react-native import inside domain/, no axios inside application/, no useState inside infrastructure/. ESLint eslint-plugin-boundaries enforces this.

Read the full file on GitHub · 513 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. 5d ago First seen · 513 lines · 116 tokens per session scan A 41c187288936

Subscribe to this mod's changes

react-native-patterns is a skill published in the GitHub repository kouroshez/coding-os (6 stars, last pushed 2d ago), licensed Apache-2.0. It adds 116 tokens to every session and 4,836 once invoked, about $0.0006 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-09-03.

Related

Other skills, from other repositories