build-nitro-modules

Automate React Native Nitro Module builds from scaffold to publish.

36|Updated Mar 7, 2026
One-click install
npx skills add https://github.com/riteshshukla04/agent-skills --skill build-nitro-modules
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: build-nitro-modules
Source: https://github.com/riteshshukla04/agent-skills/tree/main/skills/build-nitro-modules
Command: npx skills add https://github.com/riteshshukla04/agent-skills --skill build-nitro-modules

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Building cross-platform React Native native modules with Nitrogen involves many manual, error-prone steps: scaffolding a monorepo package, authoring .nitro.ts HybridObject specs, configuring nitro.json autolinking, running the Nitrogen codegen, implementing platform-specific native code (Swift/Kotlin/C++), wiring an example app, and preparing the package for npm publishing. This Skill codifies the full end-to-end workflow, guidance, and common fixes so maintainers can produce reliable, autolinkable Nitro modules without guessing path and configuration details.

Core Features & Use Cases

  • Monorepo scaffolding & workspace wiring: Step-by-step guidance to scaffold a package into packages/<name>, add example app, and set root workspaces.
  • Spec authoring & codegen: Instructions for writing .nitro.ts HybridObject specs, configuring nitro.json autolinking, and running npx nitrogen to generate native specs.
  • Native implementation patterns: Platform-specific implementation best practices and pitfalls for C++, Kotlin, and Swift, plus how to register and include files in build systems.
  • Example app & troubleshooting: How to create and wire an example app, fix Metro and Android Gradle paths, align versions, and run the example for validation.
  • Publishing readiness: Checklist for package.json files, inclusion of generated native glue code, podspecs, and npm pack verification.

Quick Start

Scaffold a new Nitro module in a monorepo, write the .nitro.ts spec, run Nitrogen to generate native specs, implement the native methods for your chosen platforms, wire an example app, and prepare package metadata for npm publishing.

Frequently Asked Questions about build-nitro-modules

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build React Native Nitro modules in a monorepo?

Building React Native Nitro modules in a monorepo requires scaffolding a package, authoring .nitro.ts HybridObject specs, running Nitrogen codegen, implementing native code, and wiring an example app before publishing.

How does Nitrogen codegen work for HybridObject specs?

Nitrogen codegen processes your authored .nitro.ts HybridObject specs to automatically generate the required native spec files, ensuring type-safe bridges across Swift, Kotlin, and C++ platforms for your module.

Can I useNitro modules with existing monorepo workspace configurations?

Yes, you can use Nitro modules with existing monorepo workspaces by correctly configuring the nitro.json autolinking, aligning react-native-nitro-modules versions, and setting up platform-specific native toolchains.

What's the best way to troubleshoot Metro and Android Gradle paths for Nitro modules?

The best way to troubleshoot Metro and Android Gradle paths for Nitro modules is to follow guided example app wiring steps that fix misaligned configurations, align versions, and validate the build runs correctly.

How do I prepare a Nitro module package for npm publishing?

To prepare a Nitro module package for npm publishing, you must complete a checklist ensuring package.json metadata is correct, generated native glue code is included, podspecs are configured, and npm pack verification passes.

Do I need platform-specific native toolchains to implement C++ and Swift in Nitro modules?

Yes, implementing C++, Kotlin, and Swift in Nitro modules requires platform-specific native toolchains and following best practices to register and include files correctly in the respective platform build systems.