Skip to content
OpenAgentSkill
Browsing is open · Catalog captured 2026-11-21 · Automatic updates and account services are paused.
Documents

add-native

Public entry point for native device capabilities and native controls — camera, image picker, barcode/QR scanner, document picker, file picker, secure storage, file system, sharing, PDF generation/viewing, pen/signature capture, background GPS/geolocation tracking, or supported local file workflows — in a Power Apps mobile app. Also owns routing to internal camera/PDF/pen/geolocation implementation helpers and the guidance boundary between native wrappers and Dataverse File/Image host controls.

microsoft · Static checks on file

Installation

Read the source and dependencies before running a command. Copying does not install or execute anything.

npx skills add microsoft/power-platform-skills --skill add-native

About this skill


name: add-native description: Public entry point for native device capabilities and native controls — camera, image picker, barcode/QR scanner, document picker, file picker, secure storage, file system, sharing, PDF generation/viewing, pen/signature capture, background GPS/geolocation tracking, or supported local file workflows — in a Power Apps mobile app. Also owns routing to internal camera/PDF/pen/geolocation implementation helpers and the guidance boundary between native wrappers and Dataverse File/Image host controls. user-invocable: true allowed-tools: Read, Edit, Write, Grep, Glob, Bash, AskUserQuestion model: sonnet

📋 Shared instructions: shared-instructions.md — read first.

Add Native Capability

Generate a one-file typed wrapper under src/native/ for a native device capability that the upstream template already ships. Screens import the wrapper instead of touching Expo modules directly, so the discriminated-union result contract stays consistent across the app.

Hard rules — do NOT cross these lines

  1. Never run npx expo install, npm install, or yarn add for a native module. The set of native modules in package.json is fixed by the upstream template. Adding a new one breaks the rewrap pipeline (the customer's binary is built from a pre-built base, not from their package.json).
  2. Never edit app.config.js — plugins, ios.infoPlist, android.permissions, or anything else. All native config the template ships is intentional and signed off; arbitrary additions cannot be honored at rewrap time.
  3. Never edit package.json dependencies for native modules. Native means the package ships platform source/projects, a podspec, codegen, an Expo module/config plugin, or react-native.config.js; a package-name prefix alone is not proof. Pure-JavaScript dependencies are out of scope for /add-native and are installed from an approved JavaScript Dependencies plan by /create-mobile-app or /edit-app.
  4. If the requested module isn't actually present in package.json — STOP. That means the upstream template hasn't shipped it yet; do not work around by installing it.

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:

CapabilityDedicated skillWhy dedicated
camera, take-photo, photo, expo-camera, image-picker, gallery, expo-image-picker, barcode-scanner, qr-scanner, scanneradd-camera internal helperOwns photo capture, gallery image picking, and barcode/QR scanner controls backed by expo-camera / expo-image-picker
pdf-report, pdf-export, generate-pdf, print-report, evidence-packetadd-pdf-report internal helperGenerates app-owned local PDFs with expo-print and shares them only when expo-sharing is present
pdf-viewer, native-pdf-viewer, pdf-control, open-pdf, @microsoft/power-apps-native-pdf-vieweradd-pdf-viewer internal helperEnforces https:// / file:// viewer inputs and native viewer result handling
pen-input, signature, ink, draw, @microsoft/power-apps-native-pen-inputadd-pen-input internal helperCaptures PNG data URI and documents Dataverse Image/File persistence
geolocation, location-tracking, background-location, gps-tracking, geo-tracking, @microsoft/power-apps-native-bglocationadd-geolocation internal helperNative background GPS tracking with durable storage and inline Dataverse sync; distinct from one-shot expo-location

For every other capability listed below, this skill writes the wrapper directly.

Native capability gate

Before adding any native control or wrapper, apply every gate: classify the intent, resolve the exact package/control from the live package.json, confirm it is not runtime-banned, confirm the input/output/storage constraints, then use the matching route below. If any gate fails, the native functionality is not supported for this app version — do not install packages, edit native config, or create fake wrappers.

User intentAdd/useRequired package or controlDo not use / fallback
Form field bound to a Dataverse File columnHost <FilePicker> in screen JSX@microsoft/power-apps-native-host host controlDo not generate document-picker/file-system/sharing wrappers for this field
Form field bound to a Dataverse Image columnHost <ImagePicker> in screen JSX@microsoft/power-apps-native-host host controlDo not use camera/image-picker wrappers for normal form-bound image fields
Dedicated photo/gallery/scanner workflow/add-native camera, `image
Read the complete source ↗