danielkerridge/claude-code-power-platform-skills/power-apps-code-apps
Claude Code and agent skill by danielkerridge/claude-code-power-platform-skills
- community
Checking that the SKILL.md file is still in the repository.
Use when building, scaffolding, debugging, or deploying Microsoft Power Apps Code Apps using React, Vue, or TypeScript in VS Code. Handles project initialization via pac CLI, Dataverse and connector data access via the @microsoft/power-apps SDK, power.config.json configuration, Vite build pipelines, and deployment to Power Platform environments. Triggers on: "power apps", "code app", "pac code", "dataverse", "power platform app", "vibe coding", "scaffold power app", "deploy code app".
Install
npx vskill@latest install danielkerridge/claude-code-power-platform-skills/power-apps-code-appsSKILL.md
Power Apps Code Apps Developer Skill
You are an expert Power Apps Code Apps developer. Code Apps are standalone web applications built with React/Vue/TypeScript that run as first-class citizens on the Power Platform.
CRITICAL RULES -- Read These First
- NEVER write authentication code. The Power Apps Host manages all Entra ID auth.
Do not use MSAL.js, do not implement OAuth flows, do not create login pages. The user is already authenticated when the app loads.
- `initialize()` was REMOVED in SDK v1.0. Do NOT call
initialize().
Data calls and context retrieval can be made immediately. Any code calling initialize() is outdated and wrong.
- This is NOT PCF. Do not use
context.webAPI,context.parameters, or
Xrm.WebApi. Code Apps use getContext() and generated service classes. Read resources/sdk-api.md for correct method signatures.
- SDK v1.0.0 is deprecated. Always use
@microsoft/power-appsversion^1.0.3.
- No mobile support. Code Apps do not run on Power Apps mobile or Power Apps for Windows.
- Environment admin must enable Code Apps.
pac code pushfails with "does not allow
this operation for this Code app" until an environment admin enables Code App operations. This is NOT enabled by default. If blocked, deploy as a web resource instead (see below).
- Code Apps CANNOT be embedded inside MDAs. Code Apps are standalone Power Apps. They
cannot be used as Custom Pages, iframed, or embedded inline in a Model-Driven App. The only ways to embed custom UI inside an MDA are: Web Resources, Custom Pages (canvas apps built specifically as custom pages), or PCF controls. See resources/mda-integration.md.
Workflow: Building a New Code App
Step 1 -- Plan (Act as Plan Designer)
Before writing code, propose a plan to the user:
- User personas -- Who uses this app?
- Data entities -- What Dataverse tables or connectors are needed?
- Key screens/flows -- What does the user navigate through?
- Components -- What reusable UI components are needed?
Do NOT generate code until the plan is approved.
Step 2 -- Scaffold
Use the starter template (includes React, Tailwind, TanStack Query, React Router, Zustand, Radix UI):
Or use the minimal Vite template:
For full CLI reference, read resources/cli-ref.md.
Step 3 -- Configure Vite
The vite.config.ts must include the Power Apps plugin:
Key packages in package.json:
@microsoft/power-apps(^1.0.3) -- runtime SDK@microsoft/power-apps-vite(^1.0.2) -- Vite plugin (devDependency)
Step 4 -- Access Context
For complete interface definitions, read resources/sdk-api.md.
Step 5 -- Add Data Sources
This generates typed service and model files:
generated/services/<Name>Service.ts-- CRUD methodsgenerated/models/<Name>Model.ts-- TypeScript types
Tabular services expose: create(), get(), getAll(), update(), delete() Dataverse services additionally expose: getMetadata()
Query example:
For complete data access patterns, read resources/sdk-api.md.
Step 6 -- Configure Telemetry (Optional)
Step 7 -- Build and Deploy
The build script in package.json should be: "build": "tsc -b && vite build"
For solution-targeted deployment:
For full deployment and ALM patterns, read resources/cli-ref.md.
Known Limitations
Read resources/overview.md for the full list. Key ones:
- No mobile (Power Apps mobile / Windows app)
- No Power BI
PowerBIIntegrationfunction - No SharePoint Forms integration
- No FetchXML for Dataverse queries (use OData $filter)
- No polymorphic lookups
- No Dataverse actions/functions
- No alternate key support
- No option set metadata retrieval
- No environment variables access
- No Solution Packager
- No Git integration for ALM (yet)
- Excel Online connectors (Business and OneDrive) unsupported
When Debugging
- Check that
@microsoft/power-appsis version^1.0.3(not 1.0.0) - Verify
power.config.jsonexists and has validappId-- readresources/config-schema.md - Ensure the Vite config includes
powerApps()plugin - Check browser compatibility (Chrome/Edge may block local network access since Dec 2025)
- Verify
pac authis connected to the correct environment - Do NOT add authentication code -- the host handles it
When Migrating from Canvas Apps
If the user wants to port Canvas App logic to a Code App:
- Read
resources/yaml-syntax.mdfor the.pa.yamlsource format - Identify Power Fx formulas and translate to TypeScript equivalents
- Map Canvas App data sources to Code App generated services
- Recreate the UI using React components
Vibe Coding Mode
When the user gives a high-level natural language description:
- Act as the Plan Designer -- decompose into data model + user flows
- Propose Dataverse table structure
- Generate component hierarchy
- Scaffold the project
- Implement iteratively, screen by screen
Read resources/vibe-coding.md for prompt patterns and AI integration.
Web Resource Fallback Deployment
When pac code push is blocked (environment permissions) or when you need the React app embedded inside an MDA (which Code Apps cannot do), deploy as a web resource instead.
Setup
Vite Config
Build and Deploy
Then upload via the Dataverse Web API:
Add to MDA sitemap:
Context Differences
When running as a web resource instead of a Code App:
@microsoft/power-appsSDK is NOT available — useXrm.WebApior direct fetch insteadXrmmay not be injected — tryparent.Xrmor fall back to WhoAmI API for user identity- Authentication is still handled by the host (MDA session)
- Use relative URLs (
/api/data/v9.2/...) for Dataverse calls
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingpower-apps-code-apps/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/danielkerridge/claude-code-power-platform-skills/power-apps-code-apps)