build-nitro-modules

Generate Nitro Module structure, TypeScript specs, and native code for C++, Swift, and Kotlin.

34|4|Updated Aug 9, 2024
One-click install
npx skills add https://github.com/huytdps13400/react-native-ssl-manager --skill build-nitro-modules-huytdps13400
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: build-nitro-modules
Source: https://github.com/huytdps13400/react-native-ssl-manager/tree/main/.agents/skills/build-nitro-modules
Command: npx skills add https://github.com/huytdps13400/react-native-ssl-manager --skill build-nitro-modules-huytdps13400

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires nitrogen, typescript, cpp, swift, kotlin, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill automates the building of Nitro Modules with Nitrogen, streamlining the creation of React Native native modules and providing a structured approach to Nitro-specific implementation.

Core Features & Use Cases

  • Automated Module Scaffolding: Create a new Nitro Module using Nitrogen, generating the necessary structure and configuration files.
  • HybridObject Spec Authoring: Author TypeScript HybridObject specs for Nitro Modules, defining the public API and native implementations.
  • Native Code Generation: Generate native code from .nitro.ts specs for C++, Swift, and Kotlin.
  • Example App Wiring: Provide instructions to set up an example app for testing and verifying the Nitro Module.
  • Publish Preparation: Offer guidance on preparing a Nitro Module for publishing, including codegen, platform implementation, and testing.
  • Use Case: When building a new Nitro Module, this Skill can automate the creation of the module structure, write the spec, generate native code, and prepare the module for testing and release.

Quick Start

Run the build-nitro-modules skill to generate the basic structure for a new Nitro Module, including TypeScript specs, C++/Swift/Kotlin implementations, and example app setup.

Frequently Asked Questions about build-nitro-modules

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

FAQPage Schema
How do I generate Nitro Modules for React Native?

Generating Nitro Modules involves using Nitrogen to scaffold the module structure and author TypeScript HybridObject specs. The build process then automatically generates the corresponding native C++, Swift, and Kotlin code implementations from these `.nitro.ts` spec files.

What is the process for creating a React Native native module with Nitrogen?

Creating a React Native native module with Nitrogen involves scaffolding the module structure, authoring TypeScript HybridObject specs to define the public API, generating native C++, Swift, and Kotlin code, and wiring an example app for testing and release preparation.

Do I need to know C++, Swift, and Kotlin to build Nitro Modules?

Yes, C++, Swift, and Kotlin are required dependencies for Nitro Module implementation. While Nitrogen automates native code generation from TypeScript specs, these languages are required to finalize the module and prepare it for publishing.

Can I set up an example app to test a newly generated Nitro Module?

Yes, you can set up an example app to test a newly generated Nitro Module. The build process provides instructions for wiring an example app, allowing you to verify the TypeScript spec and native implementations before publishing.

What's the best way to prepare a Nitro Module for publishing?

The best way to prepare a Nitro Module for publishing is to follow guidelines for codegen, platform implementation, and testing. This includes completing the native C++, Swift, and Kotlin implementations and verifying functionality within the wired example app.

How do TypeScript specs define the API for Nitro Modules?

TypeScript specs define the API for Nitro Modules by authoring HybridObject definitions in `.nitro.ts` files. These specs serve as the source of truth from which Nitrogen generates the corresponding native code for C++, Swift, and Kotlin platforms.