You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: plugins/mobile-apps/AGENTS.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ This file provides guidance to AI Agents when working with the **mobile-app** pl
8
8
9
9
A plugin for building and deploying **Power Apps code apps that run as native mobile + web apps** using Expo + React Native + TypeScript. Connects to Power Platform via connectors using the standard `npx power-apps add-data-source` workflow.
10
10
11
-
The Expo template snapshot is synced from [`pa-wrap-tools/templates/expo-app-standalone`](https://microsoft.ghe.com/bic/pa-wrap-tools/tree/main/templates/expo-app-standalone) and distributed with this plugin under `template/`. `/create-mobile-app` runs in fresh-template working-directory mode: the user starts in an installed template folder, then the skill validates and prepares it.
11
+
The Expo template snapshot is distributed with this plugin under `template/` and published from [`plugins/mobile-apps/template`](https://github.com/microsoft/power-platform-skills/tree/main/plugins/mobile-apps/template). `/create-mobile-app` runs in fresh-template working-directory mode: the user starts in an installed template folder, then the skill validates and prepares it.
Copy file name to clipboardExpand all lines: plugins/mobile-apps/README.md
+24-98Lines changed: 24 additions & 98 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,11 +2,9 @@
2
2
3
3
Claude Code / Copilot plugin for building **Power Apps code apps for mobile** using Expo + React Native + TypeScript.
4
4
5
-
> **Marketplace:**`power-platform-skills`, plugin `mobile-app`, stored in `plugins/mobile-apps`. This was migrated from the standalone `rn-app-skils` / `mobile-app-skills` preview repo; the plugin name remains `mobile-app` so existing agent namespaces keep working.
6
-
>
7
-
> **What:** Build mobile Power Apps with Expo + RN + TS (iOS & Android).
8
-
> **Who:** Microsoft-internal teams currently — requires Azure Artifacts feed access (see Prerequisites §2).
9
-
> **Status:** preview / v0.
5
+
> **Marketplace:**`power-platform-skills`, plugin `mobile-app`, stored in `plugins/mobile-apps`.
6
+
> **What:** Build mobile Power Apps with Expo + RN + TS (iOS & Android).
7
+
> **Status:** public preview / v0.
10
8
11
9
---
12
10
@@ -100,7 +98,7 @@ claude plugin install mobile-app@power-platform-skills --scope user
100
98
101
99
Use this only if the installer cannot find or configure your Claude CLI. You can also add it to your global plugin config manually — see the [Claude Code plugin docs](https://docs.anthropic.com/claude/docs/claude-code-plugins).
102
100
103
-
**Step 3 — Prepare a fresh template folder** (next section). Use `degit` to materialize `pa-wrap-tools/templates/expo-app-standalone`, run `npm install` in that folder, then open that folder and run `/create-mobile-app` there.
101
+
**Step 3 — Prepare a fresh template folder** (next section). Use `degit` to materialize the public template from this repository, run `npm install` in that folder, then open that folder and run `/create-mobile-app` there.
104
102
105
103
### GitHub Copilot (VS Code) fallback
106
104
@@ -130,108 +128,39 @@ Add the extracted folder to VS Code's `settings.json`:
130
128
131
129
> **Note:**`EnterPlanMode` / `ExitPlanMode` are Claude Code-only directives. Copilot approximates plan mode by restricting itself to read-only operations during the planning phase — the workflow still proceeds correctly.
132
130
133
-
That's it. The Expo template is prepared before invoking `/create-mobile-app`:
131
+
Create a new app from the template and install dependencies before invoking `/create-mobile-app`:
## Prerequisites — what you must set up before `/create-mobile-app`
146
150
147
151
The skill checks these in Step 1 (Prerequisites) and stops with a clear error if any are missing. Get them ready up front to avoid mid-flow blocks.
148
152
149
-
### ⚠️ Two identities, two auth mechanisms (read this first)
150
-
151
-
This skill talks to two different Microsoft systems with two different identities. Mixing them up is the #1 cause of failed runs.
152
-
153
-
| What | Identity | Auth mechanism | Why separate |
154
-
|---|---|---|---|
155
-
|`npm install` from private feed |**Your corp `@microsoft.com` account**|**`az login --tenant <corp>`** (browser) — falls back to PAT for headless | Feed ACL is on your corp identity, not your test-tenant admin. |
156
-
| Everything else (`npx power-apps init`, Dataverse, deploy, push) |**Power Platform tenant identity** (often a test-tenant admin, NOT your corp account) |`npx power-apps` browser auth + `az login --tenant <env-tenant>` for Dataverse helper scripts | Power Platform has its own AAD context, often a different tenant entirely. |
157
-
158
-
Configure npm access to the Azure Artifacts feed before `npm install`. PAT setup remains a headless / CI fallback only. `npx power-apps` uses its own browser auth cache, separate from Azure CLI.
159
-
160
153
### 1. Tooling versions
161
154
162
155
| Tool | Min version | How to install / check |
163
156
|---|---|---|
164
157
| Node.js |**22.x**|`node -v` — install via [nvm](https://github.com/nvm-sh/nvm) (`nvm install 22 && nvm use 22`) |
165
-
|`az` (Azure CLI) |**2.60+**|`az --version` — needed for ADO npm token setup and advanced `/set-app-registration-native` scenarios. Install via Homebrew: `brew install azure-cli`|
158
+
|`az` (Azure CLI) |**2.60+**|`az --version` — needed for Dataverse helper scripts and advanced `/set-app-registration-native` scenarios. Install via Homebrew: `brew install azure-cli`|
166
159
|`git`| any recent | required for upstream template clone |
167
160
168
161
Detailed matrix (and Xcode/Android Studio notes if you want local native builds): [`shared/version-check.md`](shared/version-check.md).
The Expo template's `package.json` depends on `@microsoft/power-apps-native-host` and sibling Microsoft packages hosted on a **private Azure Artifacts feed** — `mobile-codegen-expo` under the `msazure / OneAgile` org. Without a valid feed credential, `npm install` fails with `E401 Unauthorized`. This is the most common blocker.
173
-
174
-
**Recommended: `az login` browser flow.** Sign in with the identity that has feed Reader access, then make sure your npm auth configuration can access the Azure Artifacts feed before `npm install`. No copy-paste, no PAT rotation, identity is auditable in `az account show`.
175
-
176
-
**Step A — Get Reader access to the feed:**
177
-
178
-
Before any auth flow works, your Azure DevOps account needs **Reader** access to the `mobile-codegen-expo` feed:
179
-
180
-
1. Go to <https://msazure.visualstudio.com/OneAgile/_artifacts/feed/mobile-codegen-expo>
181
-
2. If you see `403 Forbidden` or the feed doesn't load, request Reader membership from the team's Teams channel or feed owners
182
-
3. Once you can view the feed page, proceed to Step B
183
-
184
-
**Step B — Sign in with `az login` (one-time):**
185
-
186
-
```bash
187
-
# Sign in to your Microsoft corp tenant. This opens a browser; pick your @microsoft.com account.
188
-
az login --allow-no-subscriptions
189
-
# Browser opens — sign in and pick the tenant that owns the msazure Azure DevOps org
190
-
# (for Microsoft FTEs that's your corp @microsoft.com account).
191
-
# If you're on SSH/WSL/headless, add --use-device-code to get a paste-the-code prompt instead.
192
-
193
-
# Verify the right identity is active
194
-
az account show --query user.name -o tsv
195
-
# Should print your @microsoft.com address (NOT the Power Platform test-tenant admin)
196
-
```
197
-
198
-
If you have multiple accounts, you can switch any time with `az account set --subscription <sub-id>` or re-run `az login`.
# Expected: HTTP 200. If 401 → re-run `az login`. If 403 → re-do Step A (no Reader access).
207
-
```
208
-
209
-
**Headless / CI fallback (advanced):** If you can't run a browser (CI runners, locked-down hosts), set `AZURE_DEVOPS_NPM_TOKEN` to a PAT instead. Create one at <https://dev.azure.com/msazure/_usersSettings/tokens> with `Packaging: Read` scope (90-day max), then:
# Expected: HTTP 200. If 401 → bad PAT, redo Step B. If 403 → redo Step A (no Reader access).
228
-
```
229
-
230
-
**If `npm install` fails with `E401`:** Your token is missing or expired. Re-run Step B.
231
-
232
-
**If `npm install` fails with `E403`:** Your token is valid but your account doesn't have feed access. Go back to Step A and request Reader membership.
233
-
234
-
### 3. Power Platform environment
163
+
### 2. Power Platform environment
235
164
236
165
You'll need an environment to deploy into. `/create-mobile-app` runs `npx power-apps init`, then reads the generated `power.config.json`, resolves the Dataverse URL and tenant through `resolve-environment.js`, and continues. The resolver calls the BAP admin environments endpoint (`api.bap.microsoft.com/providers/Microsoft.BusinessAppPlatform/scopes/admin/environments/<environment-id>`). If the signed-in Azure CLI account cannot read that environment through BAP, provide the Dataverse environment URL directly.
237
166
@@ -245,23 +174,22 @@ Requirements:
245
174
246
175
If environment resolution cannot get a Dataverse token during the skill, run `az login --tenant <env-tenant>` and retry.
247
176
248
-
### 4. (Optional) Companion plugins
177
+
### 3. (Optional) Companion plugins
249
178
250
179
-**`expo/skills`** — see the next section. Strongly recommended for native UI patterns.
251
180
252
181
### Quick sanity check
253
182
254
-
Before you run `/create-mobile-app`, paste this one-liner — it touches every prereq AND verifies the PAT works against the feed. Exits 0 only if all are good:
183
+
Before you run `/create-mobile-app`, paste this one-liner from the fresh template folder. It touches the required local tooling and verifies the template dependencies are installed:
If any line fails, fix that one before starting the skill. Most common failure is the curl line returning 401 (bad PAT) or 403 (no feed Reader access) — see Section 2.
192
+
If any line fails, fix that one before starting the skill. The most common failures are an older Node.js version or running the command outside the fresh template folder.
265
193
266
194
---
267
195
@@ -289,7 +217,7 @@ After deploy, use `/open-wrap-url --app-id <app-id> --env-id <env-id>` to jump s
289
217
290
218
## What you get
291
219
292
-
-**Expo standalone template** prepared with `degit` from [`pa-wrap-tools/templates/expo-app-standalone`](https://microsoft.ghe.com/bic/pa-wrap-tools/tree/main/templates/expo-app-standalone) (internal). The plugin bundles the latest template snapshot under `template/`, while `/create-mobile-app` expects the user to run from a fresh installed template working directory and applies the app identity / connector preparation edits there.
220
+
-**Expo standalone template** prepared with `degit` from [`plugins/mobile-apps/template`](https://github.com/microsoft/power-platform-skills/tree/main/plugins/mobile-apps/template). The plugin bundles the latest template snapshot under `template/`, while `/create-mobile-app` expects the user to run from a fresh installed template working directory and applies the app identity / connector preparation edits there.
293
221
-**Same `npx power-apps add-data-source` workflow** across this plugin's skills — generated services in `src/generated/services/` work consistently
294
222
-**Auth pre-wired** via the Power Apps CLI first-party Entra app — no custom Azure registration required
295
223
-**Two platforms** in one codebase: iOS, Android
@@ -466,10 +394,9 @@ At Step 6.75 of `/create-mobile-app`, the `/design-system` skill offers a cost p
466
394
467
395
## Known blockers
468
396
469
-
1.**Fresh template preparation.**`/create-mobile-app` expects a fresh installed `expo-app-standalone` template working directory. Use `degit` to materialize `pa-wrap-tools/templates/expo-app-standalone`, then run `npm install` in that template folder before invoking the skill there.
470
-
2.**Azure Artifacts npm token.** The template depends on `@microsoft/power-apps-native-host` from a private Azure DevOps feed. Without a valid feed token, `npm install` fails with `E401 Unauthorized`. See [Prerequisites § 2](#2-azure-artifacts-npm-token-private-feed-).
471
-
3.~~**Sub-agent slash-command limitation.**~~ ✅ **Resolved** — `/design-system` (Step 6.75) now runs as a top-level skill invocation by the orchestrator, not inside a sub-agent. The old `DESIGN_VIBE_REQUESTED:` handoff signal is no longer needed.
472
-
4.~~**Connector usage requires the player runtime.**~~ ✅ **Resolved** — `PowerAppsHostProvider` in `app/_layout.tsx` (from `power-apps-native-host`) handles all connector routing, connection resolution, disambiguation, and OAuth consent automatically. No separate executor or provider wiring needed.
397
+
1.**Fresh template preparation.**`/create-mobile-app` expects a fresh installed `expo-app-standalone` template working directory. Use `degit` to materialize [`plugins/mobile-apps/template`](https://github.com/microsoft/power-platform-skills/tree/main/plugins/mobile-apps/template), then run `npm install` in that template folder before invoking the skill there.
398
+
2.~~**Sub-agent slash-command limitation.**~~ ✅ **Resolved** — `/design-system` (Step 6.75) now runs as a top-level skill invocation by the orchestrator, not inside a sub-agent. The old `DESIGN_VIBE_REQUESTED:` handoff signal is no longer needed.
399
+
3.~~**Connector usage requires the player runtime.**~~ ✅ **Resolved** — `PowerAppsHostProvider` in `app/_layout.tsx` (from `power-apps-native-host`) handles all connector routing, connection resolution, disambiguation, and OAuth consent automatically. No separate executor or provider wiring needed.
473
400
474
401
## Local Zip Install
475
402
@@ -484,7 +411,6 @@ To install only this plugin, register the repository root as a marketplace and i
484
411
485
412
## See also
486
413
487
-
-[`pa-wrap-tools/templates/expo-app-standalone`](https://microsoft.ghe.com/bic/pa-wrap-tools/tree/main/templates/expo-app-standalone) (internal) — upstream template source for the bundled `template/` snapshot and fresh-template working directory
488
-
-[`pa-wrap-tools/native-app.md`](https://microsoft.ghe.com/bic/pa-wrap-tools) (internal) — full architecture spec
414
+
-[`plugins/mobile-apps/template`](https://github.com/microsoft/power-platform-skills/tree/main/plugins/mobile-apps/template) — bundled Expo standalone template and fresh-template working directory source
Copy file name to clipboardExpand all lines: plugins/mobile-apps/shared/version-check.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -66,16 +66,16 @@ If the user asks how to run on a real device or simulator: point them at the Exp
66
66
67
67
## Required SDKs (in `package.json`)
68
68
69
-
These are pinned in the upstream template at [`pa-wrap-tools/templates/expo-app-standalone/package.json`](https://microsoft.ghe.com/bic/pa-wrap-tools/blob/main/templates/expo-app-standalone/package.json) and mirrored in this plugin's bundled `template/package.json`. If a skill upgrades one, file an upstream PR — do NOT patch the generated app copy in-project. Note: under Expo SDK 55, **all `expo-*` packages share the `55.x.y` version line** — that's how Expo guarantees compatibility. Don't list `expo-router`/`expo-auth-session`/`expo-secure-store` as if they're independently versioned.
69
+
These are pinned in the bundled template at [`plugins/mobile-apps/template/package.json`](https://github.com/microsoft/power-platform-skills/tree/main/plugins/mobile-apps/template/package.json). If a skill upgrades one, update the bundled template first — do NOT patch the generated app copy in-project. Note: under Expo SDK 55, **all `expo-*` packages share the `55.x.y` version line** — that's how Expo guarantees compatibility. Don't list `expo-router`/`expo-auth-session`/`expo-secure-store` as if they're independently versioned.
70
70
71
71
| Package | Pinned version | Notes |
72
72
|---|---|---|
73
73
|`expo`|`55.0.26`| SDK 55 |
74
74
|`react-native`|`0.83.6`| matched to Expo SDK 55 |
75
75
| All `expo-*` packages |`55.x.y`| router, auth-session, secure-store, dev-client, etc. — version line tied to SDK |
76
-
|`@microsoft/power-apps`|`1.2.2`|resolved from the Azure Artifacts registry configured for npm|
77
-
|`@microsoft/power-apps-native-host`|`^0.2.20`| native runtime host, resolved from the Azure Artifacts registry|
78
-
|`@microsoft/power-apps-native-offline`|`^0.1.7`| offline runtime package, resolved from the Azure Artifacts registry|
- New skill needs a tool not listed → add it here, then reference from the skill (don't hard-code in the skill).
118
-
- An SDK pin changes in [`pa-wrap-tools/templates/expo-app-standalone/package.json`](https://microsoft.ghe.com/bic/pa-wrap-tools/blob/main/templates/expo-app-standalone/package.json) → update the SDK table here.
118
+
- An SDK pin changes in [`plugins/mobile-apps/template/package.json`](https://github.com/microsoft/power-platform-skills/tree/main/plugins/mobile-apps/template/package.json) → update the SDK table here.
119
119
- A new Power Platform CLI feature requires a newer minimum → bump the table, surface a one-line warning in the affected skills.
0 commit comments