Power-Apps-Code-App-Scaffold
Power-Apps-Code-App-Scaffold是一款code方向的AI技能,核心价值是Scaffold a complete Power Apps Code App project with PAC CLI setup, SDK integration, and connector configuration,可用于解决开发者在code领域的实际问题,帮助用户提升效率、自动化重复任务或优化工作流。
Scaffold a complete Power Apps Code App project with PAC CLI setup, SDK integration, and connector configuration
mkdir -p ./skills/power-apps-code-app-scaffold && curl -sfL https://raw.githubusercontent.com/github/awesome-copilot/main/skills/power-apps-code-app-scaffold/SKILL.md -o ./skills/power-apps-code-app-scaffold/SKILL.md Run in terminal / PowerShell. Requires curl (Unix) or PowerShell 5+ (Windows).
Skill Content
# 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 point4. 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)
- Po
🎯 Best For
- Claude users
- GitHub Copilot users
- Software engineers
- Development teams
- Tech leads
💡 Use Cases
- Code quality improvement
- Best practice enforcement
📖 How to Use This Skill
- 1
Install the Skill
Copy the install command from the Terminal tab and run it. The SKILL.md file downloads to your local skills directory.
- 2
Load into Your AI Assistant
Open Claude or GitHub Copilot and reference the skill. Paste the SKILL.md content or use the system prompt tab.
- 3
Apply Power-Apps-Code-App-Scaffold to Your Work
Open your project in the AI assistant and ask it to apply the skill. Start with a small module to verify the output quality.
- 4
Review and Refine
Review AI suggestions before committing. Run tests, check for regressions, and iterate on the skill output.
❓ Frequently Asked Questions
Is Power-Apps-Code-App-Scaffold compatible with Cursor and VS Code?
Yes — this skill works with any AI coding assistant including Cursor, VS Code with Copilot, and JetBrains IDEs.
Do I need specific dependencies for Power-Apps-Code-App-Scaffold?
Check the install command and Works With section. Most code skills only require the AI assistant and your codebase.
How do I install Power-Apps-Code-App-Scaffold?
Copy the install command from the Terminal tab and run it. The skill downloads to ./skills/power-apps-code-app-scaffold/SKILL.md, ready to use.
Can I customize this skill for my team?
Absolutely. Edit the SKILL.md file to add team-specific instructions, examples, or workflows.
⚠️ Common Mistakes to Avoid
Skipping validation
Always test AI-generated code changes, even for simple refactors.
Missing dependency updates
Check if the skill requires updated dependencies or new packages.