Skip to content

microsoft/power-platform-skills / plugins/pcf/skills/pcf

Builds, 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.

FileKindSize
SKILL.mdskill md14.1 KB
bind-flow.mdmarkdown3.4 KB
create-flow.mdmarkdown7.7 KB
deploy-flow.mdmarkdown4.9 KB
pages-flow.mdmarkdown4.4 KB
upgrade-flow.mdmarkdown4.1 KB

bind-flow.md

View on GitHub
# /pcf bind flow

Binding places a registered PCF control on a model-driven form, grid or Power Apps grid configuration. Microsoft Learn documents code components at https://learn.microsoft.com/en-us/power-apps/developer/component-framework/overview and grid customizers at https://learn.microsoft.com/en-us/power-apps/developer/component-framework/customize-editable-grid-control.

## Modern designer field binding

1. Open the table form in the modern designer.
2. Select the target column.
3. Open **Components** → **+ Component**.
4. Pick the PCF component.
5. Map bound/input properties.
6. Choose clients.
7. Select **Done**, then **Save** and **Publish**.

## Classic designer field binding

1. Open the field properties.
2. Open **Controls**.
3. Select **Add Control…** and choose the PCF.
4. Map properties, choose web/phone/tablet clients, save and publish.

## Sub-grid and dataset binding

- Modern designer: select the sub-grid, open **Components**, add the dataset control, map property sets, save and publish.
- Classic designer: select the sub-grid or table-wide control surface, open the **Controls** tab, add the dataset control, map property sets, save and publish.

## Power Apps grid customizer

For the Power Apps grid, configure the grid's **Customizer control** property with the full control name, for example `<publisher prefix>_Contoso.Controls.GridCustomizer`. Each grid can have one customizer control. Use the `grid-customizer` recipe README for the supported bridge pattern.

## Verify binding

Run after saving and again after publishing:

```powershell
node "${PLUGIN_ROOT}/scripts/verify-pcf.js" --env <url> --control <prefix_ns.ctor> [--version <x.y.z>] --table <logical> --form <name|guid> (--column <col>|--control-id <id>) [--clients web,phone,tablet] [--param name=column:<col>] [--param name=static:<value>[:<type>]] [--workspace <dir>]
node "${PLUGIN_ROOT}/scripts/verify-pcf.js" --env <url> --control <prefix_ns.ctor> [--version <x.y.z>] --intent @pcf-intent.json [--workspace <dir>]
```

In `--param name=static:<value>[:<type>]`, the text after the last colon is the type only when it is a PCF property type such as `Whole.None`; otherwise it is part of the value, so `site=static:https://contoso.example` keeps its colons.

Two checks are distinct and must not be conflated:

- **Clients**: `--clients` names clients that must use this control. Default is web. Intent `clients` arrays must contain at least one of `web`, `phone` or `tablet` after trimming. If a requested client does not use the control, verifier reports `PCF_BIND_CLIENT_MISSING`.
- **Form factors**: every FormXML binding must declare all three factors: phone `0`, tablet `1`, web `2`. A test-environment probe on 2026-09-29 observed the platform reject a web-only declaration with `Custom control declaration for form factor(s) 0,1 is missing`. Verifier reports `PCF_BIND_FACTOR_UNDECLARED` as an error. This is separate from runtime `context.client.getFormFactor()` values documented at https://learn.microsoft.com/en-us/power-apps/developer/component-framework/reference/client/getformfactor.

## Unbind and teardown

Before deleting or replacing a control, remove it from every form/grid or reset to the default control, save and publish, then verify again. Observed behavior on 2026-09-29: deleting a bound control failed until unbind → publish → delete. Use `pcf-inventory.js --env <url> --where-used` as a dependency hint, not as proof that Liquid/text references do not exist.
finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the workStars: 322kUpdated Claude CodeCodexVerifiedInstall
systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixesStars: 322kUpdated Claude CodeCodexVerifiedInstall
test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation codeStars: 322kUpdated Claude CodeCodexVerifiedInstall
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: 198kUpdated Claude CodeCodexVerifiedInstall