power-apps-code-app-scaffold

Scaffold a complete Power Apps Code App project with PAC CLI setup, SDK integration, and connector configuration

25 stars

Best use case

power-apps-code-app-scaffold is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Scaffold a complete Power Apps Code App project with PAC CLI setup, SDK integration, and connector configuration

Teams using power-apps-code-app-scaffold should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/power-apps-code-app-scaffold/SKILL.md --create-dirs "https://raw.githubusercontent.com/ComeOnOliver/skillshub/main/skills/github/awesome-copilot/power-apps-code-app-scaffold/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/power-apps-code-app-scaffold/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How power-apps-code-app-scaffold Compares

Feature / Agentpower-apps-code-app-scaffoldStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Scaffold a complete Power Apps Code App project with PAC CLI setup, SDK integration, and connector configuration

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Power 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 execution
- `build`: "tsc -b && vite build" for TypeScript compilation and Vite build
- `preview`: "vite preview" for production preview
- `lint`: "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 environment
- `pac env select --environment {environment-url}` - Select target environment
- `pac code init --displayName "App Name"` - Initialize code app project
- `pac connection list` - List available connections
- `pac code add-data-source -a {api-name} -c {connection-id}` - Add connector
- `pac 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:
```typescript
// 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: false` in 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

1. Complete project scaffolding with all necessary files
2. Working sample application with connector integration
3. Comprehensive documentation and setup instructions
4. Development and deployment scripts
5. TypeScript configuration optimized for Power Apps Code Apps
6. 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.

Related Skills

scaffolding-oracle-to-postgres-migration-test-project

25
from ComeOnOliver/skillshub

Scaffolds an xUnit integration test project for validating Oracle-to-PostgreSQL database migration behavior in .NET solutions. Creates the test project, transaction-rollback base class, and seed data manager. Use when setting up test infrastructure before writing migration integration tests, or when a test project is needed for Oracle-to-PostgreSQL validation.

powerbi-modeling

25
from ComeOnOliver/skillshub

Power BI semantic modeling assistant for building optimized data models. Use when working with Power BI semantic models, creating measures, designing star schemas, configuring relationships, implementing RLS, or optimizing model performance. Triggers on queries about DAX calculations, table relationships, dimension/fact table design, naming conventions, model documentation, cardinality, cross-filter direction, calculation groups, and data model best practices. Always connects to the active model first using power-bi-modeling MCP tools to understand the data structure before providing guidance.

power-platform-mcp-connector-suite

25
from ComeOnOliver/skillshub

Generate complete Power Platform custom connector with MCP integration for Copilot Studio - includes schema generation, troubleshooting, and validation

power-bi-report-design-consultation

25
from ComeOnOliver/skillshub

Power BI report visualization design prompt for creating effective, user-friendly, and accessible reports with optimal chart selection and layout design.

power-bi-performance-troubleshooting

25
from ComeOnOliver/skillshub

Systematic Power BI performance troubleshooting prompt for identifying, diagnosing, and resolving performance issues in Power BI models, reports, and queries.

power-bi-model-design-review

25
from ComeOnOliver/skillshub

Comprehensive Power BI data model design review prompt for evaluating model architecture, relationships, and optimization opportunities.

power-bi-dax-optimization

25
from ComeOnOliver/skillshub

Comprehensive Power BI DAX formula optimization prompt for improving performance, readability, and maintainability of DAX calculations.

flowstudio-power-automate-mcp

25
from ComeOnOliver/skillshub

Connect to and operate Power Automate cloud flows via a FlowStudio MCP server. Use when asked to: list flows, read a flow definition, check run history, inspect action outputs, resubmit a run, cancel a running flow, view connections, get a trigger URL, validate a definition, monitor flow health, or any task that requires talking to the Power Automate API through an MCP tool. Also use for Power Platform environment discovery and connection management. Requires a FlowStudio MCP subscription or compatible server — see https://mcp.flowstudio.app

flowstudio-power-automate-debug

25
from ComeOnOliver/skillshub

Debug failing Power Automate cloud flows using the FlowStudio MCP server. Load this skill when asked to: debug a flow, investigate a failed run, why is this flow failing, inspect action outputs, find the root cause of a flow error, fix a broken Power Automate flow, diagnose a timeout, trace a DynamicOperationRequestFailure, check connector auth errors, read error details from a run, or troubleshoot expression failures. Requires a FlowStudio MCP subscription — see https://mcp.flowstudio.app

flowstudio-power-automate-build

25
from ComeOnOliver/skillshub

Build, scaffold, and deploy Power Automate cloud flows using the FlowStudio MCP server. Load this skill when asked to: create a flow, build a new flow, deploy a flow definition, scaffold a Power Automate workflow, construct a flow JSON, update an existing flow's actions, patch a flow definition, add actions to a flow, wire up connections, or generate a workflow definition from scratch. Requires a FlowStudio MCP subscription — see https://mcp.flowstudio.app

azure-static-web-apps

25
from ComeOnOliver/skillshub

Helps create, configure, and deploy Azure Static Web Apps using the SWA CLI. Use when deploying static sites to Azure, setting up SWA local development, configuring staticwebapp.config.json, adding Azure Functions APIs to SWA, or setting up GitHub Actions CI/CD for Static Web Apps.

developing-ios-apps

25
from ComeOnOliver/skillshub

Develops iOS/macOS applications with XcodeGen, SwiftUI, and SPM. Handles Apple Developer signing, notarization, and CI/CD pipelines. Triggers on XcodeGen project.yml, SPM dependency issues, device deployment, code signing errors (Error -25294, keychain mismatch, adhoc fallback, EMFILE, notarization credential conflict, continueOnError), camera/AVFoundation debugging, iOS version compatibility, "Library not loaded @rpath", Electron @electron/osx-sign/@electron/notarize config, notarytool, GitHub Actions secrets in conditionals, or certificate/provisioning problems. Use when building iOS/macOS apps, fixing Xcode build failures, deploying to real devices, or configuring CI/CD signing pipelines.