microsoft/power-platform-skills / plugins/pcf/skills/pcf
pcf
VerifiedBuilds, tests, diagnoses, upgrades, deploys and verifies Power Apps component framework (PCF) code components for model-driven apps and Power Pages — field and dataset controls, standard and virtual (React) — from Microsoft-maintained templates and recipes pinned to a tested version matrix. Runs quality gates (manifest and host lint, source checks, lint, unit tests, production build), deploys with pac pcf push, verifies registration and form bindings, and guides Power Pages enablement, with guided setup for canvas apps. Use when the user wants to build, fix, upgrade, deploy or check a PCF control or code component, or asks why one fails to build, import, update or render. For a whole page use /model-apps:genpage; for a whole app use /model-apps:app-builder.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 14.1 KB |
| bind-flow.md | markdown | 3.4 KB |
| create-flow.md | markdown | 7.7 KB |
| deploy-flow.md | markdown | 4.9 KB |
| pages-flow.md | markdown | 4.4 KB |
| upgrade-flow.md | markdown | 4.1 KB |
deploy-flow.md
View on GitHub# /pcf deploy flow
Deployment writes to an environment. Obtain explicit consent before the write: environment origin, solution unique name or publisher prefix, and acknowledgement that `pac pcf push` publishes all pending customizations. PCF packaging and Dataverse solution ALM are documented by Microsoft Learn at https://learn.microsoft.com/en-us/power-apps/developer/component-framework/import-custom-controls and https://learn.microsoft.com/en-us/power-platform/alm/.
## Push for development verification
Preconditions:
- `pcf-gates.js` is green for the target hosts.
- For a canvas target, use the default model-driven gate profile and review canvas API limits by hand with the user; see [canvas guidance](../../references/pcf-canvas.md).
- Existing controls with an available previous manifest have passed `lint-pcf.js --manifest <current> --against <previous>`. If no baseline exists, the report says compatibility was not compared.
- Auth passed with `check-auth.js --env <envUrl> --require-pac`.
- The target is safe to write.
- Consent is recorded.
Run:
```powershell
node "${PLUGIN_ROOT}/scripts/pcf-push.js" --project <dir> --env <url> (--solution <uniqueName> | --publisher-prefix <p>) [--incremental] [--verbosity minimal|normal|detailed|diagnostic] [--allow-dev-bundle] [--no-verify]
```
Hints:
- Prefer `--solution` for repeatable ALM. Use `--publisher-prefix` only when intentionally registering outside a known solution.
- Omit `--allow-dev-bundle` unless diagnosing a local-only development build.
- Omit `--no-verify` unless another verification step immediately follows.
## Import succeeded but old version runs
For canvas apps, follow the [Studio update steps](../../references/pcf-canvas.md#updates): change the manifest version, publish all customizations, then close and reopen the app. The form/cache checks below apply to model-driven apps and Pages.
If push/import succeeds but the old bundle still loads, check manifest version, solution version, publish state and browser cache. Bump the manifest `version` before each deploy; release packages also bump the solution `a.b.c.d` version. Publish the form/app customizations and hard refresh the browser. Same-version byte refresh was inconclusive in this release, so do not rely on it.
## Release packaging
Use development push for rapid validation; use a managed solution package for release.
Component-only package:
```powershell
pac solution init --publisher-name <PublisherName> --publisher-prefix <prefix>
pac solution add-reference --path <pcf-project-dir>
dotnet build -c Release -p:SolutionPackageType=Managed
```
Component plus bindings: add forms/views/apps that carry the bindings to the same solution before export/import. A component-only solution registers the control but does not place it on forms or Pages.
## Pipeline examples
The full example pipelines live in:
- [`../../pipelines/github-actions.yml`](../../pipelines/github-actions.yml)
- [`../../pipelines/azure-devops.yml`](../../pipelines/azure-devops.yml)
Do not duplicate those files in this flow. Use them as adaptable examples with these stages:
1. Install Power Platform tooling first (`microsoft/powerplatform-actions/actions-install@v1` in GitHub Actions or `PowerPlatformToolInstaller@2` in Azure DevOps).
2. Build the PCF project.
3. Run tests/gates.
4. Pack the managed solution.
5. Publish the solution artifact.
6. Import the artifact into the target environment.
Short excerpt only:
```yaml
# GitHub Actions: install tools before build/test/pack/import.
- uses: microsoft/powerplatform-actions/actions-install@v1
```
```yaml
# Azure DevOps: install tools before build/test/pack/import.
- task: microsoft-IsvExpTools.PowerPlatform-BuildTools.tool-installer.PowerPlatformToolInstaller@2
```
Microsoft documents Power Platform GitHub Actions at https://learn.microsoft.com/en-us/power-platform/alm/devops-github-actions and Power Platform Build Tools at https://learn.microsoft.com/en-us/power-platform/alm/devops-build-tools. The import stage needs the user's own service connection or credentials stored in the pipeline's secret store; never commit credentials or tenant-specific values in the pipeline YAML.
## After deploy
For model-driven targets and Power Pages form-field journeys, run `verify-pcf.js` from `bind-flow.md` or the intent form. For canvas-only targets, use the push registration read-back, or `pcf-inventory.js` for an existing registration; do not invent a model-driven form binding. Record the highest evidence level reached and say `runtime-not-checked` if no runtime journey was observed.
After a successful push for a canvas target, guide an admin to turn on **Power Apps component framework for canvas apps** in the target environment, then guide the user's Power Apps Studio **Add → Get more components → Code → Import** steps in [pcf-canvas.md](../../references/pcf-canvas.md). The skill does not read the setting or collect automated canvas runtime evidence. Report `runtime-not-checked` unless the user checks the control in Studio.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |