
Create Code App
Scaffold and wire prerequisites for a Power Apps code app with Node 22+, npm tooling, and the right Bash allowedPrompts for plan-mode agents.
Overview
create-code-app is an agent skill for the Build phase that lists tools, accounts, and allowedPrompts to scaffold Power Apps code apps with the Power Apps CLI.
Install
npx skills add https://github.com/microsoft/power-platform-skills --skill create-code-appWhat is this skill?
- Pins Node.js v22+ and optional Git with version check commands
- Power Apps CLI via @microsoft/power-apps-cli installed through npm scaffold—no separate global CLI
- Documented allowedPrompts for plan mode: degit scaffold, npm install, build, init, list-connections, add-data-source
- Requires Power Platform environment ID from make.powerapps.com URL
- End-to-end bash prompts for production build and project initialization
- Requires Node.js v22 or newer
- Documents seven categorized Bash allowedPrompt patterns for plan mode
Adoption & trust: 90 installs on skills.sh; 349 GitHub stars; 2/3 security scanners passed (skills.sh audits).
What problem does it solve?
Your agent keeps getting blocked in plan mode because Node, environment IDs, or Bash scopes were wrong for Power Apps code app scaffolding.
Who is it for?
Indie builders or consultants shipping custom Power Apps code apps who delegate scaffold and CLI steps to Claude Code, Cursor, or Codex.
Skip if: Canvas-only Power Apps with no code component, or teams without code apps enabled on their tenant.
When should I use this skill?
Starting a Power Apps code app from template when the agent needs version checks, scaffold, build, and power-apps CLI initialization.
What do I get? / Deliverables
You have verified prerequisites and a copy-paste allowedPrompts list so the agent can degit, install, build, and initialize a code app against your environment.
- Scaffolded code app project with dependencies installed
- Initialized power-apps project bound to the target environment
Recommended Skills
Journey fit
Code apps are built and configured before deployment to Power Platform, so the canonical shelf is Build where UI and data connections are assembled. Frontend fits custom code apps that compile with npm build and publish through power-apps CLI, even when they call Dataverse backends.
How it compares
Prerequisite map for Power Platform code apps—not a generic React scaffold skill.
Common Questions / FAQ
Who is create-code-app for?
Solo builders automating Power Apps code app setup who need Node, account, and CLI permission clarity before the agent runs shell commands.
When should I use create-code-app?
At the start of Build when creating a new code app project, before npm install, npx power-apps init, or adding Dataverse connections.
Is create-code-app safe to install?
It describes Bash and network actions against your tenant; review Security Audits on this page and scope allowedPrompts to the listed commands only.
SKILL.md
READMESKILL.md - Create Code App
# Prerequisites Reference ## Required Tools | Tool | Minimum Version | Check Command | Install | | -------------- | --------------- | ---------------- | ---------------------- | | Node.js | **v22+** | `node --version` | https://nodejs.org/ | | Git (optional) | Any | `git --version` | https://git-scm.com/ | The Power Apps CLI (`@microsoft/power-apps-cli`) is installed automatically as part of `npm install` when the project is scaffolded from the template. No separate CLI install is required. ## Required Account - Power Platform account with code apps enabled - At least one environment available - Know your environment ID: find it in the URL at make.powerapps.com, e.g. `https://make.powerapps.com/environments/<env-id>/home` ## Required Permissions (allowedPrompts) When using plan mode, include these in `allowedPrompts`: ```json { "allowedPrompts": [ { "tool": "Bash", "prompt": "check tool versions (node, git)" }, { "tool": "Bash", "prompt": "scaffold power apps template (npx degit)" }, { "tool": "Bash", "prompt": "install npm dependencies" }, { "tool": "Bash", "prompt": "build for production (npm run build)" }, { "tool": "Bash", "prompt": "initialize power apps project (npx power-apps init)" }, { "tool": "Bash", "prompt": "list connections (npx power-apps list-connections)" }, { "tool": "Bash", "prompt": "add data sources (npx power-apps add-data-source)" }, { "tool": "Bash", "prompt": "deploy to power platform (npx power-apps push)" } ] } ``` # Troubleshooting ## Common npm Scripts | Command | Purpose | | --------------- | ---------------------------------------- | | `npm run dev` | Local dev server (http://localhost:5173) | | `npm run build` | Build for production | | `npm run lint` | Run ESLint | ## Common Issues | Problem | Solution | | ----------------------- | ------------------------------------------------------------------ | | Build fails | Check Node.js 22+ version, run `npm install` | | Build fails with TS6133 | Unused imports cause errors in strict mode. Remove unused imports. | | Auth error | Run `npx power-apps logout`, then retry — the CLI will re-prompt browser login. | | No data | Verify user has read access to table, check browser console | | Local testing | Use same browser profile as Power Platform auth | ## Deploy Errors | Error | Fix | | ----------------------------------- | --------------------------------------------------------------------------------------------------------------- | | "environment config does not match" | Update `environmentId` in `power.config.json` to match the target environment, then retry. | | DNS/network error | Try different environment or contact admin. | | Auth error / token expired | Run `npx power-apps logout`, then retry `npx power-apps push` — CLI will prompt re-authentication via browser. | ## Resources **Docs:** - [Code Apps](https://learn.microsoft.com/power-apps/developer/code-apps/) - [CLI Reference](https://learn.microsoft.com/power-platform/developer/cli/reference/) - [Connectors](https://learn.microsoft.com/en-us/connectors/connector-reference/) - [Azure DevOps API](https://learn.microsoft.com/en-us/rest/api/azure/devops/?view=azure-devops-rest-7.2) - [Dataverse API](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/overview) **GitHub:** - [Template](https://github.com/microsoft/PowerAppsCodeApps) - [Issues](https:/