/power-apps-mobile-extension:assemble-ppmpluginfrom power-apps-mobile-extension
Assembles and verifies the .ppmplugin binary bundle for a PAM native extension by reconciling manifest entrypoints with staged binaries, then zips and validates with jar.
Ships in power-apps-mobile-extension. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
The final step: take the label (manifest.json from /generate-ppmplugin-manifest) and the binaries the build skills produced, zip them into the single <name>.ppmplugin file, and verify the box contains exactly the right items. The output is the deliverable — the file you can hand off / upload. Before zipping, it reconciles the manifest's declared platforms against the binaries that actually built, so the shipped bundle never claims a platform it doesn't contain.
Read shared/ppmplugin-format.md §1 — the bundle layout this skill produces and verifies.
android/<Pascal>Plugin.dex from /build-android-binary and/or ios/<Pascal>Plugin.framework/ from /build-ios-binary) and bundles those present.shared/shared-instructions.md and shared/ppmplugin-format.md.jar (ships with the JDK). Print the visible block (shared-instructions §9.2):━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Prereq check — /assemble-ppmplugin
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🟢 ✓ jar (JDK) available
🟢 1 check passed, 0 failed. Ready to proceed.
If jar is missing, STOP with BLOCKED: jar not found — install a JDK (JDK 17).
The shipped bundle's manifest.json MUST declare exactly the platforms whose binaries are in the zip — no more, no less. The manifest was authored from intent (target choice); this step makes it match reality (what actually built). This is the one place that sees the final set of binaries, so it owns consistency.
ppmplugin/staging/manifest.json — else STOP with NEEDS_CONTEXT: manifest missing — run /generate-ppmplugin-manifest. Read name for the output filename <name>.ppmplugin (the version is NOT in the filename — it lives in the manifest's version field; the wrap pipeline reads it from there. Still read version to show it in the deliverable report).entrypoints.android present? entrypoints.ios?ppmplugin/staging/android/<dex> exists, where <dex> = entrypoints.android.dex.ppmplugin/staging/ios/<framework>.framework/ exists (a flat .framework, NOT an .xcframework — §5b), where <framework> = entrypoints.ios.framework. If an .xcframework is staged instead, surface it as a gate — the wrap CI can't ingest it; re-run /build-ios-binary for the flat device-slice framework.| Declared | Staged | Action |
|---|---|---|
| yes | yes | ship it ✓ |
| yes | no | MISMATCH → gate (below) |
| no | yes | binary present but the manifest won't route it — surface; offer to re-run /generate-ppmplugin-manifest to declare it, or leave it out |
| no | no | not part of this bundle — ignore |
NEEDS_CONTEXT: no built binary to ship — run a build skill first.The mismatch gate (declared but not staged). Do NOT silently ship a manifest pointing at a missing binary. The situation is genuinely ambiguous (changed-my-mind vs forgot-to-build), so surface it and ask via AskUserQuestion:
"Manifest declares
<platform>but no<platform>binary is staged."
- Build
<platform>first — run the build skill (/build-android-binary, or/build-ios-binaryfor iOS, Mac-only) [invoke it via the Skill tool — execute, don't describe]- Ship without
<platform>— removeentrypoints.<platform>from the stagedmanifest.json, ship the platforms that ARE built- Stop
If the user picks "Ship without", edit the staged manifest.json to drop that entrypoint before continuing. After this step, the manifest's entrypoints set equals the staged-binary set exactly.
Re-run the ppmplugin-format §4 validation rules on the reconciled staged manifest.json (it may have been edited in Step 2 or by hand). Also cross-check, for each shipped platform:
entrypoints.android.dex exactly matches the staged DEX filename.entrypoints.ios.framework matches the staged …/<framework>.framework directory name, and that .framework/ carries the binary + Headers/<framework>.h + Modules/module.modulemap + Info.plist (the wrap-CI requirements — /audit-ppmplugin does the deep check; flag here if any are obviously absent).If validation fails, STOP with BLOCKED: manifest validation — <rule> and do not produce the
bundle. A .ppmplugin that fails the local compatibility checks is not ready for upload.
Before zipping: if the output ppmplugin/<name>.ppmplugin already exists, do NOT silently overwrite it — ask via AskUserQuestion: Replace [default] / Keep existing (stop, leave the prior bundle untouched). Proceed to zip only on Replace.
Zip the manifest plus only the platform folder(s) reconciled as shipped in Step 2. Pass them explicitly so the build dirs (android-build/, ios-build/) are never swept in. jar (JDK) recurses directories, so it handles the iOS .framework tree, and it behaves identically on every OS — only the shell glue differs (§5):
macOS / Linux (bash):
mkdir -p ppmplugin
# list only the shipped platforms, e.g. `android` for Android-only, `android ios` for Both:
( cd ppmplugin/staging && jar cMf "../<name>.ppmplugin" manifest.json android ios )
Windows (PowerShell):
New-Item -ItemType Directory -Force ppmplugin | Out-Null
Push-Location ppmplugin\staging
jar cMf ..\<name>.ppmplugin manifest.json android ios
Pop-Location
(-M = no JAR manifest entry; the bundle's manifest.json is our own. Drop ios (or android) from the argument list if that platform isn't shipped.) On Replace (confirmed above), the prior bundle is overwritten.
Verify layout — list and assert it matches the reconciled manifest exactly:
jar tf ppmplugin/<name>.ppmplugin
Android-only expects exactly:
manifest.json
android/<Pascal>Plugin.dex
A Both bundle also has ios/<Pascal>Plugin.framework/… entries (flat framework — binary + Headers/ + Modules/module.modulemap + Info.plist). STOP with BLOCKED: unexpected bundle contents (and the actual listing) if: a build dir leaked in (android-build/, ios-build/), a stray file appears (.DS_Store, META-INF/), an ios/<…>.xcframework/ is present (must be a flat .framework), or a declared platform's binary is missing. The bundle must contain exactly the manifest + the entrypoints' binaries — nothing else.
Update the ## ppmplugin (third-party controls) block in .extension-state.md: Bundle: <name>.ppmplugin assembled <ISO timestamp> (v<version>, platforms: <android[,ios]>). Print the deliverable as a visible fenced block (shared-instructions §9.1, informational form):
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
.ppmplugin ready
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ppmplugin/pen-input.ppmplugin (v0.1.4, Android-only)
Contents:
manifest.json
android/PenInputPlugin.dex
Next: /audit-ppmplugin — verify the bundle is upload-ready before shipping it.
(Then: deploy the dispatcher PCF via /publish-pcf-companion, and upload the
.ppmplugin via the wrap wizard — Stage 3, not yet a skill.)
Then offer the next step via AskUserQuestion (shared-instructions §9.1 — invoke the chosen skill via the Skill tool; execute, don't describe):
(When /assemble-ppmplugin runs as an internal stage of /generate-ppmplugin, the orchestrator invokes /audit-ppmplugin automatically and this gate is skipped.) Return DONE with the bundle path.
What SKILL.md sets; muted values are Claude Code's defaults
sonnetThree short reads, in order
npx claudepluginhub microsoft/power-platform-skills --plugin power-apps-mobile-extension13 skills in this plugin
/audit-ppmpluginStatically audit a built `.ppmplugin` before wrap testing. Checks archive layout, manifest compatibility, bundle consistency, Android DEX integrity and SDK leakage, iOS framework structure, native source-to-receiver alignment, and the PCF composite-key/sendAsync transport contract. Reports CRITICAL, WARNING, and INFO findings with fixes routed to the owning stage; never modifies the archive. Requires `jar`; `dexdump` or `strings` improves DEX inspection. Run after /assemble-ppmplugin or standalone on an existing bundle./build-android-binaryCompile a PAM control's Android Kotlin module into the runtime-loadable DEX for a `.ppmplugin`. Creates a staged Gradle build with the pinned wrapper and `react-android` compile dependency, verifies manifest/module/package alignment and runtime-loading constraints, builds the release AAR, then runs `d8 --min-api 24`. Writes `ppmplugin/staging/android/<PascalName>Plugin.dex` and surfaces actionable Gradle or d8 failures. Requires JDK 17+ and Android SDK Build-Tools 35.0.0; `d8` is located from the SDK and system Gradle is optional. Run after /generate-ppmplugin-manifest and before /assemble-ppmplugin./build-ios-binaryCompile a PAM control's iOS Obj-C/Swift module into the FLAT device-slice `.framework` for a `.ppmplugin` bundle (never an `.xcframework` — the wrap CI won't descend into one). Mac-only (Xcode). Builds from a throwaway staged copy so canonical `ios/` and the podspec stay untouched, references React-Core headers only (React is weak-linked and provided by the wrap host at runtime, no CocoaPods), generates the required umbrella header, module map and Info.plist, sets the critical build settings, asserts manifest conformance, then runs a device-only `xcodebuild archive` and copies out the flat framework to `ppmplugin/staging/ios/`. Known limitation — the React weak-link flags aren't yet validated against a live wrap host and the RN pin must match the host's. Run after /generate-ppmplugin-manifest for an iOS or Both target, before /assemble-ppmplugin./debug-extensionDiagnose and fix failures in a built third-party `.ppmplugin` control: crashes, silent no-ops, PCF error outputs, or incorrect behavior. Uses the reported symptom, `shared/error-codes.md`, and file-level evidence to trace the manifest, Android/iOS modules, PCF dispatch, and build configuration. Produces a ranked diagnosis, asks for approval, then applies a surgical fix while keeping the committed manifest and affected contracts synchronized. Re-validates manifest changes through /generate-ppmplugin-manifest./design-native-extension-featureCapture a 2-3 line pitch from the user, draft a product overview (PRD.md) and a technical design (ARCHITECTURE.md) for a third-party `.ppmplugin` native control, then walk through every operation's iOS + Android implementation strategy with opinionated recommendations (library choice, hosting, key APIs, edge cases) and capture the agreed spec in ARCHITECTURE.md §3.<n>. The depth of ARCHITECTURE.md is what lets the scaffold skill generate complete working code instead of TODO placeholders. Iterates with the user until they approve both docs. Optionally seeds from a design doc / FRD URL. PRD.md + ARCHITECTURE.md are the source of truth for every downstream skill (generate, build, assemble). Run this BEFORE any code is generated./generate-native-extensionRead the approved PRD.md and generate the native sources for a third-party PAM control (the compiled `.ppmplugin` track) — iOS Obj-C `<Pascal>Module` plus optional system-frameworks podspec, Android Kotlin `<Pascal>Module` with build.gradle, AndroidManifest and ReactPackage, a dev-only private package.json (react + react-native devDeps for the builds), and the committed `./manifest.json` dispatch contract the PCF and build stage both read. No TypeScript INativeExtension layer — the contract is the manifest plus the native modules' dispatch surface. Emits the layout in shared/repo-layout.md and generates substantially complete native code (compiled later by /build-android-binary and /build-ios-binary, not here). Local only — writes files, runs no git and touches no remote or feed. PCF is generated by /generate-pcf-companion; the bundle is built by /generate-ppmplugin.3 plugins ship this exact skill · first indexed Aug 25, 2026
Other plugins' skills for the same job