Official agent skill

Expo Migrate Module

by expo in expo/skills

Migrate an existing Apple/Swift Expo native module from the Expo Modules API 1.0 definition DSL to the 2.0 macro API (sometimes called v2) while preserving its JavaScript and TypeScript contract.

OfficialMITAuto-check passedMobile

Install Expo Migrate Module

skills CLI
$ npx skills add expo/skills --skill expo-migrate-module -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install expo/skills expo-migrate-module --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/expo/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/expo-experiments/skills/expo-migrate-module .claude/skills/expo-migrate-module && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
expo-migrate-module
GitHub stars
2.7k
Token cost
~2.6k tokens
SKILL.md length
1,434 words
Files
5 (incl. references)
Skills in repo
26
Repo updated
First seen
Licence
MIT

At a glance

Migrate an existing Apple/Swift Expo native module from the Expo Modules API 1.0 definition DSL to the 2.0 macro API (sometimes called v2) while preserving its JavaScript and TypeScript contract.

  • Works in 4 steps: Establish the contract → Verify the available 2.0 surface → Apply the migration → …
  • Incrementally adopting @ExpoModule
  • SKILL.md covers Prerequisite, References, Workflow and Handoff, plus 1 more section
  • Calls npx, npm and gh

What it does

Expo Migrate Module is an agent skill from expo/skills, published by the product's own GitHub organization. Migrate an existing Apple/Swift Expo native module from the Expo Modules API 1.0 definition DSL to the 2.0 macro API (sometimes called v2) while preserving its JavaScript and TypeScript contract. Use when converting or incrementally adopting @ExpoModule, @JS, @Event, @SharedObject, or @Record in an existing module. Do not use for creating a new module, general Expo SDK upgrades, or Android/Kotlin migrations.

Its SKILL.md is about 2.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files, including reference files (for example `agents/openai.yaml`, `references/compatibility.md` and `references/example.md`).

It sits in Mobile, covering Cross-platform mobile apps, iOS development and Android development. It works with Expo, Kotlin, TypeScript and JavaScript. The repository describes itself as: A collection of AI agent skills for working with Expo projects and Expo Application Services. The licence is MIT.

When your agent uses it

  • Incrementally adopting @ExpoModule
  • @Record in an existing module
  • Creating a new module
  • General Expo SDK upgrades

Example prompts

  • “/expo-migrate-module”

Requirements

  • Node.js

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Establish the contract
  2. Verify the available 2.0 surface
  3. Apply the migration
  4. Verify behavior

What it can do on your machine

Read from SKILL.md and the folder at commit d4f4840. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npx
    • npm
    • gh

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use npx, npm and gh, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Expo Migrate Module loads about 2.6k tokens when it runs, and up to ~13k if it reads all its reference files. Until then it costs about 108 tokens; SKILL.md has 1,434 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~108
When it runs · the whole SKILL.md, loaded when a task matches
~2.6k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~13k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from expo/skills at commit d4f4840, republished under its MIT licence (© expo). 1,434 words, ~2,601 tokens.

Download SKILL.mdSave it as .claude/skills/expo-migrate-module/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
name
expo-migrate-module
description
Migrate an existing Apple/Swift Expo native module from the Expo Modules API 1.0 definition DSL to the 2.0 macro API (sometimes called v2) while preserving its JavaScript and TypeScript contract. Use when converting or incrementally adopting @ExpoModule, @JS, @Event, @SharedObject, or @Record in an existing module. Do not use for creating a new module, general Expo SDK upgrades, or Android/Kotlin migrations.
version
1.0.0
license
MIT

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 57.0.21 or newer. Earlier 57.x versions can compile the macros but lack many of the 2.0 features and performance optimizations, so do not target them. Before editing, check the target's installed version (expo in package.json/lockfile, or npm ls expo). If it is older, stop and tell the user to upgrade first.

Check the example app's own package.json 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.

This is a floor, not a guarantee: the exact macro and core surface still varies within 57.x, so step 2 must still verify the checked-out source.

SDK 57 ships the macros as experimental and undocumented, with the official beta in SDK 58. The API can still change under you. Say this to the user before a large migration, and prefer incremental mixed mode over converting a module wholesale.

References

  • Read references/migration-map.md before changing source. It contains the 1.0-to-2.0 mappings, semantic traps, and mixed-mode rules.
  • Read references/example.md for a full before/after walkthrough of one module through mixed mode to a complete migration. Consult it when you need to see how the per-member rules compose.
  • Read references/compatibility.md when the checked-out expo-modules-core version or branch is not known to support every requested macro. It explains how to verify the actual compile-time and runtime surface instead of guessing from a version number, and lists what the macros plugin gained through 0.10.0.

