deploy · microsoft, code-apps — Claude Code skill: what it does, how to install
Builds and pushes Power Apps code apps directly to Power Platform. Useful when shipping updates or redeploying an existing project from Claude Code.
MIT ★ 1,167 updated 2026-10-29
/plugin marketplace add microsoft/power-platform-skills
/plugin install code-apps-preview@power-platform-skillsWhat deploy does
This skill coordinates the full deployment cycle from the current directory. It starts by inspecting memory-bank.md to locate the project name and target environment. It then executes npm run build. If compilation hits TS6133 unused import warnings, the skill cleans them up automatically and retries. Any other TypeScript failure halts the process with file and line markers.
The deployment step runs via $PA app push or power-apps push. The skill always requests explicit confirmation before touching the live app. Expired credentials trigger guidance to run pa auth logout for browser re-authentication, while mismatched targets require updating environmentId inside power.config.json.
Once finished, the skill saves the captured app URL and timestamp into memory-bank.md. The workflow refuses to deploy if dist/index.html is absent after building.
What it helps with
- build Power Apps projects with automated cleanup for unused imports
- push application updates to target Power Platform environments
- store deployment timestamps and application URLs in
memory-bank.md - recover from CLI authentication timeouts using
pa auth logout
Example prompts for the agent
- Deploy the current Power Apps project to Power Platform
- Build and push latest code changes to the live environment
- Redeploy the application and record details in memory-bank.md
How to install deploy
1Plugin marketplace
/plugin marketplace add microsoft/power-platform-skills/plugin install code-apps-preview@power-platform-skillsThis installs the whole code-apps-preview plugin with all its skills
2Skills CLI (Vercel)
npx skills add microsoft/power-platform-skills --skill deploy -a claude-code3Manually: put the files in place
~/.claude/skills/deploy/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/deploy/
1Skills CLI (Vercel)
npx skills add microsoft/power-platform-skills --skill deploy -a codex2Manually: put the files in place
.agents/skills/deploy/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add microsoft/power-platform-skills --skill deploy -a cursor2Manually: put the files in place
.cursor/skills/deploy/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install microsoft/power-platform-skills plugins/code-apps/skills/deploy2Manually: put the files in place
.github/skills/deploy/SKILL.md1Skills CLI (Vercel)
npx skills add microsoft/power-platform-skills --skill deploy -a gemini-cli2Platform CLI
gemini skills install https://github.com/microsoft/power-platform-skills --path plugins/code-apps/skills/deployManually: put the files in place
.devin/skills/deploy/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about deploy
How to install deploy in Claude Code?
Run both marketplace commands in sequence: /plugin marketplace add microsoft/power-platform-skills and then /plugin install code-apps-preview@power-platform-skills.
What does the deploy skill do?
It compiles code via npm run build, asks for user approval, and pushes the application to Power Platform using the dedicated CLI.
How does deploy handle build errors?
It silently fixes TS6133 unused imports and retries. For any other TypeScript compilation issue, it reports the exact file and line before stopping immediately.
Source text
SKILL.md · MIT
---
name: deploy
description: Builds and deploys a Power Apps code app to Power Platform. Use when deploying changes, redeploying an existing app, or pushing updates.
user-invocable: true
allowed-tools: Read, Edit, Write, Grep, Glob, Bash
model: sonnet
---
**📋 Shared Instructions: [shared-instructions.md](${PLUGIN_ROOT}/shared/shared-instructions.md)** - Cross-cutting concerns.
# Deploy
Builds and deploys the app in the current directory to Power Platform.
## Workflow
1. Check Memory Bank → 2. Build → 3. Deploy → 4. Update Memory Bank
---
### Step 1: Check Memory Bank
Check for `memory-bank.md` in the project root. If found, read it for the project name and environment. If not found, proceed — the project may have been created without the plugin.
### Step 2: Build
```bash
npm run build
```
If the build fails:
- **TS6133 (unused import)**: Remove the unused import and retry.
- **Other TypeScript errors**: Report the error with the file and line number and stop. Do not deploy a broken build.
Verify `dist/` exists with `index.html` before continuing.
### Step 3: Deploy
Ask the user: _"Ready to deploy to [environment name]? This will update the live app."_ Wait for explicit confirmation before proceeding.
> Resolve the CLI first (see [cli-binary.md](${PLUGIN_ROOT}/shared/cli-binary.md)): run as `$PA app push` (`npx --no-install pa …`), never a bare `pa`. On `power-apps`-only projects, translate to `power-apps push`.
```bash
pa app push
```
Capture the app URL from the output if present.
If deploy fails, report the error and stop — do not retry silently. Common fixes:
- Auth error / token expired → `pa auth logout` (or `power-apps logout` on `power-apps`-only projects), then retry — the CLI will re-prompt browser login.
- Environment mismatch → update `environmentId` in `power.config.json` to the correct value and retry.
### Step 4: Update Memory Bank
If `memory-bank.md` exists, update:
- Last deployed timestamp
- App URL (if captured)
© Microsoft · MIT · microsoft/power-platform-skills
Similar skills
All skills for Cloud: AWS, Azure, GCP →deploy by other authors comes first.