Guide for 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.
The expo-module skill provides a comprehensive guide for creating and managing native modules and views within Expo applications using the Expo Modules API. It addresses the challenge of integrating platform-specific functionality (iOS with Swift, Android with Kotlin) and bridging it to React Native through TypeScript. This skill ensures developers can efficiently scaffold, configure, and maintain native functionality without encountering common build issues, simplifying the process of extending Expo apps with custom native capabilities.
Key features include a clear module definition DSL, support for native view components with lifecycle management, shared object handling, configuration plugins for modifying native project files, autolinking setup, and a robust type system for consistent development. It also provides scaffolding commands to generate fully configured modules, guidance for cleaning up boilerplate code, and instructions for managing platform-specific files and dependencies such as CocoaPods for iOS. Developers can build both functional native modules and native view components, with examples for WebView integration and props/events handling.
This skill is intended for developers who need to extend Expo apps with custom native functionality, wrap existing platform SDKs for React Native consumption, or create config plugins to automate modifications in native project files. It is suitable for both individual developers and teams working on cross-platform mobile applications, particularly those who need precise control over module structure, type safety, and lifecycle behavior on iOS and Android platforms.
Use the `create-expo-module` command with the `--local` flag and provide the required parameters such as `--name`, `--description`, and `--package`. After scaffolding, ensure the module directory is renamed to match the kebab-case convention and run `cd ios && pod install` to update CocoaPods.
Yes, the skill supports building native modules for iOS using Swift and for Android using Kotlin, with TypeScript bridging to React Native.
No, the scaffold generates example functions, constants, and view components that should be removed or replaced with your actual implementation to match your module's requirements.
No, the scaffold generates `*.web.ts`/`*.web.tsx` files for web support, but these can be removed if the module is native-only. Also, update the `platforms` array in `expo-module.config.json` to remove 'web' if not needed.
Renaming the module directory without running `pod install` on iOS can cause build failures. Always ensure CocoaPods paths are updated after renaming or moving directories.
Quick Setup:
.claude/skills/Repository
expo/skills