expo-module
Helps your agent build native parts for Expo apps. It lets the agent use Swift and Kotlin code to build mobile-specific features.
What it does
This guide helps you create and write 'native modules' and 'native views' for Expo apps. It uses a special API called the Expo Modules API to connect Swift (iOS), Kotlin (Android), and TypeScript code.
When to use it
- ✓When you need to add new functionality to your Expo app that doesn't exist natively.
- ✓When integrating a platform SDK (like camera or sensors) that doesn't have direct React Native support.
- ✓To create custom visual components that work on both iOS and Android.
Example of what to ask your AI
“How do I create a new native module for my Expo app using the Expo Modules API?”
Want more? Open the sections below.
How to use
The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.
Skill link
Ready-to-paste message
How it works
You use a command called `create-expo-module` to generate the basic structure of your module. Then, you edit the generated Swift (for iOS) and Kotlin (for Android) files to define your functionalities, using TypeScript for the JavaScript part.
Installation
Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.
In the terminal (Claude Code, Codex, Cursor), in your project folder:
npx skills add sickn33/agentic-awesome-skills --skill expo-moduleOr download just the file:
curl -L https://raw.githubusercontent.com/sickn33/agentic-awesome-skills/main/plugins/agentic-awesome-skills-claude/skills/expo-module/SKILL.md -o SKILL.mdTechnical content (original SKILL.md)
Original text by the author, straight from GitHub.
Writing Expo Modules
Complete reference for building native modules and views using the Expo Modules API. Covers Swift (iOS), Kotlin (Android), and TypeScript.
When to Use
- Creating a new Expo native module or native view
- Adding native functionality (camera, sensors, system APIs) to an Expo app
- Wrapping platform SDKs for React Native consumption
- Building config plugins that modify native project files
- Adding Android, Apple, or web support to an existing Expo module
- Editing
expo-module.config.json, config plugins, or lifecycle hooks
References
Consult these resources as needed:
references/
create-expo-module.md Scaffolding and add-platform-support workflow, defaults, and quirks
native-module.md Module definition DSL: Name, Function, AsyncFunction, Property, Constant, Events, type system, shared objects
native-view.md Native view components: View, Prop, EventDispatcher, view lifecycle, ref-based functions
lifecycle.md Lifecycle hooks: module, iOS app/AppDelegate, Android activity/application listeners
config-plugin.md Config plugins: modifying Info.plist, AndroidManifest.xml, reading values in native code
module-config.md expo-module.config.json fields, file placement, and autolinking behavior
Quick Start
Prefer create-expo-module over manually creating native module files and directories. In practice, the best path is usually to create the scaffold first and then build on top of it. The scaffold sets up the expected layout, expo-module.config.json, podspec or Gradle files, TypeScript bindings, and the standalone example app flow.
If an existing Expo module only needs another platform, use create-expo-module add-platform-support instead of manually copying native directories.
See references/create-expo-module.md before scaffolding or extending a module. It covers:
- local vs standalone modules
--platform,--features,--barrel,--package-manager, and non-interactive modeexpo.autolinking.nativeModulesDiradd-platform-supportbehavior and quirks
Recommended Workflow
- Choose the scaffold type first:
- Local module for one app
- Standalone module for reuse, monorepos, or publishing
- Determine native
expo-modulefeatures that you will need.- Based on the user's instructions determine which feature scaffolding will be useful.
- Available features:
Constant,Function,AsyncFunction,Event,View,ViewEvent,SharedObject
- Scaffold deliberately:
- pass an explicit slug or path
- choose
--platformintentionally instead of relying on defaults - use
--featuresto choose code samples which you will modify in the next step to match the real implementation.
- Replace generated example code with the real implementation.
- If you add a new platform later, prefer
add-platform-supportover manual file copying.
Practical Scaffolding Rules
- Feature examples are opt-in. A newly scaffolded module may be minimal if no features were selected.
ViewEventimpliesView.- Local modules do not generate an
index.tsbarrel by default. Use--barrelonly if you want one. - In non-interactive local scaffolding, pass the positional slug or path explicitly.
--namechanges the native class name, not the folder name. - Local modules live in
expo.autolinking.nativeModulesDirwhen configured, otherwise inmodules/. - Standalone modules have their own package metadata, scripts, and usually an example app. Local modules use the host app's tooling instead.
Core File Shapes
The Swift and Kotlin DSL share the same structure. Swift is usually the clearest primary example; consult the references for feature-specific details.
Module Structure Reference
The Swift and Kotlin DSL share the same structure. Both platforms are shown here for reference — in other reference files, Swift is shown as the primary language unless the Kotlin pattern meaningfully differs.
Swift (iOS):
import ExpoModulesCore
public class MyModule: Module {
public func definition() -> ModuleDefinition {
Name("MyModule")
Function("hello") { (name: String) -> String in
return "Hello \(name)!"
}
}
}
Kotlin (Android):
package expo.modules.mymodule
import expo.modules.kotlin.modules.Module
import expo.modules.kotlin.modules.ModuleDefinition
class MyModule : Module() {
…
FAQ
What are 'native modules' and 'native views'?
Native modules are pieces of code that run directly on the phone's system (iOS or Android) and that you can call from your JavaScript code. Native views are visual components (like buttons or lists) that are also created with native code.
Do I need to know Swift and Kotlin to use this?
Yes, you will need to write code in Swift for iOS and Kotlin for Android to implement the logic of your native module. The guide explains how to do this using the Expo Modules API.
What are 'config plugins'?
Config plugins are a feature that allows you to automatically modify your project's native configuration files (like `AndroidManifest.xml` on Android or `Info.plist` on iOS) when you build your app.
Details
Original description by the author
Guide for creating and writing Expo native modules and views using the Expo Modules API (Swift, Kotlin, TypeScript). Covers module definition DSL, native views, shared objects, config plugins, lifecycle hooks, autolinking, and type system.
Popularity
- GitHub stars
- 48k
- Ranking position
- #2961
- License
- MIT
- Updated
- 10/15/2026
Comments
- …
More skills from this repository
00-andruia-consultant
Helps your agent start or improve AI projects. It analyzes code, suggests tools, and creates action plans in Spanish.
sickn33/agentic-awesome-skills
007
Lets your agent perform security audits and threat modeling. It's useful for protecting projects against attacks and vulnerabilities.
sickn33/agentic-awesome-skills
10-andruia-skill-smith
Helps your agent create or improve AI tools. It defines how tools work, writes documentation, and validates the structure.
sickn33/agentic-awesome-skills
20-andruia-niche-intelligence
Lets your agent create a summary about a specific industry. It's useful for understanding the context, rules, usage patterns, and risks of a project, using reliable sources.
sickn33/agentic-awesome-skills
Similar skills
android-clean-architecture
Makes your agent organize Android projects efficiently. It structures the code to make maintenance and new feature development easier.
affaan-m/ECC
compose-multiplatform-patterns
Helps your agent use Compose Multiplatform and Jetpack Compose patterns in KMP projects. It covers state management, navigation, theming, and performance. Useful for creating consistent UIs.
affaan-m/ECC
dart-flutter-patterns
Makes your agent write code for Dart and Flutter apps. It uses modern patterns to create robust and manageable apps.
affaan-m/ECC