Agent skill
power-platform
Expert guidance for Microsoft Power Platform development including PAC CLI, ALM lifecycle, solution management, environment strategy, and CI/CD pipelines. Use when working with Power Platform solutions, environment promotion, managed/unmanaged solutions, or Power Platform Build Tools.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/power-platform
SKILL.md
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
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?