power-platform
Power Platform Development
Expert guidance for Microsoft Power Platform ALM, PAC CLI operations, solution management, and CI/CD pipelines.
Triggers
Use this skill when you see:
- power platform, pac cli, power platform cli
- solution export, solution import, managed solution
- power platform alm, environment promotion
- power platform ci/cd, build tools
- pcf init, plugin init, pac auth
Instructions
PAC CLI Authentication
# Create authentication profile
pac auth create --environment "https://myorg.crm.dynamics.com"
# Create with service principal (CI/CD)
pac auth create --applicationId <app-id> --clientSecret <secret> --tenant <tenant-id> --environment "https://myorg.crm.dynamics.com"
# List and select profiles
pac auth list
pac auth select --index 1
# Check current environment
pac env who
Solution Operations
# Export solution (unmanaged for development)
pac solution export --path ./solutions/MySolution.zip --name MySolution --managed false
# Export solution (managed for deployment)
pac solution export --path ./solutions/MySolution_managed.zip --name MySolution --managed true
# Import solution
pac solution import --path ./solutions/MySolution_managed.zip --publish-changes
# Unpack for source control (folder structure)
pac solution unpack --zipfile ./solutions/MySolution.zip --folder ./src/MySolution --processCanvasApps
# Pack from source control
pac solution pack --zipfile ./solutions/MySolution.zip --folder ./src/MySolution --processCanvasApps
# Publish customizations
pac solution publish
# Run solution checker
pac solution check --path ./solutions/MySolution.zip --geo unitedstates
Environment Management
# List environments
pac env list
# Select environment
pac env select --environment "https://myorg.crm.dynamics.com"
# Who am I (current context)
pac env who
# Copy environment (for testing)
pac env copy --source-env <source-id> --target-env <target-id> --type MinimalCopy
PCF and Plugin Init
# Initialize PCF control project
pac pcf init --namespace Contoso --name MyControl --template field --framework react --run-npm-install
# Initialize plugin project
pac plugin init
# Generate early-bound types
pac modelbuilder build
CI/CD with Azure DevOps Build Tools
# azure-pipelines.yml
trigger:
branches:
include:
- main
pool:
vmImage: 'windows-latest'
steps:
- task: microsoft-IsvExpTools.PowerPlatform-BuildTools.tool-installer.PowerPlatformToolInstaller@2
displayName: 'Install Power Platform Build Tools'
- task: microsoft-IsvExpTools.PowerPlatform-BuildTools.pack-solution.PowerPlatformPackSolution@2
displayName: 'Pack Solution'
inputs:
SolutionSourceFolder: '$(Build.SourcesDirectory)/src/MySolution'
SolutionOutputFile: '$(Build.ArtifactStagingDirectory)/MySolution_managed.zip'
SolutionType: 'Managed'
ProcessCanvasApps: true
- task: microsoft-IsvExpTools.PowerPlatform-BuildTools.checker.PowerPlatformChecker@2
displayName: 'Solution Checker'
inputs:
authenticationType: 'PowerPlatformSPN'
PowerPlatformSPN: 'PowerPlatformSPN'
FilesToAnalyze: '$(Build.ArtifactStagingDirectory)/MySolution_managed.zip'
RuleSet: '0ad12346-e108-40b8-a956-9a8f95ea18c9'
- task: microsoft-IsvExpTools.PowerPlatform-BuildTools.import-solution.PowerPlatformImportSolution@2
displayName: 'Import to Target'
inputs:
authenticationType: 'PowerPlatformSPN'
PowerPlatformSPN: 'PowerPlatformSPN'
SolutionInputFile: '$(Build.ArtifactStagingDirectory)/MySolution_managed.zip'
PublishChanges: true
CI/CD with GitHub Actions
# .github/workflows/deploy-solution.yml
name: Deploy Power Platform Solution
on:
push:
branches: [main]
jobs:
build-and-deploy:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Pack solution
uses: microsoft/powerplatform-actions/pack-solution@v1
with:
solution-folder: src/MySolution
solution-file: out/MySolution_managed.zip
solution-type: Managed
process-canvas-apps: true
- name: Import to target
uses: microsoft/powerplatform-actions/import-solution@v1
with:
environment-url: ${{ secrets.PP_ENV_URL }}
app-id: ${{ secrets.PP_APP_ID }}
client-secret: ${{ secrets.PP_CLIENT_SECRET }}
tenant-id: ${{ secrets.PP_TENANT_ID }}
solution-file: out/MySolution_managed.zip
publish-changes: true
Best Practices
| Practice | Description |
|---|---|
| Environment strategy | Use Dev (unmanaged) -> Test (managed) -> Prod (managed) promotion |
| Solution segmentation | Split large solutions by functional area (Core, UI, Integrations) |
| Unmanaged in dev only | Only develop in unmanaged; deploy managed to Test/Prod |
| Source control | Always unpack solutions to source control with pac solution unpack |
| Connection references | Use connection references instead of hardcoded connections |
| Environment variables | Store configuration in Dataverse environment variables |
| Solution checker | Run pac solution check before every deployment |
| Publisher prefix | Use a consistent publisher prefix across all components |
Common Workflows
New Solution Setup
- Create solution in dev environment with consistent publisher
- Add components (tables, apps, flows, etc.)
- Export and unpack to source control
- Set up CI/CD pipeline for automated deployment
- Configure environment variables and connection references
Environment Promotion
- Export unmanaged from Dev
- Pack as managed for deployment
- Run solution checker
- Import managed to Test, validate
- Import managed to Prod with approvals
- Verify post-deployment
Source Control Workflow
pac solution exportfrom dev environmentpac solution unpackto repo folder- Commit and push changes
- CI pipeline packs and deploys managed solution
- Use PRs for code review of customizations
More from housegarofalo/claude-code-base
mqtt-iot
Configure MQTT brokers (Mosquitto, EMQX) for IoT messaging, device communication, and smart home integration. Manage topics, QoS levels, authentication, and bridging. Use when setting up IoT messaging, smart home communication, or device-to-cloud connectivity. (project)
22devops-engineer-agent
Infrastructure and DevOps specialist. Manages Docker, Kubernetes, CI/CD pipelines, and cloud deployments. Expert in GitHub Actions, Azure DevOps, Terraform, and container orchestration. Use for deployment automation, infrastructure setup, or CI/CD optimization.
6postgresql
Design, optimize, and manage PostgreSQL databases. Covers indexing, pgvector for AI embeddings, JSON operations, full-text search, and query optimization. Use when working with PostgreSQL, database design, or building data-intensive applications.
6home-assistant
Ultimate Home Assistant skill - complete administration, wireless protocols (Zigbee/ZHA/Z2M, Z-Wave JS, Thread, Matter), ESPHome device building, advanced troubleshooting, performance optimization, security hardening, custom integration development, and professional dashboard design. Covers configuration, REST API, automation debugging, database optimization, SSL/TLS, Jinja2 templating, and HACS custom cards. Use for any HA task.
6testing
Comprehensive testing skill covering unit, integration, and E2E testing with pytest, Jest, Cypress, and Playwright. Use for writing tests, improving coverage, debugging test failures, and setting up testing infrastructure.
5react-typescript
Build modern React applications with TypeScript. Covers React 18+ patterns, hooks, component architecture, state management (Zustand, Redux Toolkit), server components, and best practices. Use for React development, TypeScript integration, component design, and frontend architecture.
5