power-platform-skills / mobile-apps
AGENTS.md961 starsChanged 59 days agoMITView on GitHub
This file provides guidance to AI Agents when working with the mobile-app plugin. Status: v0 — 24 skills + 5 agents authored. The latest Expo standalone template snapshot is bundled under template/. Read README.md for the command list. 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. The Expo template snapshot…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository125 other files it gives its agents.
- AGENTS.mdAGENTS.md
- plugins/canvas-apps/AGENTS.mdAGENTS.md
- plugins/code-apps/AGENTS.mdAGENTS.md
- plugins/model-apps/AGENTS.mdAGENTS.md
- plugins/power-apps-mobile-extension/AGENTS.mdAGENTS.md
- plugins/power-automate/AGENTS.mdAGENTS.md
- plugins/power-pages/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- plugins/canvas-apps/CLAUDE.mdCLAUDE.md
- plugins/model-apps/CLAUDE.mdCLAUDE.md
- plugins/power-automate/CLAUDE.mdCLAUDE.md
- plugins/power-pages/CLAUDE.mdCLAUDE.md
- add-data-sourceSkill
- canvas-appSkill
- configure-canvas-mcpSkill
- report-issueSkill
- add-azuredevopsSkill
- add-connectorSkill
- add-datasourceSkill
- add-dataverseSkill
- add-excelSkill
- add-mcscopilotSkill
- add-office365Skill
- add-onedriveSkill
- add-sharepointSkill
- add-teamsSkill
- add-workiqSkill
- create-code-appSkill
- deploySkill
- list-connectionsSkill
- report-issueSkill
- generate-codeful-mcp-toolSkill
- generate-mcp-app-uiSkill
- report-issueSkill
- add-connectorSkill
- add-datasourceSkill
- add-dataverseSkill
- add-cameraSkill
- add-geolocationSkill
- add-pdf-reportSkill
- add-pdf-viewerSkill
- add-pen-inputSkill
- add-nativeSkill
- add-sample-dataSkill
- add-sharepointSkill
- add-table-to-offline-profileSkill
- assign-offline-profileSkill
- check-updatesSkill
- create-mobile-appSkill
- debug-appSkill
- deploySkill
- design-systemSkill
- edit-appSkill
- edit-offline-profileSkill
- enable-tables-offlineSkill
- list-connectionsSkill
- open-wrap-urlSkill
- preview-offline-scopeSkill
- preview-screensSkill
- report-issueSkill
- The first 60 shown.
The file
We split this AGENTS.md into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 47
Do not add preparation rewrites for scheme, package, bundleIdentifier, src/playerConfig.ts, fingerprint.config.js, or native-runtime.json …
- Very specific: line 95
CI:: Every Mobile Apps test job must set POWER_PLATFORM_SKILLS_TELEMETRY_MOBILE_APP_OPTOUT=1.
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md — Code Apps Native Plugin (Preview)
This file provides guidance to AI Agents when working with the mobile-app plugin.
Status: v0 — 24 skills + 5 agents authored. The latest Expo standalone template snapshot is bundled under
template/. Read README.md for the command list.
What This Plugin Is
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.
The Expo template snapshot is distributed with this plugin under template/ and published from 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.
Local Development
claude --plugin-dir /path/to/power-platform-skills/plugins/mobile-appsArchitecture
.plugin/plugin.json ← Open Plugins metadata
.claude-plugin/plugin.json ← Legacy metadata mirror
AGENTS.md ← This file
README.md ← Plugin overview
agents/ ← native-app-planner, data-model-architect, screen-planner, screen-builder
shared/ ← shared-instructions, references, samples, memory-bank template
skills/ ← /create-mobile-app, /add-dataverse, /add-connector, /add-native, ...
scripts/ ← shared helpers, including validate-mobile-files.js and bundled telemetry
hooks/ ← Telemetry start hooks plus validators invoked explicitly by mobile workflowsTemplate source
The Expo template snapshot ships bundled inside this plugin at template/. It is synced from microsoft/power-platform-skills main, plugins/mobile-apps/template/. /create-mobile-app does not silently copy the bundled template over a user's folder; it expects a fresh installed template working directory and applies these preparation edits there:
| Edit | Purpose |
app.config.js: name, slug | Replace 'Power Apps Standalone App' / 'powerapps-standalone-app' with wizard answers |
package.json: name | Replace 'powerapps-standalone-app' with the app slug |
Remove an empty placeholder power.config.json | Preserve populated environment configuration; npx power-apps init creates a missing file |
| Remove legacy example hooks and query-client files | Preserve every artifact under src/generated/ |
app/_layout.tsx: add tamaguiConfig + defaultTheme | Use host light/dark defaults until generated brand themes are explicitly wired |
app.json + app/_layout.tsx: appConfig | Pass the complete generated app configuration once so the host can resolve opt-in Application Insights settings inside fixed Dev Player |
tsconfig.json: verify the host base | Package shims and @/ aliases remain centralized in the native host |
Do not add preparation rewrites for scheme, package, bundleIdentifier, src/playerConfig.ts, fingerprint.config.js, or native-runtime.json unless those files exist in the synced main template.
Guiding Principles
- Connector-first for data — All Power Platform data access goes through connectors and generated services in
src/generated/. No direct Graph / Azure REST calls. - Native code is allowlist-bounded; pure JavaScript is app-scoped. Expo modules and packages that ship native source, a podspec, codegen configuration, an Expo module/config plugin, or platform projects must already exist in
template/package.json. The rewrap binary is built from a pre-built base, so adding those packages to an app cannot add their native code. Do not classify a package from its name alone: areact-native-*package can still be pure JavaScript. For an explicit library request or an approved use case that benefits from an established pure-JavaScript package, the planner may select a compatible version, pin it in the app'spackage.json, and install it before builders use it; no Android/iOS rebuild is required. Do not bundle optional libraries such asreact-native-calendarsin the base template. Followshared/references/javascript-dependency-planning.md.expo-hapticsis template-shipped: add haptic behavior through/add-native haptics, keep native calls insrc/native/haptics.ts, and pair tactile feedback with visible UI. When a template/base maintainer adds or changes a native dependency version, the Android and iOS base binaries must be rebuilt before release; generated apps based on that rebuilt template do not install or link it again. The native boundary and reconciliation rule are inskills/add-native/SKILL.md. - Fresh-template mode —
/create-mobile-appvalidates and prepares an existing fresh Expo standalone template working directory. Do not silently copy the bundledtemplate/snapshot over the user's folder. - Safety guardrails — Confirm before deploys, before global installs, before edits outside the project root.
- Memory bank — Persist
memory-bank.mdin the project root. - Plan mode — Confirm requirements first. Gate 1 then presents native capabilities, connectors, and the data-platform choice before conditional Dataverse modeling; later gates approve the applicable data model and screen plan.
- Persisted plan — Write
native-app-plan.md(Mermaid ER + per-screen specs + native capabilities matrix) as the source of truth that sub-skillsRead. - CLI compatibility — Use
npx power-apps ...for code-app lifecycle and data-source commands. Usescripts/resolve-environment.jsplusaztokens for Dataverse environment URL/tenant discovery and Azure/Entra operations. Seeshared/shared-instructions.md. - Agent invocation namespace — All
Taskinvocations of agents in this plugin MUST use the fully-qualifiedmobile-app:<agent-name>form (e.g.mobile-app:native-app-planner,mobile-app:screen-builder). Bare names likenative-app-plannerreturnAgent type 'native-app-planner' not foundbecause Claude Code namespaces all plugin agents by plugin name. - Plugin isolation —
hooks/hooks.jsonis limited to fail-open telemetry start hooks. They never validate, mutate, or block tool calls. Do not add write/validation hooks: mutating skills follow the changed-file gate inshared/shared-instructions.md, and final-artifact agents invokescripts/validate-mobile-files.jsdirectly. - Invocation metadata — Public entry skills use
user-invocable: trueand remain model-invocable. Bundled implementation helpers use bothuser-invocable: falseanddisable-model-invocation: true; their owner readsSKILL.mddirectly. Hidden standalone workflows such asassign-offline-profileandpreview-offline-scopeuseuser-invocable: falsewithout disabling model invocation because no owner reads them directly. Agents useuser-invocable: falsewithoutdisable-model-invocationso qualifiedTaskdelegation remains available. Sub-agent return-status protocol — Every agent in this plugin (
native-app-planner,data-model-architect,screen-planner,screen-builder) MUST return a status code as the literal first line of its final message. Orchestrators (skills that invoke agents viaTask) MUST parse the first line and branch:Code Meaning Orchestrator action DONECompleted cleanly Log and continue DONE_WITH_CONCERNS: <list>Worked but flagged doubts Surface to user before next step; record in memory-bank.mdNEEDS_CONTEXT: <missing>Cannot proceed without more info Re-dispatch with the info filled in (cap 2 retries) BLOCKED: <reason>Hit a hard wall STOP, escalate to user, never silently retry Hard rules:
- Status code is the literal first line — no
Status:prefix, no backticks, no preamble. After it, blank line, then the agent's normal summary. - Agents MUST NOT downgrade
BLOCKEDtoDONE_WITH_CONCERNSto keep the workflow moving — the orchestrator's job is to handle the block, not the agent's. DONE_WITH_CONCERNSrequires at least one concern. If none, useDONE.- In
/create-mobile-apponly,NEEDS_CONTEXT: dataverse-planning-mode:<required|connector-only>from thegate-onlyarchitecture pass is a phase-completion signal, not a retry. The canonical handler validates the approved architecture before continuing; other phases cannot use it to change the data platform. - Special early-return signals (
INDUSTRY_CONFIRM_REQUESTED:,DESIGN_VIBE_REQUESTED:) pre-date this protocol and remain in effect — they are special-cased "ask the user one question and re-spawn me" handoffs, not terminal returns. - The canonical orchestrator handler lives in
skills/create-mobile-app/SKILL.mdStep 3.0. Future skills that spawn agents should reference it rather than duplicating the switch.
- Status code is the literal first line — no
- Metro lifecycle is project-local — template
metro.config.jsdelegates tocreatePowerAppsMetroConfig, whose host implementation writes sanitized.powernative/metro-logs/output during normalnpm run dev;/debug-applocates and tails those files directly, with its cursor, health, and audit state under.powernative/debug-app/. Do not restore requiredBashOutput/terminal-ID behavior or host-specific project state directories. Host terminal APIs may be optional conveniences only. Never write unsanitized Metro output to disk, and never diagnose a log unless the logged PID/port still look live. - First-party native package defects are reported, not patched in customer projects — a
node_modules/@microsoft/power-apps-native-*frame alone is not proof of package ownership; first rule out invalid app usage against the package's public contract. Once a defect is confirmed inside one of these packages, do not editnode_modules/, generatepatch-packageor postinstall rewrites, vendor or fork the package, replace it with a git/tarball/local dependency, or shadow it through resolver aliases. Capture sanitized reproduction evidence and route to/report-issue. - Custom events are Application Insights-specific and opt-in — Each generated app targets one customer-owned, workspace-based Application Insights resource.
app.json→expo.extra.appInsightsConfigdefaults to disabled and stores its connection string, matching the Power Apps canvas-app model. Treat the value as sensitive project configuration: do not print it, write it tomemory-bank.md, or include it in summaries. KeepincludeUserIdfalse unless explicitly approved. - Plugin update notification — Immediately after the frontmatter of every
user-invocable: trueskill except/check-updates, runnode "${PLUGIN_ROOT}/scripts/check-version.js"and show any output before proceeding. The check is best-effort and must never block the requested workflow./check-updatesowns its explicit plugin-version check in Step 1 and must not run a duplicate startup check.
Telemetry
Mobile Apps bundles the canonical stdlib-only telemetry helpers from the repo-root shared/telemetry/lib at scripts/lib/telemetry/lib. Edit the shared source first, then refresh this physical copy in the same change; never copy another plugin's ikey.json or resolver.
- Lifecycle:
UserPromptSubmitandPreToolUse(Skill)remain legacy activity observations, not measured workflow starts. Every tracked operational skill followsshared/shared-instructions.mdto begin and end a schema-v2 skill span and measure registered checkpoints throughscripts/emit-telemetry-checkpoint.js. Durable span state uses the Mobile Apps-ownedscripts/lib/mobile-lifecycle.jshelper; orchestration remains in the existing checkpoint CLI. Pass explicit run, parent, and span IDs across Skill, Task, subprocess, and resume boundaries. Do not infer completion from hook returns or recover run identity from an unrelated session. Thetelemetrypreference skill remains exempt. - Coverage and attribution:
scripts/lib/mobileapp-hook-utils.jsdiscovers every user- or model-invocable top-level skill, includingtelemetry. Direct-read helpers withdisable-model-invocation: trueare not independently invoked and are excluded. Bare andmobile-app:-qualified names are both attributed; explicitly foreign plugin namespaces are excluded. - Session correlation: Stable host session ids pass through unchanged. Copilot CLI reports a transient
call_*id to nested-agent hooks, soresolveCopilotRootSessionIdinscripts/lib/mobile-telemetry.jsresolves it to the unique recent UUID session whose local~/.copilot/session-state/<uuid>/events.jsonlstructurally owns thatagentId, reading only a bounded tail. Keep host-specific quirks contained in that one function. The verified root is cached as one atomic 30-minute alias file per hashed call id so fresh hook processes reuse it; aliases hold no prompts, cwd, or tool arguments and are never transmitted. Missing, stale, malformed, or ambiguous state fails open to the original id, and Claude Code and Codex ids are not rewritten. - Privacy: Only the exact field schema enforced by
scripts/lib/mobile-telemetry-dispatcher.jsand disclosed in this plugin's README and telemetry skill is allowed. Verified environment, tenant, and organization IDs support adoption and support correlation; they are organization-identifying metadata. Mobile telemetry must never capture or transmit an Entra user/object ID, Dataverse UserId, username, email, or guessed home-account ID. Never send prompts, arguments, records, file contents, paths, URLs, credentials, names, hostnames, or raw errors. The dispatcher filters top-level and nested values before local logging and transmission; arbitraryeventInfoenrichment is forbidden. - Destination and controls: Mobile-owned
scripts/lib/mobile-telemetry-dispatcher.jsmaps shared events to the Power Appseventstream configured byscripts/lib/telemetry/ikey.json. The repositorydisabledswitch is a hard-off; user and CI opt-outs suppress transmission while preserving the local diagnostic mirror. - CI: Every Mobile Apps test job must set
POWER_PLATFORM_SKILLS_TELEMETRY_MOBILE_APP_OPTOUT=1. The single positive wire test clears that backstop only in its child process and routes the event toPOWER_PLATFORM_SKILLS_FAKE_HTTPS; all other positive tests remain opted out and exercise the local mirror.
Decisions made
- ✅ Markdown plan with Mermaid (no HTML rendering)
- ✅ Architecture-first approval gates in the planner (data platform + native APIs + connectors → conditional Dataverse model → screen plan)
- ✅
/edit-appskill for post-generation app iteration: updates the approved plan delta, applies Dataverse/native/design/screen mutations, verifies, and refreshes preview output.--plan-onlyis the explicit docs-only escape hatch. - ✅ Single
/deployskill —npm run build+npx power-apps push; no local native compile, no OTA in v0 - ✅ Connection model: per-environment connections, with platform-specific auth (
expo-msal-intuneon native,expo-auth-sessionon web) - ✅ Auth:
/create-mobile-appresolves the tenant from the selected Power Platform environment (scripts/resolve-environment.js), writes that tenant toauth.config.json, then lets the user paste an app registration client ID, create one from the Power Apps Wrap page and paste it, or skip auth for later./set-app-registration-nativeis a manual helper for the same Wrap-page + pasted-client-ID flow. - ✅
/add-nativev0 scope: camera, location, push, biometrics, secure-store (already in template) - ✅ Cross-host Metro diagnostics: user-owned
npm run dev, port-probe liveness and stale-PID protection, sanitized project-local logs, a durable debug cursor, and read-onlystatusplus foreground-loopstopcommands - ✅ Template is supplied as a fresh
microsoft/power-platform-skills/plugins/mobile-apps/template#mainfolder before/create-mobile-appruns; users materialize it withdegit, runnpm install, then invoke the skill from that folder. The skill validates/prepares the folder and runsnpx power-apps init. - ✅
brand/directory convention:/design-system(Step 6.75) writesbrand/design-system.md(spec),brand/tokens.ts(importable Tamagui tokens), andbrand/design-system.html(visual gallery). Screen-builders MUST readbrand/design-system.mdif present;## Negatives= HARD RULES./create-mobile-appStep 9b importsbrand/tokens.tsviaskills/design-system/references/tamagui-integration.md. Projects withoutbrand/fall back to## Design Directiononly — no breakage. - ✅ Offline profile creation is configuration-only in v0.1 —
/setup-offline-profileand/enable-tables-offlinePOSTmobileofflineprofile/mobileofflineprofileitem/mobileofflineprofileitemassociationto Dataverse and writeoffline-profile.json. The template already bundles@microsoft/power-apps-native-offline, and@microsoft/power-apps-native-hostconsumes it for local SQLite access, queued synchronization, reconnect handling, and its status overlay. Skills configure that host runtime; they do not scaffold a second app-owned store, sync engine, queue, or duplicate offline UX. - ✅ Custom filter mode (
recorddistributioncriteria=3,profileitemrule→savedquery) is deferred to v0.5. v0.1 supports Related-rows-only / All-records / Organization-rows radio options only. - ✅
offline-profile-architectagent follows the existingmobile-app:namespace + status-code protocol (DONE/DONE_WITH_CONCERNS:/NEEDS_CONTEXT:/BLOCKED:). Read-only — proposes scope; never mutates Dataverse. Mutation lives in/setup-offline-profileafter the 3 gates. - ✅ Offline profile ↔ schema reconciliation across the lifecycle. Any schema change (
/add-dataverse,/setup-datamodel,/edit-app) reconciles an existing offline profile, and/deploygates the final push on offline coverage. Mechanism:scripts/offline-profile-delta.js— a purely LOCAL, no-network diff of.datamodel-manifest.json(schema) vsoffline-profile.json(offline coverage) reportingmissingTables+ new columns;status∈no-manifest/no-profile/in-sync/delta/error(exit 0 = ran, 1 = fatal). It is distinct fromverify-offline-profile.js, which is a Dataverse-network drift check of the snapshot vs the live published profile. Column delta is computed against a per-tableschemaColumnsbaseline (all schema columns present at reconciliation time), written by/setup-offline-profile,/add-table-to-offline-profile, and refreshed by/edit-offline-profile— NOT against the curatedselectedColumns, so deliberate exclusions aren't false-flagged; legacy snapshots without it degrade to table-only delta. The one canonical flow (prompt wording, reconcile ordering, deploy gate/override) lives inshared/references/offline-profile-reconciliation.md; the four skills reference it rather than duplicating it. Orchestrator-invoked/add-dataverse(--skip-planning) suppresses its own Step 8.5 so the orchestrator owns reconciliation once.
Maintaining This File
Once skills exist, keep this file updated with the current skills table and architecture notes for this plugin.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

