AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
This skill provides a complete reference for building native modules and views in Expo using Swift for iOS, Kotlin for Android, and TypeScript for the JavaScript interface. It covers the module definition DSL, native view components, shared objects, configuration plugins, and lifecycle hooks. It emphasizes using the scaffolding tool to ensure correct project structure, autolinking, and build configuration.
What it does
- Provides a DSL for defining native modules and exposing functions to JavaScript
- Guides the creation of native UI components for Expo apps
- Explains how to write config plugins to modify native project files like Info.plist or AndroidManifest.xml
- Details the lifecycle hooks for modules and platform-specific application delegates
- Outlines the structure for expo-module.config.json to support autolinking
- Offers patterns for wrapping platform-specific SDKs for use in React Native
When to use it
- When you need to build a new native module or native view for an Expo project
- When you need to expose native platform functionality to your JavaScript code
- When you need to create a config plugin to automate native project modifications
- When you are adding support for a new platform (iOS, Android, or Web) to an existing module
Advantages
- Standardizes native module development across iOS and Android
- Simplifies native integration with built-in autolinking support
- Provides a consistent DSL for both Swift and Kotlin
- Enables deep customization of native build processes via config plugins
Usage examples
- “How do I create a new local Expo module with a function and an async function?”
- The agent will guide you to use the create-expo-module CLI with the --local flag and specify --features Function AsyncFunction to scaffold the necessary files.
- “How can I modify the AndroidManifest.xml of an Expo project using a plugin?”
- The agent will provide a code example using the withAndroidManifest config plugin function to add metadata or permissions to the manifest.
Install
Download the skill as a ZIP:
https://mp-staging.autogineer.com/agent-skills/expo/expo-module/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip expo-module.zip -d .agents/skills
Documentation by Expo
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
To migrate an existing Swift module from the definition DSL to the Expo Modules API 2.0 macros (@ExpoModule, @JS, @Event), use the expo-migrate-module skill (from the expo-experiments plugin) instead.
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 behaviorQuick 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 defaultsuse
--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() {
override fun definition() = ModuleDefinition {
Name("MyModule")
Function("hello") { name: String ->
"Hello $name!"
}
}
}TypeScript:
import { requireNativeModule } from "expo";
const MyModule = requireNativeModule("MyModule");
export function hello(name: string): string {
return MyModule.hello(name);
}expo-module.config.json
{
"platforms": ["android", "apple"],
"apple": {
"modules": ["MyModule"]
},
"android": {
"modules": ["expo.modules.mymodule.MyModule"]
}
}Note: iOS uses just the class name; Android uses the fully-qualified class name (package + class). See references/module-config.md for all fields.
Submitting Feedback
If you encounter errors, misleading or outdated information in this skill, report it so Expo can improve:
npx --yes @expo/agent-cli@latest feedback --category skills --subject "expo-module" "<actionable feedback>"Only submit when you have something specific and actionable to report. Include as much relevant context as possible.
If an agent repeatedly fails at an Expo task or the user has to step in, submit a brief report of the task, expected result, and what went wrong using --category evals and the relevant Expo package or command as --subject.
Files
- ATTRIBUTION.mdAdded by AutoGineer809 B
- LICENSELicence file added by AutoGineer1.1 KiB
- SKILL.md6.4 KiB
- agents/openai.yaml367 B
- references/config-plugin.md2.0 KiB
- references/create-expo-module.md9.8 KiB
- references/lifecycle.md3.7 KiB
- references/module-config.md1.7 KiB
- references/native-module.md5.7 KiB
- references/native-view.md3.5 KiB
ATTRIBUTION.md
Attribution
This folder is an unmodified copy of the Agent Skill "expo-module", distributed by AutoGineer (https://autogineer.com/agent-skills).
Commit: a9e5bd3fa00b4e61f632e43f85da73aee1942582
Published by: Expo (https://github.com/expo)
Publisher: Expo (https://github.com/expo)
Licence: MIT License (https://spdx.org/licenses/MIT.html)
Licence evidence: declared in the frontmatter ("license: MIT")
Retrieved: 2026-11-07
The skill's own files are unmodified copies. AutoGineer is not affiliated with or endorsed by the author or the publisher.
Files added by AutoGineer
ATTRIBUTION.md: this file, written by AutoGineer
LICENSE: copied from plugins/expo/LICENSE
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Needs: Needs Node.js
Security
What our scanner noticed· Low risk
- Instructions that use the network
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Published by
- Expo
- Publisher
- Expo (Official)
- Source
- expo/skills · plugins/expo/skills/expo-module · commit a9e5bd3
- Licence
- MIT License (redistribution allowed)
- LICENSE (added by AutoGineer from plugins/expo/LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by Expo.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download expo-module.zip