Workflow

1. Establish the contract

Inspect repository instructions and the worktree before editing. Locate the Swift module classes, records, shared objects, native views, JS/TS bindings, tests, example app, podspec, expo-module.config.json, and installed or checked-out expo-modules-core.

Inventory every exported item before rewriting it:

  • module and shared-object JS names
  • function names, arity, labels, defaults, nullability, sync/async behavior, errors, and queue/thread semantics (note which AsyncFunction bodies do blocking or long-running work, and any .runOnQueue(...))
  • property names, mutability, and constant caching behavior
  • event wire names and payload shapes
  • record field names, defaults, requiredness, and nullability
  • shared-object constructors and instance/static placement (Function vs StaticFunction/StaticAsyncFunction)
  • lifecycle hooks and views

Use the TypeScript declarations and JS call sites to resolve ambiguity. Do not silently "improve" requiredness, rename an event, or change sync behavior during a syntax migration.

2. Verify the available 2.0 surface

Inspect the macro declarations and matching core hooks in the dependency actually used by the target. Do not assume that all items in the 2.0 design are present because one macro compiles.

Classify each 1.0 item as:

  • Migrate: both its macro and required core runtime support exist.
  • Keep in DSL: mixed mode preserves it safely, or 2.0 lacks an equivalent.
  • Blocked: migration would alter the JS contract or requires unavailable runtime support.

Prefer an incremental mixed-mode result over speculative generated code. Keep definition() for any remaining DSL elements; delete it only when it is empty and the resolved module name is preserved by @ExpoModule.

3. Apply the migration

Migrate one semantic group at a time: module naming, functions, properties/constants, events, shared objects, then records. Keep the diff narrow.

Follow these invariants:

  • Preserve every existing JS-visible name explicitly when Swift naming rules or macro defaults differ.
  • Keep original optional/default behavior. An optional 1.0 record field must not become required merely because 2.0 can express required fields.
  • Do not migrate same-JS-name overloads unless the checked-out macro groups and dispatches them.
  • Preserve async threading behavior. A 1.0 AsyncFunction body ran off the JS thread; a 2.0 async @JS member starts on it and leaves only at the first await. A body that never awaits therefore blocks the JS thread, with no change to the JS signature. Audit what runs before the first await, and never leave blocking I/O on the JS actor. Fix with @JS(.concurrent), or restructure onto Swift Concurrency or a continuation. Queue-pinned functions get the same treatment. See the threading section in references/migration-map.md.
  • Verify core support before migrating views, unions, synchronous events, shared-object static members, or free-form Any arguments. The macros plugin has shipped ahead of core on every one of these, so check the checked-out core rather than a plugin version, and leave unsupported members on the 1.0 DSL. references/compatibility.md has the per-capability checks.
  • Keep expo-module.config.json listing every module class under apple.modules. The entries are bare Swift class names, so renaming a class during migration detaches the module silently: it builds, then is absent at runtime. A migrated class must also stay public or open. SDK 58's auto-discovery is what retires these entries.
  • Do not change Kotlin, JS wrappers, or public .d.ts files unless the user requested an API change.
  • Never write macro-generated symbols into the module's source. The macro emits them; hand-writing or overriding them is not part of a migration.

After each group, search for old DSL entries and call sites that should have moved. Avoid broad formatting or unrelated cleanup.

Show full SKILL.md (589 more words)Show less
When a 2.0 equivalent is missing or a group fails

When step 2 classified an item as Blocked, or a migrated group fails to build or breaks the contract, do not force it. Stop on that group and:

  1. Ask the user how to proceed for that item, with two options:

    • Co-exist: keep the item in the 1.0 definition() DSL alongside the migrated @ExpoModule (mixed mode) and continue with the other groups.
    • Revert: back out the group's edits, leaving it untouched on 1.0, and move on.

    Default to co-existence when mixed mode is verified safe, since it preserves the most progress. Revert when the half-applied change left the module in a non-building state and cannot be salvaged incrementally.

  2. Open a tracking issue on expo/expo noting the functionality that 2.0 does not yet cover, so the gap is recorded rather than silently worked around. Use gh issue create --repo expo/expo and confirm with the user before posting (per repo conventions, do not post outward-facing comments without approval). Include:

    • the 1.0 member and its JS contract
    • the specific macro or core hook that is missing (cite the evidence gap from references/compatibility.md)
    • the expo-modules-core version/branch checked out

    Reference the issue in the handoff so the remaining DSL entry is traceable to a known limitation.

