정보
이 스킬은 개발자들이 기존 Apple/Swift Expo 네이티브 모듈을 Expo Modules API 1.0 DSL에서 2.0 매크로 API로 마이그레이션하면서 JavaScript/TypeScript 호환성을 유지하도록 돕습니다. 특히 @ExpoModule, @JS, @Event, @SharedObject, @Record와 같은 새로운 데코레이터로의 변환을 처리합니다. 이는 새로운 모듈 생성이나 Android/Kotlin 업그레이드가 아닌, 점진적인 Swift 마이그레이션에만 사용하세요.
빠른 설치
Claude Code
추천npx skills add expo/skills -a claude-code/plugin add https://github.com/expo/skillsgit clone https://github.com/expo/skills.git ~/.claude/skills/expo-migrate-moduleClaude Code에서 이 명령을 복사하여 붙여넣어 스킬을 설치하세요
문서
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
The Expo Modules API 2.0 macros require expo 57.0.7 or newer. 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; do not attempt the migration against an unsupported version. 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.
References
- Read
references/migration-map.mdbefore changing source. It contains the 1.0-to-2.0 mappings, semantic traps, and mixed-mode rules. - Read
references/example.mdfor 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.mdwhen the checked-outexpo-modules-coreversion 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 an SDK number.
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, 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 semantics
- 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
- 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.
- Do not migrate queue-pinned DSL functions as-is; restructure onto Swift Concurrency or dispatch to the original queue via a continuation, per the async-function rules in
references/migration-map.md. - Do not migrate views, unions, synchronous events, or shared-object static functions without verified support.
- Do not change Kotlin, JS wrappers, or public
.d.tsfiles unless the user requested an API change.
After each group, search for old DSL entries and call sites that should have moved. Avoid broad formatting or unrelated cleanup.
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:
-
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.
- Co-exist: keep the item in the 1.0
-
Open a tracking issue on
expo/exponoting the functionality that 2.0 does not yet cover, so the gap is recorded rather than silently worked around. Usegh issue create --repo expo/expoand 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-coreversion/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:
- Build or type-check the Apple module against the target
expo-modules-core. - Run native unit tests and JS/TS tests.
- Build and launch the example app when the repository provides one.
- Compare the final exported surface with the inventory from step 1.
- Search for stale
Name, migratedFunction/Property/Constant/Eventsentries, oldsendEventcalls,@Field, and duplicate registrations.
Expansion tests alone are insufficient: generated macro code can look correct while failing against mismatched core symbols. 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
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
GitHub 저장소
자주 묻는 질문
expo-migrate-module Skill이란 무엇인가요?
expo-migrate-module은(는) expo이(가) 만든 Claude Skill입니다. Skill은 Claude가 필요할 때 불러오는 지침과 리소스를 묶어 추가 프롬프트 없이 expo-migrate-module 관련 작업을 수행할 수 있게 합니다.
expo-migrate-module은(는) 어떻게 설치하나요?
이 페이지의 설치 명령을 사용하세요. expo-migrate-module을(를) Claude Code 플러그인으로 추가하거나 저장소를 skills 디렉터리에 복제한 다음 Claude를 다시 시작해 Skill을 불러옵니다.
expo-migrate-module은(는) 어떤 카테고리에 속하나요?
expo-migrate-module은(는) 메타 카테고리에 속합니다.
expo-migrate-module은(는) 무료로 사용할 수 있나요?
네. expo-migrate-module은(는) AIMCP에 등록되어 있으며 무료로 설치할 수 있습니다.
연관 스킬
이 스킬은 콘텐츠 콜렉션(Content Collections)을 위한 프로덕션 검증된 설정을 제공합니다. 콘텐츠 콜렉션은 Markdown/MDX 파일을 Zod 검증이 포함된 타입 안전한 데이터 콜렉션으로 변환해주는 TypeScript 최우선 도구입니다. 블로그, 문서 사이트 또는 콘텐츠 중심의 Vite + React 애플리케이션을 구축할 때 타입 안전성과 자동 콘텐츠 검증을 보장하기 위해 사용하세요. Vite 플러그인 구성과 MDX 컴파일부터 배포 최적화 및 스키마 검증에 이르기까지 모든 것을 다룹니다.
이 스킬은 개발자들이 Polymarket 예측 시장 플랫폼을 활용한 애플리케이션을 구축할 수 있도록 지원하며, 거래 및 시장 데이터를 위한 API 통합 기능을 포함합니다. 또한 WebSocket을 통한 실시간 데이터 스트리밍을 제공하여 실시간 거래와 시장 활동을 모니터링할 수 있습니다. 이를 통해 거래 전략을 구현하거나 실시간 시장 업데이트를 처리하는 도구를 생성하는 데 활용할 수 있습니다.
이 스킬은 개발자들이 명령어, 파일, LSP 작업 등 25개 이상의 이벤트 유형에 연결되는 OpenCode 플러그인을 만들 수 있도록 돕습니다. JavaScript/TypeScript 모듈을 위한 플러그인 구조, 이벤트 API 명세, 구현 패턴을 제공합니다. OpenCode AI 어시스턴트의 라이프사이클을 사용자 정의 이벤트 기반 로직으로 가로채거나, 모니터링하거나, 확장해야 할 때 사용하세요.
SGLang은 RadixAttention 프리픽스 캐싱을 활용하여 JSON, 정규식, 에이전트 워크플로우를 위한 고속 구조화 생성에 특화된 고성능 LLM 서빙 프레임워크입니다. 특히 반복되는 프리픽스가 있는 작업에서 상당히 빠른 추론 속도를 제공하여 복잡한 구조화 출력 및 다중 턴 대화에 이상적입니다. 제약 디코딩이 필요하거나 광범위한 프리픽스 공유가 있는 애플리케이션을 구축할 때는 vLLM과 같은 대안보다 SGLang을 선택하십시오.
