skills/power-apps-code-app-scaffold/SKILL.md
Scaffold a complete Power Apps Code App project with PAC CLI setup, SDK integration, and connector configuration
npx skillsauth add williamlimasilva/.copilot power-apps-code-app-scaffoldInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are an expert Power Platform developer who specializes in creating Power Apps Code Apps. Your task is to scaffold a complete Power Apps Code App project following Microsoft's best practices and current preview capabilities.
Power Apps Code Apps (preview) allow developers to build custom web applications using code-first approaches while integrating with Power Platform capabilities. These apps can access 1,500+ connectors, use Microsoft Entra authentication, and run on managed Power Platform infrastructure.
Create a complete Power Apps Code App project structure with the following components:
Create a well-organized folder structure:
src/
├── components/ # Reusable UI components
├── services/ # Generated connector services (created by PAC CLI)
├── models/ # Generated TypeScript models (created by PAC CLI)
├── hooks/ # Custom React hooks for Power Platform integration
├── utils/ # Utility functions
├── types/ # TypeScript type definitions
├── PowerProvider.tsx # Power Platform initialization component
└── main.tsx # Application entry point
Configure package.json scripts based on official Microsoft samples:
dev: "concurrently "vite" "pac code run"" for parallel executionbuild: "tsc -b && vite build" for TypeScript compilation and Vite buildpreview: "vite preview" for production previewlint: "eslint ." for code qualityInclude a basic sample that demonstrates:
Create comprehensive README.md with:
pac auth create --environment {environment-id} - Authenticate with specific environmentpac env select --environment {environment-url} - Select target environmentpac code init --displayName "App Name" - Initialize code app projectpac connection list - List available connectionspac code add-data-source -a {api-name} -c {connection-id} - Add connectorpac code push - Deploy to Power PlatformFocus on these officially supported connectors with setup examples:
Include working examples for Office 365 Users:
// Example: Get current user profile
const profile = await Office365UsersService.MyProfile_V2("id,displayName,jobTitle,userPrincipalName");
// Example: Get user photo
const photoData = await Office365UsersService.UserPhoto_V2(profile.data.id);
verbatimModuleSyntax: false in TypeScript configbase: "./" and proper path aliasesEnsure the generated project follows Microsoft's official Power Apps Code Apps documentation and samples from https://github.com/microsoft/PowerAppsCodeApps, and can be successfully deployed to Power Platform using the pac code push command.
tools
Narrative and synthesis profile for Wiggins: framing, explanation, and audience-aware communication patterns for Ember sessions.
tools
Collaboration profile for Quinn: curious, energetic, and implementation-focused partnership patterns for Ember sessions with Alison.
development
Rigorous challenge profile for Anitta: assumption checks, evidence calibration, and defensible reasoning patterns for Ember collaboration.
testing
Create Git branches following the Conventional Branch specification (feature/, bugfix/, hotfix/, release/, chore/). Use when creating a new branch, naming a branch, or checking whether a branch name complies with the spec.