Keep going with the groups that do migrate cleanly; one blocked member does not block the rest.

4. Verify behavior

Run the narrowest available checks first, then the real integration surface:

  1. Build or type-check the Apple module against the target expo-modules-core.
  2. Run native unit tests and JS/TS tests.
  3. Build and launch the example app when the repository provides one.
  4. Confirm expo-module.config.json still names every module class under apple.modules, matching the Swift class names as they now stand. A stale entry builds clean and fails only at runtime, so the example app must actually resolve the module, not merely compile.
  5. Compare the final exported surface with the inventory from step 1.
  6. Search for stale Name, migrated Function/AsyncFunction/StaticFunction/StaticAsyncFunction/Property/Constant/Events entries, old sendEvent calls, @Field, and duplicate registrations. Search the source you wrote, not macro expansion output.

Expansion tests alone are insufficient: generated macro code can look correct while failing to link or run against a mismatched core. If dependencies changed or macro plugin flags are missing, reinstall JS dependencies as appropriate, run the repository's CocoaPods installation workflow, and restart Xcode before diagnosing plugin communication failures.

Handoff

Never print macro-generated or core-internal symbol names to the user. references/compatibility.md cites them so you can grep for them, but they are implementation details that change between plugin revisions, and they are noise in a report. Name a capability by its macro (@JS static, @Event(sync:)) and by observable JS behavior. Say "the installed core does not support decoding free-form dictionary arguments yet", not the name of the missing method. The exception is a tracking issue on expo/expo, where the specific missing hook is the point.

Report:

  • which members moved to 2.0
  • which members intentionally remain in the 1.0 DSL and why
  • any compatibility-sensitive choices, especially event names, record requiredness, constants, and queues
  • the commands run and any verification not completed

Submitting Feedback

If you encounter errors, misleading or outdated information in this skill, report it so Expo can improve:

bash
npx --yes submit-expo-feedback@latest --category skills --subject "expo-migrate-module" "<actionable feedback>"

Only submit when you have something specific and actionable to report. Include as much relevant context as possible. If an AI agent repeatedly failed or the user had to take over an Expo task, load the expo-skill-feedback skill and follow its eval-candidate flow instead of reusing the command above.

© expo, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 4 other files (references) in plugins/expo-experiments/skills/expo-migrate-module of expo/skills.

  • SKILL.md
  • agents/openai.yaml
  • references/compatibility.md
  • references/example.md
  • references/migration-map.md

Open the folder on GitHubat commit d4f4840

Compare with similar skills

Expo Migrate Module next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Expo Migrate Module compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Expo Migrate Module this skillexpo/skills2.7k—~2.6kAutomated safety check: PassMIT
Expo Brownfield Integrationmweinbach/agent-coworker1562 repos~900Automated safety check: NotesCustom licence
Simulator Audio E2Ehyochan/react-native-nitro-sound961—~1.1kAutomated safety check: PassMIT
Expo UIarcboxlabs/linkcode156—~1.2kAutomated safety check: PassMIT
Ksafeioannisa/KSafe332—~17kAutomated safety check: PassApache-2.0
KtormonitorCosminMihuMDC/KtorMonitor254—~2.5kAutomated safety check: PassApache-2.0

Similar skills

  • Expo Brownfield Integration

    mweinbach/agent-coworker

    Helps add Expo and React Native to an existing native iOS or Android app, and choose between a prebuilt AAR or XCFramework and a fully integrated build.

    156 GitHub starsUsed in 2 repos~900 tokens
    MobileAuto-check: notes
  • Simulator Audio E2E

    hyochan/react-native-nitro-sound

    Build and run repeatable react-native-nitro-sound recorder/player regression tests on an iOS Simulator or Android emulator, with explicit virtual-device selection, microphone permission, Maestro…

    961 GitHub stars~1.1k tokensUpdated 9 days ago
    MobileAuto-check passed
  • Expo UI

    arcboxlabs/linkcode

    Framework (OSS). An agent skill from arcboxlabs/linkcode.

    156 GitHub stars~1.2k tokensUpdated 11 days ago
    MobileAuto-check passed
  • Ksafe

    ioannisa/KSafe

    Required before any reply that touches KSafe (by ksafe(...), ksafe.get/put, :ksafe-compose, :ksafe-biometrics), even a 'can KSafe do X?' question or a one-line change that looks like plain Kotlin.

    332 GitHub stars~17k tokensUpdated 5 days ago
    MobileAuto-check passed
  • Ktormonitor

    CosminMihuMDC/KtorMonitor

    KtorMonitor is a Kotlin Multiplatform library for real-time HTTP traffic monitoring.

    254 GitHub stars~2.5k tokensUpdated 25 days ago
    MobileAuto-check passed
  • Code Review React Native

    talsec/Free-RASP-ReactNative

    Performs strict code reviews on React Native plugin projects covering TypeScript, the Kotlin (Android) and Swift (iOS) native bridges, and the Expo config plugin.

    175 GitHub stars~3.7k tokensUpdated 3 days ago
    MobileAuto-check passed

