expo-module
Guide for creating and writing Expo native modules and views using the Expo Modules API (Swift, Kotlin, TypeScript).
Skill by projectaki
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/projectaki-expo-module
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: backend, writing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions: not checked yet.
What's inside
- Skill name
expo-module- Description
- 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. Use when building or modifying native modules for Expo.
- License
- MIT
- Instructions
- 136 lines in SKILL.md · view on GitHub
Files (8)
- SKILL.md
- openai.yaml · agents/
- config-plugin.md · references/
- create-expo-module.md · references/
- lifecycle.md · references/
- module-config.md · references/
- native-module.md · references/
- native-view.md · references/
SKILL.md (first lines)
# 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](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 mode
- `expo.autolinking.nativeModulesDir`
- `add-platform-support` behavior and quirks
## Recommended Workflow
1. Choose the scaffold type first:
- **Local module** for one app
- **Standalone module** for reuse, monorepos, or publishing
2. Determine native `expo-module` features 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`
3. Scaffold deliberately:
- pass an explicit slug or path
- choose `--platform` intentionally instead of relying on defaults
- use `--features` to choose code samples which you will modify in the next step to match the real implementation.
4. Replace generated example code with the real implementation.
5. If you add a new platform later, prefer `add-platform-support` over manual file copying.
## Practical Scaffolding Rules
- Feature examples are **opt-in**. A newly scaffolded module may be minimal if no features were selected.
- `ViewEvent` implies `View`.
- Local modules do **not** generate an `index.ts` barrel by default. Use `--barrel` only if you want one.
- In non-interactive local scaffolding, pass the positional slug or path explicitly. `--name` changes the native class name, not the folder name.
- Local modules live in `expo.autolinking.nativeModulesDir` when configured, otherwise in `modules/`.
- 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):**
```swift
import ExpoModulesCore
public class MyModule: Module {
public func definition() -> ModuleDefinition {
Name("MyModule")
Function("hello") { (name: String) -> String in
return "Hello \(name)!"
}
}
}
```
**Kotlin (Android):**
```kotlin
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:**
```typescript
import { requireNativeModule } from "expo";
const MyModule = requireNativeModule("MyModule");
export function hello(name: string): string {
return MyModule.hello(name);
}
```From projectaki/.agents, MIT.
More from projectaki/.agents
- 0.553score
ensure-quality
projectaki
Check all proposed or implemented changes against every applicable AGENTS.md principle and resolve violations.
SkillAFreshness: AClaude Code +9 - 0.524score
factory-analyze-session
projectaki
Analyze a completed or interrupted software Factory session from its task directory or session reference.
SkillBFreshness: BClaude Code +9 - 0.521score
factory-draft-pr
projectaki
Publish one independently assured Factory change as a GitHub draft pull request.
SkillBFreshness: BClaude Code +9 - 0.516score
factory-assure
projectaki
Independently assure either a Factory implementation plan or an exact committed software change.
SkillBFreshness: BClaude Code +9 - 0.479score
expo-ui
projectaki
Build native UI with the @expo/ui package: real SwiftUI on iOS and Jetpack Compose on Android rendered from React in an Expo or React Native app.
SkillCFreshness: CClaude Code +9 - 0.474score
claude-cli
projectaki
Use only when explicitly requested by another workflow or the human to execute one isolated Claude CLI task in a specified repository with an explicit prompt…
SkillCFreshness: CClaude Code +9 - 0.471score
codex-cli
projectaki
Use only when explicitly requested by another workflow or the human to execute one isolated Codex CLI task in a specified repository.
SkillCFreshness: CClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Jun 13, 2026 (4 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/projectaki/.agents
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Same skill elsewhere
Copies of this SKILL.md published by others; search shows only one of them.
More from projectaki
- 0.553score
ensure-quality
projectaki
Check all proposed or implemented changes against every applicable AGENTS.md principle and resolve violations.
SkillAFreshness: AClaude Code +9 - 0.524score
factory-analyze-session
projectaki
Analyze a completed or interrupted software Factory session from its task directory or session reference.
SkillBFreshness: BClaude Code +9 - 0.521score
factory-draft-pr
projectaki
Publish one independently assured Factory change as a GitHub draft pull request.
SkillBFreshness: BClaude Code +9 - 0.516score
factory-assure
projectaki
Independently assure either a Factory implementation plan or an exact committed software change.
SkillBFreshness: BClaude Code +9 - 0.479score
expo-ui
projectaki
Build native UI with the @expo/ui package: real SwiftUI on iOS and Jetpack Compose on Android rendered from React in an Expo or React Native app.
SkillCFreshness: CClaude Code +9 - 0.474score
claude-cli
projectaki
Use only when explicitly requested by another workflow or the human to execute one isolated Claude CLI task in a specified repository with an explicit prompt…
SkillCFreshness: CClaude Code +9
Cite this page
expo-module skill. Agent Mart. https://agentmart.dev/skills/projectaki-expo-module (last updated 2026-10-24)