build-nitro-modules
Build Nitro Modules
Overview
End-to-end skill for building a React Native Nitro Module: monorepo scaffolding via Nitrogen, TypeScript HybridObject spec authoring, native code generation, platform implementation (C++/Swift/Kotlin), example app wiring, and publish preparation.
Nitro Modules use a codegen pipeline (nitrogen) that reads .nitro.ts spec files and generates native C++/Swift/Kotlin boilerplate. You then fill in the implementation. This is fundamentally different from old-style turbo modules.
NEVER modify any file inside
nitrogen/generated/. These files are fully regenerated every timenpx nitrogenruns — any manual edits will be silently overwritten. Always edit only the.nitro.tsspec file, then re-run nitrogen to regenerate.
Ask First — Before Doing Anything
First, determine what the user wants to do:
"Are you creating a new Nitro Module library from scratch, or adding a new HybridObject to an existing library?"