More from expo/skills

All 26 skills in this repo
  • Official

    Check the health of published EAS Update: crash rates, install/launch counts, unique users, payload size, and the split between embedded and OTA users per channel.

    2.7k GitHub starsUsed in 4 repos~3.1k tokens
    Auto-check passed
  • Eas Workflows

    expo/skills

    Official

    Helps understand and write EAS workflow YAML files for Expo projects.

    2.7k GitHub stars~1.2k tokensUpdated yesterday
    Auto-check passed
  • Expo App Clip

    expo/skills

    Official

    Add an iOS App Clip target to an Expo app. An agent skill from expo/skills.

    2.7k GitHub starsUsed in 2 repos~2.4k tokens
    Auto-check passed
  • Expo Skill Eval

    expo/skills

    Official

    Evaluate Expo skills in this repo end-to-end - trigger accuracy, generated code quality, and runtime screenshots on iOS simulator and Android emulator via Expo Go (web optional).

    2.7k GitHub stars~12k tokensUpdated yesterday
    Auto-check passed
  • Official

    Submit feedback on an Expo skill—or Expo itself—and control bundled anonymous usage telemetry (off by default / opt-in).

    2.7k GitHub stars~1.3k tokensUpdated yesterday
    Auto-check passed
  • Expo Module

    expo/skills

    Official

    Guide for creating and writing Expo native modules and views using the Expo Modules API (Swift, Kotlin, TypeScript).

    2.7k GitHub starsUsed in 1 repo~1.6k tokens
    Auto-check passed

Categories

Questions about Expo Migrate Module

What does Expo Migrate Module do?

Migrate an existing Apple/Swift Expo native module from the Expo Modules API 1.0 definition DSL to the 2.0 macro API (sometimes called v2) while preserving its JavaScript and TypeScript contract. Expo Migrate Module is an agent skill from expo/skills, published by the product's own GitHub organization.0 macro API (sometimes called v2) while preserving its JavaScript and TypeScript contract.

When should I use Expo Migrate Module?

Expo Migrate Module fits situations like: incrementally adopting @ExpoModule; @Record in an existing module; creating a new module; general Expo SDK upgrades.

How do I install Expo Migrate Module in Claude Code?

Run `npx skills add expo/skills --skill expo-migrate-module -a claude-code`. Or copy the skill folder (plugins/expo-experiments/skills/expo-migrate-module in expo/skills) into .claude/skills/expo-migrate-module in your project. Claude Code loads it when a task matches its description.

How do I install Expo Migrate Module in Codex?

Run `npx skills add expo/skills --skill expo-migrate-module -a codex`. Or copy the skill folder (plugins/expo-experiments/skills/expo-migrate-module in expo/skills) into .agents/skills/expo-migrate-module in your project. Codex loads it when a task matches its description.

Can I use Expo Migrate Module in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add expo/skills --skill expo-migrate-module -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/expo-migrate-module, .gemini/skills/expo-migrate-module, .github/skills/expo-migrate-module and .opencode/skills/expo-migrate-module in your project.

What does Expo Migrate Module need to run?

Going by SKILL.md and its folder, Expo Migrate Module needs the command-line tools its instructions call (npx, npm and gh). Our summary lists: Node.js.

Does Expo Migrate Module access the network?

SKILL.md contains no URLs. Its commands use npx, npm and gh, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Expo Migrate Module safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Expo Migrate Module use?

Expo Migrate Module is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Expo Migrate Module use?

About 2.6k tokens (SKILL.md is roughly 10k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 9.9k tokens, read only when the agent opens those files.

What are the alternatives to Expo Migrate Module?

Skills that share tags, products or a category with Expo Migrate Module: Expo Brownfield Integration (mweinbach/agent-coworker, 156 stars), Simulator Audio E2E (hyochan/react-native-nitro-sound, 961 stars), Expo UI (arcboxlabs/linkcode, 156 stars) and Ksafe (ioannisa/KSafe, 332 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Expo Migrate Module?

expo (a GitHub organization, an official publisher) maintains it in expo/skills, which has 2,680 GitHub stars. The repository holds 26 skills in this directory. The repository was last updated on October 7, 2026.

Source: expo/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.