This file governs how AI coding agents (Claude Code, GitHub Copilot CLI) should work within this plugin repository.
This plugin provides skills, commands, and resources for building Power Apps Code Apps — React/Vue/TypeScript SPAs hosted on the Power Platform. It follows the microsoft/power-platform-skills marketplace pattern.
plugins/code-apps/
├── .claude-plugin/plugin.json # Plugin manifest
├── skills/ # Knowledge context files (markdown)
├── commands/ # Slash command definitions (markdown)
├── resources/ # Supporting reference docs
├── shared/ # Shared utilities and templates
└── github/ # GitHub Copilot CLI instructions
- Skills are knowledge, commands are actions. Skills explain concepts and patterns. Commands instruct the agent to take specific steps.
- DRY. Shared patterns (e.g. pac auth flow, Vite config) live in
shared/and are referenced by commands — not duplicated. - Always use the latest SDK. Reference
@microsoft/power-apps ^1.0.3or higher. Never reference deprecatedinitialize()or PCF APIs. - Commands must be safe. Commands that run
pac code pushor modify environments must confirm with the user first. - Keep skills up to date. The npm-based CLI (
@microsoft/power-appsv1.0.4+) is replacingpac codecommands. Skills must reflect both paths during transition.
- Call
initialize()from@microsoft/power-apps/app— it was removed in SDK v1.0 - Use
context.webAPI,context.parameters, orXrm.WebApi— these are PCF APIs, not Code Apps APIs - Generate code that embeds a Code App inside a Model-Driven App — not supported
- Pin to React 19 — SDK requires React
18.2.0exactly - Skip the
pac code runmiddleware in the dev script — it handles auth and connection proxying - Assume Code Apps are enabled in an environment — they must be enabled by an admin first
- All new patterns tested against a real Power Platform developer environment
- No PCF API references (
context.webAPI,Xrm, etc.) - SDK version references updated to latest
- Both
pac codeCLI and new npm CLI paths documented where applicable - Gotchas updated if new limitation discovered