add-data-source
Guide the user to add a data source, connection, or API connector to a Canvas App via Power Apps Studio, then verify and…
Internal implementation skill invoked by /add-native for camera, image picker, barcode scanner, QR scanner, and camera/gallery Dataverse artifact workflows.
Claude Code
$ npx -y skills add microsoft/power-platform-skills --skill add-camera --agent claude-code
Codex
$ npx skills add microsoft/power-platform-skills --skill add-camera -a codex -y
Cursor
$ npx skills add microsoft/power-platform-skills --skill add-camera -a cursor -y
Gemini CLI
$ npx skills add microsoft/power-platform-skills --skill add-camera -a gemini-cli -y
GitHub Copilot
$ npx skills add microsoft/power-platform-skills --skill add-camera -a github-copilot -y
OpenCode
$ npx skills add microsoft/power-platform-skills --skill add-camera -a opencode -y
Windsurf
$ npx skills add microsoft/power-platform-skills --skill add-camera -a windsurf -y
name: add-camera description: Internal implementation skill invoked by /add-native for camera, image picker, barcode scanner, QR scanner, and camera/gallery Dataverse artifact workflows. user-invocable: false disable-model-invocation: true allowed-tools: Read, Edit, Write, Grep, Glob, Bash, AskUserQuestion model: sonnet
**Shared instructions: [shared-instructions.md](${PLUGIN_ROOT}/shared/shared-instructions.md)** — read first.
**Working directory:** before any project read or command, execute [native-artifact-compatibility.md Step 0](${PLUGIN_ROOT}/shared/references/native-artifact-compatibility.md#0-bind-every-operation-to-the-app-root). Inherit `/add-native`'s resolved absolute `working_dir`; bind every shell call and file tool to it, even when this helper starts from another directory.
**References:**
**Internal helper.** Users should invoke `/add-native camera`, `/add-native image-picker`, `/add-native barcode-scanner`, or `/add-native qr-scanner`; `/add-native` routes here after resolving the capability.
Generate typed camera + image-picker wrappers, an optional barcode/QR scanner control, and optional custom-upload guidance for Dataverse image/file workflows.
This skill **only writes JS files under `src/native/`**. It does not install modules or touch `package.json` / `app.config.js`. Only the modules required by the approved artifact set below must already ship in the template/native build; if a required module is missing, STOP. Do not require unrelated capture packages for a scanner-only or upload-only request.
Why: customer binaries are built from a pre-built rewrap base, not from the customer's `package.json`. Adding a native module here would compile against modules the binary doesn't actually contain, causing runtime crashes after rewrap. See [`/add-native`](../SKILL.md) for the same hard rules.
Required modules depend on the approved artifact set (all must already be in `package.json`):
| Requested artifact key | Required module | Output | |---|---|---| | `photo` / `gallery` | `expo-image-picker` | `camera.ts` capture/picker APIs | | `scanner` | `expo-camera` | `barcodeScanner.tsx` live scanner | | `upload` | `expo-file-system` | `cameraUpload.ts` custom Image helper |
Use the union for combined requests. A scanner-only request does not require `expo-image-picker` or `camera.ts`; an upload-only request does not require a capture/scanner package.
**Dataverse File/Image boundary:** for normal Dataverse File/Image form fields, screens should use `FilePicker` / `ImagePicker` from `@microsoft/power-apps-native-host` (see [`/add-native` File/Image Picker Ownership](../SKILL.md#fileimage-picker-ownership)). `/add-native camera` owns custom camera/gallery/scanner workflows, such as a dedicated evidence-capture screen, barcode/QR scan gate, or gallery-selected image that is transformed before saving.
**Pen/signature boundary:** signature, sign-off, ink, drawing, or pen capture belongs to `/add-native pen-input` (which routes internally to the pen helper). Both camera photos and pen signatures can persist to Dataverse Image/File columns, but the capture wrappers are separate.
1. Verify project → 2. Verify modules are template-shipped → 2a. Reconcile requested artifacts → 3. Apply camera decision → 3b. Apply scanner decision → 4. Confirm storage decision → 5. Apply upload decision → 6. Verify → 7. Summary
---
cd -- '<working_dir>' || { echo "BLOCKED: cannot enter working_dir" >&2; exit 1; }
test -f app.config.js && test -f power.config.json && test -f package.json || { echo "BLOCKED: working_dir is not an initialized app" >&2; exit 1; }If any file is missing, report and STOP — this skill requires an initialized Power Apps mobile app.
Resolve the approved artifact keys before this check. Missing/ambiguous intent returns to the owner (ask standalone); do not assume all artifacts. Substitute the exact JSON list, e.g. `["scanner"]` or `["photo","upload"]`, below:
Use the owner's normalized public capability to resolve those keys:
| Public capability | Artifact keys | |---|---| | `camera` | `["photo"]` | | `image-picker` | `["gallery"]` | | `barcode-scanner` | `["scanner"]` | | `qr-scanner` | `["scanner"]` |
For combined approved capabilities use the union. Add `upload` only for an explicitly approved custom Dataverse Image-upload helper, not automatically for capture or scanning. The checker accepts artifact-key JSON, not raw `$ARGUMENTS` or a public capability string. Missing/ambiguous intent still returns to the owner.
cd -- '<working_dir>' || { echo "BLOCKED: cannot enter working_dir" >&2; exit 1; }
node - '<approved-artifact-keys-json>' <<'NODE'
const p = require('./package.json');
const modules = {
photo: 'expo-image-picker',
gallery: 'expo-image-picker',
scanner: 'expo-camera',
upload: 'expo-file-system',
};
const artifacts = JSON.parse(process.argv[2]);
if (!Array.isArray(artifacts) || artifacts.length === 0
|| artifacts.some(key => typeof key !== 'string' || !Object.hasOwn(modules, key))) {
throw new Error('Expected a nonempty approved artifact list: photo, gallery, scanner, upload');
}
const need = [...new Set(artifacts.map(key => modules[key]))];
const missing = need.filter(name => !p.dependencies?.[name]);
if (missing.length) {
console.error('MISSING from package.json: ' + missing.join(', ') + '. Do not install native modules.');
process.exit(1);
}
console.log('OK: requested modules present');
NODEIf the check fails, STOP. Print the error verbatim. Do not run `npx expo install`. Do not edit `app.config.js`. Tell the user which requested modules the template lacks; they need template support, not an app-local native-package install.
Plugins from Microsoft that teach AI assistants, such as GitHub Copilot and Claude Code, to build on Power Platform.
Guide the user to add a data source, connection, or API connector to a Canvas App via Power Apps Studio, then verify and…
Creates or edits a Power Apps Canvas App through the Canvas Authoring MCP coauthoring session. Handles staged experience design,…
Configure the Canvas Authoring MCP server for the current coauthoring session. Use before starting to edit a canvas app with the…
Use this skill when the user wants to "report a bug", "file an issue", "report an issue", "submit a bug report", or report any…
Adds Azure DevOps connector to a Power Apps code app. Use when querying work items, creating bugs, managing pipelines, or making…
Adds any Power Platform connector to a Power Apps code app. Generic fallback for connectors not covered by a specific skill.
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.