create-native-module

create-native-module is a command for Claude Code from armanzeroeight/fastagent-plugins. It costs 13 tokens per session (862 once invoked), scanned A, original, MIT.

A command that creates the starter files for a React Native native module, with implementations for both iOS and Android.

In plain words
What is it for?
Use it when creating a module for native device features or other iOS and Android functionality that JavaScript cannot provide directly.
Why use it?
It removes the repetitive boilerplate needed to connect JavaScript to platform-specific mobile code.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: positional $N argument.

Good fit Use it when creating a module for native device features or other iOS and Android functionality that JavaScript cannot provide directly.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/armanzeroeight/fastagent-plugins/create-native-module
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.

Clone the repo
git clone --depth 1 https://github.com/armanzeroeight/fastagent-plugins

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/armanzeroeight/fastagent-plugins/create-native-module/github.svg)](https://agentmods.dev/commands/armanzeroeight/fastagent-plugins/create-native-module)
Your own site
<a href="https://agentmods.dev/commands/armanzeroeight/fastagent-plugins/create-native-module"><img src="https://agentmods.dev/badge/commands/armanzeroeight/fastagent-plugins/create-native-module/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 create-native-module

Your own site · 80×15
<a href="https://agentmods.dev/commands/armanzeroeight/fastagent-plugins/create-native-module"><img src="https://agentmods.dev/badge/commands/armanzeroeight/fastagent-plugins/create-native-module.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 13 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 862 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.
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.00013 $0.00862
Opus 5.5 $0.00005 $0.00345
Sonnet 5.5 $0.00003 $0.00172
Haiku 4.5 $0.00001 $0.00086

Measured 1mo ago against content hash 49c566d5bc25, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

create-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 1mo 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.

plugins/react-native-toolkit/commands/create-native-module.md · 138 lines

How it starts

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

Create Native Module

Generate boilerplate for a new React Native native module with iOS and Android implementations.

Context

  • Current directory: !pwd
  • Existing modules: !find . -name "*.java" -o -name "*.m" | grep -i module | head -5

Your Task

Create a new React Native native module with complete iOS and Android implementations.

Arguments

  • $1: Module name (e.g., "MyModule", "CameraHelper")

Steps

  1. Validate module name

    • Ensure name is provided
    • Check name follows PascalCase convention
    • Verify module doesn't already exist
  2. Create directory structure

    <ModuleName>/
    ├── ios/
    │   ├── <ModuleName>.h
    │   └── <ModuleName>.m
    ├── android/
    │   └── src/main/java/com/<modulename>/
    │       ├── <ModuleName>Package.java
    │       └── <ModuleName>.java
    ├── js/
    │   └── Native<ModuleName>.ts
    └── package.json
    
  3. Generate iOS implementation

    • Create header file (.h) with RCTBridgeModule protocol
    • Create implementation file (.m) with:
      • RCT_EXPORT_MODULE()
      • Example synchronous method
      • Example async method with Promise
      • Example event emitter setup
  4. Generate Android implementation

    • Create module class extending ReactContextBaseJavaModule
    • Implement getName() method
    • Add example synchronous method
    • Add example async method with Promise
    • Create package class implementing ReactPackage
  5. Generate TypeScript interface

    • Create type-safe interface for the module
    • Include example method signatures
    • Add JSDoc comments
  6. Create package.json

    • Set up module metadata
    • Configure for auto-linking
    • Add codegenConfig for Turbo Modules (optional)
  7. Provide usage instructions

    • How to link the module
    • How to use in JavaScript
    • How to test on iOS and Android
    • Next steps for implementation

Output Format

# Native Module Created: <ModuleName>

## Files Created
- iOS: ios/<ModuleName>.h, ios/<ModuleName>.m
- Android: android/src/main/java/com/<modulename>/<ModuleName>.java
- Android: android/src/main/java/com/<modulename>/<ModuleName>Package.java
- TypeScript: js/Native<ModuleName>.ts
- Config: package.json

## Usage

### JavaScript
\`\`\`javascript
import { NativeModules } from 'react-native';
const { <ModuleName> } = NativeModules;

// Use the module
const result = await <ModuleName>.exampleMethod();
\`\`\`

### iOS Setup
1. Run: cd ios && pod install
2. Rebuild: npx react-native run-ios

### Android Setup
1. Add to MainApplication.java:
   \`\`\`java
   new <ModuleName>Package()
   \`\`\`
2. Rebuild: npx react-native run-android

## Next Steps
1. Implement your custom methods in native code
2. Update TypeScript interface to match
3. Test on both platforms
4. Add error handling and validation
5. Write unit tests

Read the full file on GitHub · 138 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. 1mo ago First seen · 138 lines · 13 tokens per session scan A 49c566d5bc25

Subscribe to this mod's changes

create-native-module is a command published in the GitHub repository armanzeroeight/fastagent-plugins (28 stars, last pushed 2mo ago), licensed MIT. It adds 13 tokens to every session and 862 once invoked, about $0.0001 per session on Opus 5.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.