
Power Apps Code Apps Scaffolding
OfficialFreeQuickly scaffold a complete Power Apps Code App project.
Free · Opens the source repo
What Power Apps Code Apps Scaffolding does
The Power Apps Code Apps Scaffolding skill is designed for developers who want to efficiently create a complete Power Apps Code App project by following Microsoft's best practices. This skill guides you through the initialization of a project using Vite, React, and TypeScript, setting it up with the necessary configurations for seamless integration with Power Platform capabilities. By leveraging the PAC CLI, you can quickly establish a project structure that is both organized and compliant with the requirements of Power Apps Code Apps.
This skill provides detailed instructions on how to set up essential configuration files, including vite.config.ts, power.config.json, and tsconfig.json. It also outlines the creation of a well-structured project folder that includes directories for components, services, models, and utilities, ensuring that your code is maintainable and scalable. The skill emphasizes the importance of development scripts, allowing you to run, build, and preview your application efficiently, while also maintaining code quality through linting.
Additionally, the skill includes a sample implementation that demonstrates key functionalities such as Power Platform authentication, connecting to supported connectors like Office 365 Users, and using TypeScript effectively. This hands-on approach helps developers understand the integration of various components and the application of best practices in real-world scenarios. Optional advanced patterns are also discussed, providing opportunities for further enhancement of your application, such as offline capabilities and internationalization.
Overall, this skill is ideal for Power Platform developers looking to streamline their project setup and ensure adherence to best practices while creating robust web applications using Power Apps Code Apps.
When to use it
Use this skill when starting a new Power Apps Code App project to ensure a well-structured and compliant setup.
When not to use it
This skill may not be suitable for developers who prefer a fully custom setup or those not using Power Apps Code Apps.
What you can build with it
Starting a New Project
When initiating a new Power Apps Code App project, this skill provides a structured approach to set up the environment and project files.
Integrating with Power Platform
Use this skill to ensure your application is properly configured to utilize Power Platform capabilities and connectors.
Learning Best Practices
Developers looking to understand best practices in Power Apps Code Apps development can benefit from the comprehensive setup and guidelines provided.
How to install Power Apps Code Apps Scaffolding
View source1. Install with the skills CLI
npx skills add github/awesome-copilot/power-apps-code-app-scaffold --agent claude-code2. Or install it manually
Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.
Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs
Inside SKILL.md
Written by githubPower Apps Code Apps Project Scaffolding
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.
Context
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.
Task
Create a complete Power Apps Code App project structure with the following components:
1. Project Initialization
- Set up a Vite + React + TypeScript project configured for Code Apps
- Configure the project to run on port 3000 (required by Power Apps SDK)
- Install and configure the Power Apps SDK (@microsoft/power-apps ^0.3.1)
- Initialize the project with PAC CLI (pac code init)
2. Essential Configuration Files
- vite.config.ts: Configure for Power Apps Code Apps requirements
- power.config.json: Generated by PAC CLI for Power Platform metadata
- PowerProvider.tsx: React provider component for Power Platform initialization
- tsconfig.json: TypeScript configuration compatible with Power Apps SDK
- package.json: Scripts for development and deployment
3. Project Structure
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
4. Development Scripts Setup
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 quality
5. Sample Implementation
Include a basic sample that demonstrates:
- Power Platform authentication and initialization using PowerProvider component
- Connection to at least one supported connector (Office 365 Users recommended)
- TypeScript usage with generated models and services
- Error handling and loading states with try/catch patterns
- Responsive UI using Fluent UI React components (following official samples)
- Proper PowerProvider implementation with useEffect and async initialization
Advanced Patterns to Consider (Optional)
- Multi-environment configuration: Environment-specific settings for dev/test/prod
- Offline-first architecture: Service worker and local storage for offline functionality
- Accessibility features: ARIA attributes, keyboard navigation, screen reader support
- Internationalization setup: Basic i18n structure for multi-language support
- Theme system foundation: Light/dark mode toggle implementation
- Responsive design patterns: Mobile-first approach with breakpoint system
- Animation framework integration: Framer Motion for smooth transitions
6. Documentation
Create comprehensive README.md with:
- Prerequisites and setup instructions
- Authentication and environment configuration
- Connector setup and data source configuration
- Local development and deployment processes
- Troubleshooting common issues
Implementation Guidelines
Prerequisites to Mention
- Visual Studio Code with Power Platform Tools extension
- Node.js (LTS version - v18.x or v20.x recommended)
- Git for version control
- Power Platform CLI (PAC CLI) - latest version
- Power Platform environment with Code Apps enabled (admin setting required)
- Power Apps Premium licenses for end users
- Azure account (if using Azure SQL or other Azure connectors)
PAC CLI Commands to Include
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 Platform
Officially Supported Connectors
Focus on these officially supported connectors with setup examples:
- SQL Server (including Azure SQL): Full CRUD operations, stored procedures
- SharePoint: Document libraries, lists, and sites
- Office 365 Users: Profile information, user photos, group memberships
- Office 365 Groups: Team information and collaboration
- Azure Data Explorer: Analytics and big data queries
- OneDrive for Business: File storage and sharing
- Microsoft Teams: Team collaboration and notifications
- MSN Weather: Weather data integration
- Microsoft Translator V2: Multi-language translation
- Dataverse: Full CRUD operations, relationships, and business logic
Sample Connector Integration
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);
Current Limitations to Document
- Content Security Policy (CSP) not yet supported
- Storage SAS IP restrictions not supported
- No Power Platform Git integration
- No Dataverse solutions support
- No native Azure Application Insights integration
Best Practices to Include
- Use port 3000 for local development (required by Power Apps SDK)
- Set
verbatimModuleSyntax: falsein TypeScript config - Configure vite.config.ts with
base: "./"and proper path aliases - Store sensitive data in data sources, not app code
- Follow Power Platform managed platform policies
- Implement proper error handling for connector operations
- Use generated TypeScript models and services from PAC CLI
- Include PowerProvider with proper async initialization and error handling
Deliverables
- Complete project scaffolding with all necessary files
- Working sample application with connector integration
- Comprehensive documentation and setup instructions
- Development and deployment scripts
- TypeScript configuration optimized for Power Apps Code Apps
- Best practices implementation examples
Ensure 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.
Frequently asked questions about Power Apps Code Apps Scaffolding
Similar skills
Rhino 3D Scripting
Streamline your Rhinoceros 3D scripting tasks.
MVVM Toolkit
Streamline ViewModel development with source generators.
FreeCAD Scripts
Generate Python scripts for FreeCAD automation and modeling.
Azure Architecture Builder
Design and deploy Azure infrastructure using natural language.
Command Development
Streamline your command creation for Claude Code.
Create Cowork Plugin
Easily build and package plugins through guided sessions.
