react-native-restart CLAUDE.md

react-native-restart CLAUDE.md is an instructions file for coding agents from avishayil/react-native-restart. It costs 2,468 tokens per session, scanned A, original, MIT.

Repository instructions for react-native-restart, a React Native module that reloads an app's JavaScript code or restarts its process on supported platforms. It documents the project structure and public commands.

In plain words
What is it for?
Use it to understand the repository, call or maintain the restart API, check restart reasons, and work across the JavaScript, iOS, Android, and Windows parts.
Why use it?
It gives developers and coding agents a shared reference for how the module works and which platform implementations must stay consistent.

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/avishayil/react-native-restart/claude-md
Clone the repo
git clone --depth 1 https://github.com/avishayil/react-native-restart

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-restart CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/avishayil/react-native-restart/claude-md.svg)](https://agentmods.dev/instructions/avishayil/react-native-restart/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/avishayil/react-native-restart/claude-md"><img src="https://agentmods.dev/badge/instructions/avishayil/react-native-restart/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 2,468 This file is loaded in full into every session.
When invoked 2,468 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.02468 $0.02468
Opus 5 $0.01234 $0.01234
Sonnet 5 $0.00494 $0.00494
Haiku 4.5 $0.00247 $0.00247

Measured 5d ago against content hash 8056b377d2da, 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-restart 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 5d 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 · 182 lines

How it starts

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

CLAUDE.md

Guidance for AI agents (and humans) working in this repository. This is the canonical onboarding doc — AGENTS.md, README.md, and CONTRIBUTING.md point here.

What this is

react-native-restart is a React Native native module that reloads the running JS bundle at runtime (a programmatic "restart the app"). It is published to npm as react-native-restart.

It is a thin JS bridge over three native implementations (iOS, Android, Windows). There is almost no JS logic — the JS layer just forwards calls to a native module named RNRestart that exists on each platform.

Public API (see src/index.tsx):

Method Notes
RNRestart.restart(reason?) Restart the app. Preferred entry point. Android does a full process restart; iOS/Windows reload the bundle.
RNRestart.Restart(reason?) Deprecated — kept for backward compatibility; identical behavior.
RNRestart.getReason() Promise<string | null> — returns the last reason passed to a restart (survives the Android process restart).

Architecture

Four layers that must stay in sync:

JS bridge        src/index.tsx           ← NativeModules.RNRestart, default export RNRestart
   │             src/NativeRNRestart.ts   ← TurboModule spec (drives New-Architecture codegen)
   │
   ├─ iOS        ios/Restart.m|.h         ← RCTTriggerReloadCommandListeners (main thread)
   ├─ Android    android/src/main/java/com/reactnativerestart/
   │                 RestartModule.java       (ReactContextBaseJavaModule, name "RNRestart")
   │                 RestartPackage.java       (ReactPackage registration)
   │                 ReactInstanceHolder.java  (instance-manager holder interface)
   └─ Windows    windows/ReactNativeRestart/  (C++/WinRT, New-Architecture TurboModule + codegen)
  • iOS: Restart/restart store the reason, hop to the main thread, and call RCTTriggerReloadCommandListeners(...) to reload the bundle.
  • Android: RestartModule does a full process restart via ProcessPhoenix.triggerRebirth(...) (the com.jakewharton:process-phoenix dependency in android/build.gradle). The reason is persisted to SharedPreferences (synchronous commit(), since the process is killed immediately) and read back on next launch, so getReason() still works across the restart.
  • Windows: New-Architecture TurboModule; the spec in src/NativeRNRestart.ts is codegen'd into windows/ReactNativeRestart/codegen/ (see codegenConfig in package.json).

Read the full file on GitHub · 182 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. 5d ago First seen · 182 lines · 2,468 tokens per session scan A 8056b377d2da

Subscribe to this mod's changes

react-native-restart CLAUDE.md is an instructions file published in the GitHub repository avishayil/react-native-restart (991 stars, last pushed 12d ago), licensed MIT. It adds 2,468 tokens to every session, about $0.0123 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.