Plugin check: Run
node "${PLUGIN_ROOT}/scripts/check-version.js"- if it outputs a message, show it to the user before proceeding.
📋 Shared instructions: shared-instructions.md — read first.
Working directory: before any project read or command, execute
native-artifact-compatibility.md Step 0.
Resolve --working-dir / owner context there; use the resolved absolute root for
every shell call and file tool, not a previous shell's cwd.
Add Native Capability
Entry routing: use the shared App feature entry points
preflight before the workflow below.
Generate a typed wrapper under src/native/ using the app's
release or unverified local context.
Screens import the wrapper instead of touching native packages directly.
Read native controls for conditional aggregate
adoption, legacy imports, permission boundaries, and location ownership.
Hard rules — do NOT cross these lines
- Never run
npx expo install,npm install, oryarn addfor a native module. Native support is fixed by the app-matched verified release and selected player/base, not the newest bundled template or the customer's manifest. - Never edit
app.config.js— plugins,ios.infoPlist,android.permissions, or anything else. Native config belongs to the verified fixed-capability base; arbitrary additions cannot be honored at rewrap time. - Never edit
package.jsondependenciesfor native modules. Native means the package ships platform source/projects, a podspec, codegen, an Expo module/config plugin, orreact-native.config.js; a package-name prefix alone is not proof. Pure-JavaScript dependencies are out of scope for/add-nativeand are installed from an approvedJavaScript Dependenciesplan by/create-mobile-appor/edit-app. - Do not claim Player/base support from package presence. Follow the shared local-development policy for approved wrappers against installed APIs; missing packages/APIs still block that capability, not trying the rest of the app. Do not install the controls aggregate or newer leaf to repair an older binary.
- Keep inclusion, declarations, grants, and usage separate. The base owns OS declarations. Dependency/config toggles do not remove unused default Android permissions; different declarations require another verified base. Optional permission wrapping is deferred.
Routing — `/add-native` is the public entry point
Some capabilities have a dedicated implementation helper that does more than a plain wrapper (camera writes scanner/upload helpers; PDF report/viewer helpers enforce local-vs-HTTPS boundaries; pen has native-control-specific validation). Users should still call /add-native <capability> for native controls. When a dedicated implementation exists, run it internally and do not ask the user to run that helper directly.
Lookup convention: after normalizing the capability, first check the internal-helper map below. For camera, image-picker, barcode-scanner, and qr-scanner, read and execute ${PLUGIN_ROOT}/skills/add-native/add-camera/SKILL.md inside this /add-native invocation. For pdf-report, read and execute ${PLUGIN_ROOT}/skills/add-native/add-pdf-report/SKILL.md. For pdf-viewer, read and execute ${PLUGIN_ROOT}/skills/add-native/add-pdf-viewer/SKILL.md. For pen-input, read and execute ${PLUGIN_ROOT}/skills/add-native/add-pen-input/SKILL.md. For geolocation, read and execute ${PLUGIN_ROOT}/skills/add-native/add-geolocation/SKILL.md. If no helper exists, fall through to this skill's inline wrapper flow.
Current dedicated implementations:
| Capability | Dedicated skill | Why dedicated |
|---|---|---|
| camera, take-photo, photo, expo-camera, image-picker, gallery, expo-image-picker, barcode-scanner, qr-scanner, scanner |