$npx -y skills add microsoft/power-platform-skills --skill open-wrap-urlUse when the user wants to open the Power Apps Wrap page for an app ID in the active environment.
| 1 | **📋 Shared instructions: [shared-instructions.md](../../shared/shared-instructions.md)** — read first. |
| 2 | |
| 3 | # Open Wrap URL |
| 4 | |
| 5 | Builds and opens the Wrap URL for a code app: |
| 6 | |
| 7 | `https://make.powerapps.com/environments/<envID>/wrap?appID=<appID>` for `--env Prod` |
| 8 | |
| 9 | `https://make.test.powerapps.com/environments/<envID>/wrap?appID=<appID>` for `--env Test` |
| 10 | |
| 11 | This skill delegates URL construction and browser open behavior to `scripts/open-wrap-url.js`. |
| 12 | |
| 13 | ## Workflow |
| 14 | |
| 15 | 1. Resolve app ID + env ID → 2. Open Wrap URL |
| 16 | |
| 17 | --- |
| 18 | |
| 19 | ### Step 1 — Resolve app ID + env ID |
| 20 | |
| 21 | Both arguments are required: |
| 22 | |
| 23 | - `--app-id <app-id>` |
| 24 | - `--env-id <environment-id>` |
| 25 | |
| 26 | Optional host selector: |
| 27 | |
| 28 | - `--env <Prod|Test>` (default: `Prod`) |
| 29 | |
| 30 | If either value is missing in `$ARGUMENTS`, ask once for the missing value(s). If still missing, STOP. |
| 31 | |
| 32 | ### Step 2 — Open Wrap URL |
| 33 | |
| 34 | Run from the plugin root (or any app root): |
| 35 | |
| 36 | ```bash |
| 37 | node scripts/open-wrap-url.js --app-id "<app-id>" --env-id "<environment-id>" [--env "Prod|Test"] |
| 38 | ``` |
| 39 | |
| 40 | Return the generated URL in the response. If the browser auto-open fails, still print the URL and tell the user to open it manually. |
| 41 | |
| 42 | ## Notes |
| 43 | |
| 44 | - This skill is read-only with respect to project source files. |
| 45 | - Works on macOS (`open`), Linux (`xdg-open`), and Windows (`start`). |