Skip to content
expo avatar

Expo Migrate Module

expo/skillsOfficial

Migrates an Apple/Swift Expo module from the 1.0 definition DSL to the 2.0 macro API without changing its JS contract.

CCM score
64 of 100
skills.sh installs
27.2K
GitHub stars
4.3K
last updated
Nov 27, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers Swift-side migration of @ExpoModule, @JS, @Event, @SharedObject, and @Record, using the existing JS/TypeScript surface as the compatibility contract
  • Requires Expo 58.0.21 or newer, checks installed versions first, and verifies each macro against the installed expo-modules-core before migrating
  • Classifies every 1.0 item as migrate, keep in DSL, or blocked, and prefers incremental mixed-mode results over speculative generated code
  • Preserves event payloads, async threading, overload names, expo-module.config.json autolinking, and lifecycle hooks, and leaves Kotlin and public type declarations untouched

Install

$ npx -y skills add expo/skills --skill expo-migrate-module -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Migrate an Expo Module

Migrate the Swift side of an existing Expo module without changing its observable JS API. Treat the current JS/TypeScript surface and tests as the compatibility contract. Leave Kotlin on the 1.0 DSL unless the user explicitly expands the task.

Prerequisite

Use expo 58.0.21 or newer. Earlier 58.0.x releases lack tuple conversion and the swift:check and swift:expand commands of expo-modules-cli. Older ones also lack lazy @JS properties, SharedRef<T> subclasses in @SharedObject, static shared-object members, and .withAsync, and the oldest lack closure arguments and free-form Any return values. SDK 57 also lacks .concurrent, @Union, and module auto-discovery. Do not target either. Before editing, check the installed version (npm ls expo, or the lockfile). If it is older, stop and tell the user to upgrade first.

Check the example app's own dependencies too, not only the module root. The example app is the integration surface you build and launch in step 4, so it needs the same floor.

Details

Repository
github.com/expo/skills
Category
Mobile Apps
First seen
Nov 27, 2026

Questions

What does the expo-migrate-module skill do?

It migrates the Swift side of an existing Expo native module from the Expo Modules API 1.0 definition DSL to the 2.0 macro API while keeping its JavaScript and TypeScript contract unchanged. It covers @ExpoModule, @JS, @Event, @SharedObject, and @Record in an existing module, and leaves Kotlin on the 1.0 DSL.

Which Expo version does the expo-migrate-module skill require?

It requires expo 58.0.21 or newer, since earlier 58.0.x releases lack tuple conversion and the swift:check and swift:expand commands. The example app's own dependencies must meet the same floor, and the skill tells you to stop and upgrade first if the installed version is older.

How do I install the expo-migrate-module skill?

Run npx -y skills add expo/skills --skill expo-migrate-module -y in your project. After installing, the agent can use the skill to convert an existing Apple/Swift Expo module to the 2.0 macro API.

Should I migrate my Expo module all at once with expo-migrate-module?

The skill advises against a wholesale conversion and recommends incremental mixed mode instead, because the 2.0 macros are experimental and undocumented in SDK 58 and their API can still change. It also says to tell the user this before a large migration.

More from expo/skills

All 29

Similar to Expo Migrate Module

More Mobile Apps