add-native-module

Create and register C/C++ native modules for mikrojs with JavaScript access.

11|Updated Apr 25, 2026
One-click install
npx skills add https://github.com/mikrojs/mikrojs --skill add-native-module
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-native-module
Source: https://github.com/mikrojs/mikrojs/tree/main/.agents/skills/add-native-module
Command: npx skills add https://github.com/mikrojs/mikrojs --skill add-native-module

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Developers need to expose new hardware peripherals and C API functions to JavaScript within the mikrojs environment, enabling custom device integrations.

Core Features & Use Cases

  • Hardware Binding: Create bindings for GPIO, SPI, I2C, UART, and other peripherals to extend device capabilities.
  • API Exposure: Register custom C functions and classes to be accessible from JavaScript code.
  • Use Case: For example, adding a native:adc module to read analog inputs and integrate it into a JavaScript IoT application.

Quick Start

Use the add-native-module skill to generate a new native module, register functions or classes, and build into the mikrojs firmware.

Frequently Asked Questions about add-native-module

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

FAQPage Schema
How do I expose C++ hardware peripherals to JavaScript in embedded development?

Yes, you can register custom C functions and classes to be accessible from JavaScript by creating a native module. This allows direct hardware control and API customization for embedded development tasks.

What do I need to build custom microcontroller modules with C++?

Building custom microcontroller modules requires knowledge of C++, QuickJS, and ESP-IDF build configurations. You need these tools to compile native code and register custom functions into the firmware environment.

How do I add a native ADC module to read analog inputs in JavaScript?

To add a native ADC module to read analog inputs, you generate a native module, register the C++ functions, and build it into the firmware. This exposes the `native:adc` module to your JavaScript IoT application.

Can I create custom GPIO, SPI, and I2C bindings for microcontrollers?

Yes, you can create custom bindings for GPIO, SPI, I2C, and other peripherals to extend device capabilities. This hardware binding process connects physical interfaces directly to JavaScript APIs.

What is the process for integrating C API functions into a JavaScript environment?

Integrating C API functions into a JavaScript environment requires creating, registering, and building native modules. This process bridges C code with JavaScript access, enabling custom system functions and hardware interactions.