native-module

native-module is a command for Claude Code from TheBeardedBearSAS/claude-craft. It costs 8 tokens per session (3,852 once invoked), scanned A, original, MIT.

Guide Création Module Natif React Native.

Command for Claude Code

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 commands/thebeardedbearsas/claude-craft/native-module
Clone the repo
git clone --depth 1 https://github.com/TheBeardedBearSAS/claude-craft

Made for: Claude Code.

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 native-module

README.md
[![agentmods](https://agentmods.dev/badge/commands/thebeardedbearsas/claude-craft/native-module.svg)](https://agentmods.dev/commands/thebeardedbearsas/claude-craft/native-module)
Your own site
<a href="https://agentmods.dev/commands/thebeardedbearsas/claude-craft/native-module"><img src="https://agentmods.dev/badge/commands/thebeardedbearsas/claude-craft/native-module.svg" alt="Measured on agentmods" height="20"></a>
Per session 8 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,852 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin unknown 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.00008 $0.03852
Opus 5 $0.00004 $0.01926
Sonnet 5 $0.00002 $0.00770
Haiku 4.5 $0.00001 $0.00385

Measured today against content hash 658e4a01dc11, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

native-module 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 today.

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/commands/reactnative/native-module.md · 608 lines

How it starts

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

Guide Création Module Natif React Native

Tu es un développeur React Native senior. Tu dois guider la création d'un module natif (bridge) pour iOS et Android.

Arguments

$ARGUMENTS

Arguments :

  • Nom du module (ex: DeviceInfo, Biometrics, FileManager)
  • (Optionnel) Fonctionnalités : sync, async, events

Exemple : /reactnative:native-module Biometrics async,events

MISSION

Étape 1 : Structure du Module

src/
└── native/
    └── {ModuleName}/
        ├── index.ts          # API JavaScript
        ├── types.ts          # Types TypeScript
        └── NativeModule.ts   # Bridge avec TurboModule

android/
└── app/src/main/java/com/{package}/
    └── {modulename}/
        ├── {ModuleName}Module.kt      # Module principal
        └── {ModuleName}Package.kt     # Package registration

ios/
└── {AppName}/
    ├── {ModuleName}.swift             # Module Swift
    └── {ModuleName}-Bridging-Header.h # Header pour Obj-C bridge

Étape 2 : API JavaScript/TypeScript

// src/native/{ModuleName}/types.ts
export interface {ModuleName}Result {
  success: boolean;
  data?: unknown;
  error?: string;
}

export interface {ModuleName}Options {
  timeout?: number;
  // ...autres options
}

export type {ModuleName}EventType = 'onProgress' | 'onComplete' | 'onError';

export interface {ModuleName}Event {
  type: {ModuleName}EventType;
  payload: unknown;
}
// src/specs/Native{ModuleName}.ts  ← Codegen spec (New Architecture RN 0.85+)
import type { TurboModule } from 'react-native';
import { TurboModuleRegistry } from 'react-native';

// Codegen génère les bindings C++/ObjC/Java à partir de cette spec TypeScript.
// Exécuter `pod install` (iOS) ou `./gradlew generateCodegenArtifacts` (Android)
// après toute modification de cette interface.
export interface Spec extends TurboModule {
  // Méthode synchrone via JSI (réserver aux opérations < 1 ms)
  getConstant(): string;

  // Méthodes asynchrones
  authenticate(options: {[key: string]: unknown}): Promise<{[key: string]: unknown}>;
  isSupported(): Promise<boolean>;

  // Événements (Fabric EventEmitter)
  addListener(eventType: string): void;
  removeListeners(count: number): void;
}

// TurboModuleRegistry.getEnforcing lève une erreur claire si le module
// n'est pas lié — remplace l'ancien pattern NativeModules.{ModuleName} + Proxy.
export default TurboModuleRegistry.getEnforcing<Spec>('{ModuleName}');

Read the full file on GitHub · 608 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. today First seen · 608 lines · 8 tokens per session scan A 658e4a01dc11

Subscribe to this mod's changes

native-module is a command published in the GitHub repository TheBeardedBearSAS/claude-craft (105 stars, last pushed yesterday), licensed MIT. It adds 8 tokens to every session and 3,852 once invoked, about $0.0000 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.