[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7B9WDWXCJZVAFM8MVEZSMWK":3,"skill-same:01M7B9WDWXCJZVAFM8MVEZSMWK":67},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":27,"commitSha":28,"skillDirectory":29,"forksCount":30,"repositoryHtmlUrl":31,"repositoryHomepageUrl":6,"ownerHtmlUrl":32,"ownerBlogUrl":33,"ownerDescription":34,"updatedAt":35,"install":36,"resources":48},"01M7B9WDWXCJZVAFM8MVEZSMWK","create-pcf",null,"Create or extend Power Apps Component Framework (PCF) controls for model-driven apps (model apps). Use when building custom field editors, ratings, toggles, sliders, pickers, or dataset controls with virtual React controls and platform-provided Fluent UI v9. Includes null-to-default behavior, accessibility, keyboard navigation, form lifecycle, and host-runtime validation.","microsoft\u002Fpower-cat-skills","microsoft","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F6154722?v=4","01M698VYDXZ6JW5WH3CRV650R8","Microsoft","01M711HNR06SENTW4XRAD4QG81",70,"MIT","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fpower-cat-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fpowercat-pcf\u002Fskills\u002Fcreate-pcf\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: create-pcf\nversion: 1.0.0\ndescription: \"Create or extend Power Apps Component Framework (PCF) controls for model-driven apps (model apps). Use when building custom field editors, ratings, toggles, sliders, pickers, or dataset controls with virtual React controls and platform-provided Fluent UI v9. Includes null-to-default behavior, accessibility, keyboard navigation, form lifecycle, and host-runtime validation.\"\nuser-invocable: true\nallowed-tools: Read, Write, Edit, Bash, Glob, Grep, WebFetch, WebSearch, AskUserQuestion\n---\n\n# Create a virtual PCF control for model-driven apps\n\nProduce a working TypeScript PCF project, not just a design or code excerpt. Always scaffold each new control with `pac pcf init --framework react`, use the host's React and Fluent UI v9 platform libraries, and author control logic\u002Fcomponents\u002Ftests in `.ts`\u002F`.tsx`, never plain JavaScript. Never modify auto-generated files. Use `context.webAPI` for Dataverse operations and solution packaging for releases and cross-environment promotion. Do not deploy without explicit approval.\n\nRead the [quality checklist](.\u002Freferences\u002Fquality-checklist.md) when defining acceptance criteria and again when selecting validation cases.\n\nLoad these original, official-documentation-based references as needed:\n\n- [Component patterns](.\u002Freferences\u002Fcomponent-patterns.md) when selecting widgets and designing field\u002Fdataset interactions.\n- [Manifest reference](.\u002Freferences\u002Fmanifest-reference.md) before changing bindings, resources, types, or feature declarations.\n- [Virtual control lifecycle](.\u002Freferences\u002Fcontrol-lifecycle.md) before implementing data flow, host reconciliation, async work, or cleanup.\n\nThe references distinguish platform facts from this plugin's design policies. Follow their official source links to resolve current API\u002Fschema details; do not copy or reconstruct third-party skills or examples.\n\n## 1. Discover the project and agree on the behavior\n\nInspect repository instructions, existing PCF projects, manifests, generated types, dependencies, shared helpers, localization resources, and tests before editing. Preserve unrelated changes. Extend an existing virtual control where possible; do not replace a standard control by changing only its manifest.\n\nAsk only for missing decisions:\n\n- Control name, namespace, workspace\u002Foutput folder, and whether this is a new control or an extension.\n- Field control bound to a single column, or dataset control bound to a table view\u002Fsubgrid; target placements and device sizes.\n- For fields: bound column name\u002Ftype, allowed values\u002Franges, precision, requiredness, and metadata-driven options. Do not treat choice labels as stored values.\n- For datasets: table\u002Fview\u002Fsubgrid, dataset name, columns\u002Fproperty-set mappings, sorting\u002Ffiltering\u002Fpaging, selection\u002Fnavigation, and any row editing or commands.\n- Whether this is a text box or a non-text editor; the desired control-specific default, activation gesture, and commit\u002Fcancel behavior.\n- Clear-to-null availability, validation rules, disabled\u002Fread-only and field-security expectations.\n- Display label, accessible name\u002Fhelp text, languages, and any additional integration or offline requirements.\n- For packaging: solution name, publisher name\u002Fprefix, version, and managed\u002Funmanaged outputs. For deployment: target environment(s), package type per environment, and authorization.\n\nFor each non-text field editor, agree on a small state table: stored value, display, activation\u002Fdefault, commit, cancellation, clearing, and unavailable\u002Fdisabled behavior. Default selection must be deterministic and valid for the configured metadata. Do not invent a default, choose the first option silently, or mistake `0` or `false` for null. Dataset controls retain appropriate loading\u002Fempty\u002Ferror states; apply the null contract to nullable cell editors, not an empty grid.\n\nPresent a concise implementation summary and acceptance criteria before making materially different design choices. Do not create a planning document unless requested.\n\n## 2. Verify tooling and the supported shared runtime\n\nCheck PAC CLI, Node\u002Fnpm, MSBuild and its required .NET\u002Fbuild tools, and the project's build requirements. Consult the current official documentation:\n\n- [React controls and platform libraries](https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fpower-apps\u002Fdeveloper\u002Fcomponent-framework\u002Freact-controls-platform-libraries)\n- [PAC PCF commands](https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fpower-platform\u002Fdeveloper\u002Fcli\u002Freference\u002Fpcf)\n- [PCF best practices](https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fpower-apps\u002Fdeveloper\u002Fcomponent-framework\u002Fcode-components-best-practices)\n- [Debugging and test harness](https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fpower-apps\u002Fdeveloper\u002Fcomponent-framework\u002Fdebugging-custom-controls)\n- [PCF solution packaging](https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fpower-apps\u002Fdeveloper\u002Fcomponent-framework\u002Fimport-custom-controls)\n- [PAC solution commands](https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fpower-platform\u002Fdeveloper\u002Fcli\u002Freference\u002Fsolution)\n- [Code component ALM](https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fpower-apps\u002Fdeveloper\u002Fcomponent-framework\u002Fcode-components-alm)\n\nUse the consumer's configured npm registry for every npm operation and honor their organization policies. Never pass `--registry`, modify registry configuration, or bypass a configured proxy. This skill does not require a Microsoft-internal feed. On a version 404, query that same configured registry with `npm view \u003Cpackage> versions --json`. Pin the newest available version compatible with both the documented platform contract and the project's tooling in the manifest and lockfile. If none exists, report the versions and compatibility blocker.\n\nThe documentation consulted when this skill was authored lists:\n\n| Platform library | Manifest contract | Documented runtime |\n|------------------|-------------------|--------------------|\n| React | `16.14.0` | `17.0.2` in model-driven apps |\n| Fluent v9 | `>=9.4.0 \u003C=9.46.2` | `9.68.0` |\n\nThese are a reference snapshot, not a promise of current availability. Recheck before scaffolding. A higher runtime version does **not** authorize targeting its newer APIs. Align build dependencies, React type definitions, and Fluent imports with the supported contract; do not use React 18 APIs such as `createRoot` or `useId`.\n\n## 3. Scaffold or extend the virtual project\n\nAlways use `pac pcf init` to scaffold every new control in its agreed empty project directory. Never hand-create a substitute scaffold, copy another control as the scaffold, or use a JavaScript\u002Fnon-React template. Choose one of:\n\n```powershell\npac pcf init --namespace \u003CNamespace> --name \u003CControlName> --template field --framework react\n```\n\n```powershell\npac pcf init --namespace \u003CNamespace> --name \u003CControlName> --template dataset --framework react\n```\n\nReplace placeholders with validated values. A `field` control binds its primary bound property to one column; a `dataset` control binds a manifest `data-set` to a view\u002Fsubgrid, with `property-set` mappings where needed. Inspect `pac pcf init --help` for the installed CLI's options and installation defaults. Restore dependencies only after scaffolding\u002Fchanging dependency manifests or a missing-dependency failure. Reuse the scaffold's `pcf-scripts`, generated types, and build pipeline; do not introduce a separate app bundler.\n\nFor an existing virtual project, preserve its PAC-generated scaffold and extend its editable source; do not rerun initialization over existing files. If a separate control is needed, initialize it with `pac pcf init` in a new directory.\n\nFor an existing standard control, scaffold a new React control and port its behavior into the virtual lifecycle, preserving identifiers\u002Fcontracts only where supported. Plan solution\u002Fform migration explicitly rather than flipping `control-type`.\n\n### TypeScript and generated-file boundaries\n\n- Author implementation and test source in TypeScript (`.ts`\u002F`.tsx`); never add handwritten `.js`\u002F`.jsx` control logic or bypass types with `any` casts.\n- Never modify auto-generated files: `generated\u002FManifestTypes.d.ts`, generated manifests, bundles, source maps, build intermediates, or packaged\u002Fextracted solution outputs. Do not patch tool-owned generated metadata.\n- Edit authored inputs such as `ControlManifest.Input.xml`, `index.ts`, presentation `.tsx`, RESX, and supported project configuration; these editable scaffold inputs are distinct from regenerated output.\n- Change the input manifest and run the scaffold's generation\u002Fbuild command to regenerate types. Resolve errors in authored source\u002Finputs, not by editing generated declarations.\n- Use PAC commands for solution initialization\u002Freferences and MSBuild properties for package selection. Tool-generated JavaScript build output is expected, but is never hand-authored or edited.\n\n### Manifest and library contract\n\n- Set `control-type=\"virtual\"`.\n- Declare `platform-library` resources for React and Fluent v9 using currently supported versions.\n- Import Fluent components from `@fluentui\u002Freact-components`; do not use `@fluentui\u002Freact` (v8).\n- Define typed bound\u002Finput properties, required resources, localized display\u002Fdescription keys, and feature usage actually needed.\n- Use generated `IInputs`\u002F`IOutputs`. Do not hand-edit generated types.\n- Let the PCF build externalize the declared platform libraries. Do not ship React, ReactDOM, or a second Fluent v9 implementation in the control bundle.\n- Inspect imports and production bundle module evidence (build stats\u002Fsource maps where available) to confirm externalization. A small bundle alone is not proof. Additional libraries, including icon packages, are not automatically host-provided; justify and measure them.\n\n### Lifecycle and data flow\n\n- Implement `ComponentFramework.ReactControl\u003CIInputs, IOutputs>`.\n- `init` captures the output callback and initializes supported subscriptions\u002Fresize tracking. There is no DOM container parameter for a virtual control.\n- `updateView` returns a `React.ReactElement`; the platform renders it. Do not call `ReactDOM.render`, create a React root, or manipulate host DOM.\n- Pass raw bound data, metadata, availability, and editability into typed presentation components. Keep draft interaction state distinct from host values and committed output.\n- For a field editor, `getOutputs` returns the manifest-named bound output. Update pending output **before** calling `notifyOutputChanged`; notify only for meaningful user commits, not rendering or routine host updates. Dataset row persistence is not a field output notification.\n- Verify how generated output types and the host represent clearing for the chosen column. Preserve explicit clearing separately from \"no change\"; do not assume that omitting a property clears it, force `null` through a cast, or return an invalid sentinel.\n- Reconcile host echoes, external changes, record changes, form refresh\u002Freset, and temporarily unavailable data without output loops or stale drafts. Define when an external change cancels a draft; test that policy.\n- Track and release subscriptions, timers, observers, and pending work in `destroy` or component cleanup. Prevent late async results from modifying an unmounted control or a different record.\n\n### Dataset binding and Dataverse operations\n\n- Read view\u002Fsubgrid data through `context.parameters.\u003CdatasetName>`: `columns`, `records`, `sortedRecordIds`, and the supported loading\u002Ferror, paging, sorting, filtering, selection, and navigation APIs. Preserve host view order, filters, and subgrid relationship scope; do not replace the bound dataset with a hard-coded table query.\n- Use raw record values for computation\u002Fpersistence and formatted values\u002Fmetadata for display. Handle refresh, page\u002Fview changes, empty datasets, unavailable columns, and selection without stale rows or requests on every render.\n- Perform Dataverse CRUD through the supported `context.webAPI` methods (`createRecord`, `retrieveRecord`, `retrieveMultipleRecords`, `updateRecord`, `deleteRecord`). Declare `\u003Cuses-feature name=\"WebAPI\" required=\"true\" \u002F>` within the input manifest's `feature-usage` when the control requires this capability. Do not use `Xrm.WebApi`, direct Dataverse `fetch`\u002FHTTP clients, parent-window APIs, or embedded credentials.\n- For field values, use PCF bound outputs so the form owns its normal dirty\u002Fsave lifecycle; do not bypass it with `context.webAPI.updateRecord`. Use WebAPI only for agreed additional operations or dataset row writes.\n- Await confirmed write success before reporting success or refreshing the affected dataset. Show actionable, localized errors and enforce permissions\u002Feditability; do not auto-write on render, silently retry mutations, or fake a successful save.\n- Test paging, filtering\u002Fsorting interactions, selection, row operations, and WebAPI behavior in the actual model-driven host; the test harness does not fully implement these APIs.\n\n## 4. Implement the null-to-default contract\n\nThis is mandatory for **non-text nullable field editors**:\n\n| State \u002F event | Required behavior |\n|---------------|-------------------|\n| Raw value is `null` or `undefined` | Show literal `---` as the visible value; expose localized \"No value\" semantics to assistive technology. Do not display a selected default yet. |\n| Initial render, `updateView`, rerender, focus, hover, resize | Leave the bound value untouched; never call `notifyOutputChanged` to populate a default. |\n| Deliberate activation from null | Select the agreed, valid default. For immediate-commit controls, commit once. For popup\u002Fdialog editors, select it in the draft and persist only on confirmation. |\n| Subsequent editing | Use the component's normal interaction and validation, without reapplying the default on each event. |\n| Escape\u002Fcancel before confirmation | Discard the draft and return to `---` without a bound write. |\n| Explicit clear | Commit null using the verified PCF output contract, return to `---`, and allow default selection on the next deliberate activation. |\n| Existing valid value, including `0` or `false` | Display and edit that value; never replace it with the default. |\n| Disabled\u002Fread-only but readable | Show only the formatted value label, or static `---` for null; no editor, activation, clear, or notification. |\n| Secured\u002Funreadable\u002Funavailable | Use the appropriate restricted\u002Floading presentation; do not expose data, activate, default, clear, or notify. |\n| Editable text box | Render null as an empty editable string with normal input semantics; do not insert `---` into the textbox or saved data. |\n\nUse an explicit nullish check, not truthiness. The visible placeholder is not a stored value, a choice option, or a validation workaround. Do not coerce it into a number, date, boolean, or string output. Optional placeholder text may supplement, but not replace, the literal `---` display for non-text null values.\n\nTemporarily null data in `updateView` can mean loading rather than a persisted blank. Use supported availability\u002Fsecurity signals when present. If the host does not distinguish these states, stay non-destructive: render the placeholder, never infer that null authorizes a write, and block edits when availability\u002Feditability cannot be established.\n\nWhen editing is permitted, use an accessible, focusable Fluent trigger for the null presentation, not a clickable `div` or decorative dashes. Give it a localized field name and a description such as \"No value. Activate to select the default.\" Keep `---` out of the accessible name when it would be announced as punctuation. For null sliders\u002Ftoggles and other widgets unable to represent no value, use the trigger until activation rather than rendering a misleading thumb or \"off\" state.\n\nFor activation keys, follow the selected Fluent component's documented keyboard behavior: Enter\u002FSpace for buttons, and its standard opening\u002Fediting keys for composite widgets. Do not invent global shortcuts. An activation event must not also apply the first increment\u002Ftoggle through event bubbling. For immediate controls, move focus predictably from the null trigger to the live editor; for popups, manage focus according to dialog\u002Flistbox patterns.\n\nIf required metadata forbids clearing, explain that constraint and follow form validation; do not auto-populate a default on load to hide a required-field error.\n\n### Read-only presentation\n\nWhen a field or cell is readable but editing is not permitted, render **only the current value's human-readable label** using static Fluent text, not the full editor UX with disabled styling. Derive editability from supported host mode, field security\u002Fmetadata, and applicable dataset row\u002Fcell permissions; do not infer it from whether a value is present.\n\n- Show choice\u002Fboolean metadata labels, lookup display names, formatted dates\u002Fnumbers, or the text value itself. Preserve legitimate `0` and `false`; never replace them with the null placeholder or display raw choice codes\u002Flookup IDs as labels.\n- Show static `---` for a readable null value, including read-only text fields. Associate the field\u002Fcolumn label with the value and expose localized \"No value\" semantics, without activation instructions.\n- Omit inputs, dropdowns, switches, slider\u002Frating widgets, picker triggers, clear buttons, and editing popups. Static field text creates no extra tab stop or misleading interactive ARIA role; retain necessary grid navigation for dataset cells.\n- Keep text readable in all themes; do not apply low-contrast disabled-editor styling. Do not fabricate a label when readable data\u002Fformatting metadata is unavailable; expose the appropriate unavailable\u002Floading state.\n- Unreadable\u002Fsecured fields use the restricted presentation instead of a value label. Remove stale values and drafts from visible text, accessible descriptions, and tooltips; do not bypass security to resolve a label.\n- Reevaluate on host updates. If editability is revoked mid-edit, close editing UI and discard uncommitted drafts without output notifications or Dataverse mutations. Display the current host value, not an unconfirmed draft; preserve reconciliation for already-submitted commits and handle focus safely if an editor disappears.\n- Returning to editable mode restores the editor or null trigger from current host data without automatically selecting or writing a default.\n\n## 5. Build in the horizontals\n\nUse native Fluent v9 behavior first, then supply the missing application semantics. Follow the [quality checklist](.\u002Freferences\u002Fquality-checklist.md), including:\n\n- **Accessibility:** field label, value\u002Fstate, instructions and errors; native semantics and correct ARIA relationships; screen-reader announcements for meaningful changes; no color-only meaning.\n- **Keyboard\u002Ffocus:** Tab\u002FShift+Tab entry and exit; component-standard arrow\u002FHome\u002FEnd\u002FEnter\u002FSpace behavior where applicable; Escape cancellation; focus restoration; no traps or duplicate activation.\n- **Theme\u002Fcontrast:** Fluent tokens and supported host theming. Do not assume a provider already exists or force a light theme. If a provider is needed, map a documented host theme source and test portal content. Cover dark and forced-colors\u002Fhigh-contrast modes and visible focus.\n- **Localization:** RESX for user-visible\u002Fcontrol strings, `context.resources.getString`, locale-aware number\u002Fdate formatting and pluralization, RTL layout and widget behavior. Preserve underlying typed values; do not save formatted labels or parse dates using a locale-ambiguous string.\n- **Layout\u002Finput:** allocated size\u002Fresize handling, narrow form columns, zoom\u002Freflow, touch targets, popups without clipping, and instances with unique IDs.\n- **Forms\u002Fsecurity:** disabled\u002Fread-only and field security; required\u002Finvalid states; dirty\u002Fsave\u002Frefresh and clear\u002Freload round trips; no reliance on internal `Xrm`, parent-window globals, or host DOM.\n- **Reliability\u002Fperformance:** minimal output notifications, bounded renders, instance isolation, cleanup, explicit loading\u002Ferror\u002Foffline states, supported PCF APIs and appropriately declared external services. Never log raw field data or credentials.\n\nDo not add unnecessary network calls, UI wrappers, configuration knobs, or dependencies. Follow existing project helpers and tests. Surface validation and service failures accessibly; do not swallow errors or fake success.\n\n## 6. Validate the actual requirements\n\nRun the generated project's relevant tests, lint, type-check and production PCF build using its existing scripts. Add targeted tests for newly introduced logic. If tools are missing, restore compatible dependencies through the configured feed; do not bypass a failed check.\n\nMandatory automated cases for a field control:\n\n- Null and undefined display `---`; render, focus, and host updates make zero output notifications.\n- Activation selects the agreed default; immediate controls notify exactly once, popup controls notify only on confirmation.\n- Cancellation and disabled\u002Funavailable activation notify zero times.\n- Read-only fields\u002Fcells show only formatted labels or static `---`, with no editor\u002Fclear\u002Fpopup affordances or writes. Cover choice\u002Fboolean\u002Flookup\u002Fdate\u002Fnumber\u002Ftext values, `0`\u002F`false`, secured data, host value updates, and editable\u002Fread-only transitions during a draft.\n- Clearing emits the verified clear output, not the placeholder or an omitted no-change output.\n- `0`, `false`, and other valid boundary values survive unchanged.\n- Keyboard and pointer activation use the same transition, with no double commit or first-step skip.\n- Host echo, external updates, refreshed\u002Fchanged records, and late async results do not restore a stale draft or create output loops.\n\nFor editable text boxes, test the empty-string presentation\u002Fnull conversion contract instead of the non-text placeholder rule; read-only text fields follow the static label\u002Fnull presentation. For dataset controls, test bound-view\u002Fsubgrid scope, loading\u002Fempty\u002Ferror, columns, ordering, paging, filter\u002Fsort\u002Fview changes, selection\u002Fnavigation, and per-cell editing as applicable. Test WebAPI success, permission\u002Fservice failures, and stale responses with typed test doubles without editing generated files.\n\nAlways test interactively in the PCF test harness in watch mode, from the control project directory:\n\n```powershell\nnpm start watch\n```\n\nVerify startup, open the reported harness URL, exercise the relevant pointer\u002Fkeyboard\u002Fnull-state cases, and confirm authored source changes rebuild and appear. Restart watch after input-manifest changes. For field controls, use the harness Data Inputs; for dataset controls, load synthetic CSV data, map property-set columns, and select Apply. Reapply CSV mappings after reload when needed. Do not edit generated harness files.\n\nThe harness does not fully support `context.webAPI`, dataset paging\u002Fsorting\u002Ffiltering, security, or other host-specific APIs. Use explicit typed mocks in tests or a separate test fixture for local coverage, never silent production fallbacks. Record these host cases as blocked until exercised in a model-driven app. Stop the watch process after a self-contained check unless the user requests that it remain available.\n\nTreat model-driven host verification as a separate gate. Verify platform-library reuse from the production build, then verify the control in an actual model-driven form\u002Fview\u002Fsubgrid: shared runtime, binding, Dataverse operations, form save\u002Frefresh\u002Fclear, keyboard-only navigation, screen reader, dark\u002Fhigh contrast, RTL, responsive\u002Ftouch input, and repeated instances. A static screenshot or an automated accessibility scan alone is insufficient.\n\nUse the checklist to record passed, failed, not-applicable (with a reason), and blocked cases. Do not claim host\u002Fruntime accessibility validation without executing it. If no environment or browser is available, complete local checks and clearly identify host gates as blocked.\n\n## 7. Package and hand off\n\nUse solution packaging for releases and cross-environment promotion. Provide managed and unmanaged artifacts as agreed so the same version can move across environments.\n\nFor an explicitly approved inner-loop deployment to a confirmed development environment, `pac pcf push` is an optional convenience:\n\n```powershell\npac pcf push --publisher-prefix \u003CPublisherPrefix> --environment \u003CConfirmedDevelopmentEnvironmentUrlOrId>\n```\n\nVerify the import and host behavior, and use the publisher prefix matching the intended solution. Push bypasses normal control versioning\u002Fsolution packaging requirements; it is not a release artifact, production deployment method, or substitute for the packaging gates below. Never push to downstream test\u002FUAT\u002Fproduction environments. A successful dev push does not complete production readiness.\n\n1. In an agreed empty solution directory, scaffold with `pac solution init` (not `pcf solution init`). For an existing solution project, reuse it without overwriting its metadata.\n\n   ```powershell\n   pac solution init --publisher-name \u003CPublisherName> --publisher-prefix \u003CPublisherPrefix>\n   pac solution add-reference --path \u003CAbsoluteControlProjectDirectory>\n   ```\n\n   Run `add-reference` from the solution directory for each PCF project to include. Use distinct solution\u002Fcontrol project names, preserve publisher identity, and use the supported PAC solution\u002Fcontrol version commands when updating a release.\n\n2. From the solution directory, build and restore with MSBuild. Explicitly select production configuration and package type; managed\u002Funmanaged is independent of whether the control bundle is production optimized.\n\n   ```powershell\n   msbuild .\\\u003CSolutionName>.cdsproj \u002Ft:build \u002Frestore \u002Fp:Configuration=Release \u002Fp:PcfBuildMode=production \u002Fp:SolutionPackageType=Both\n   ```\n\n   Use `SolutionPackageType=Managed` or `Unmanaged` when only that artifact is requested. Do not rely on Debug\u002FRelease defaults to choose package type. If MSBuild needs Visual Studio environment setup on Windows, initialize it and build in the same Developer Command Prompt process. Report missing build prerequisites instead of switching to a different packaging approach.\n\n3. Verify the actual ZIP paths produced under the solution build output, inspect package metadata to confirm solution\u002Fcontrol versions and managed flags, and retain both requested artifacts. Never hand-edit ZIP contents or generated solution XML. Package-only requests stop here.\n\n4. Before each import, confirm environment identity with PAC authentication\u002Fenvironment information, the exact artifact\u002Ftype, and user approval. Normally use unmanaged in the solution's development environment and managed for downstream test\u002FUAT\u002Fproduction. Do not mix types or force overwrite\u002Fupgrade without agreement. Import an explicit ZIP path rather than relying on PAC's default package selection:\n\n   ```powershell\n   pac solution import --path \u003CAbsoluteSolutionZipPath> --environment \u003CConfirmedEnvironmentUrlOrId>\n   ```\n\n   Verify completion and surface import\u002Fdependency failures. If importing asynchronously, wait for the terminal success\u002Ffailure result; accepted submission alone is not success. Promote the same built managed artifact across downstream environments instead of rebuilding per target or hard-coding environment URLs in the control.\n\nProvide the project changes, managed\u002Funmanaged artifact paths, concise usage\u002Fbinding instructions, default\u002Fclear\u002Fcommit semantics, and verification results. Document supported column\u002Fdataset types and relevant limitations in the project's existing documentation. Describe how the maker adds the field control to its column\u002Fform or the dataset control to its view\u002Fsubgrid and publishes it; successful import alone does not establish binding or host behavior.\n\nReport any unexecuted host tests or missing tooling as blockers, not completed checks. Never commit, publish, change environments, or overwrite an existing control without authorization.\n","# Create a virtual PCF control for model-driven apps\n\nProduce a working TypeScript PCF project, not just a design or code excerpt. Always scaffold each new control with `pac pcf init --framework react`, use the host's React and Fluent UI v9 platform libraries, and author control logic\u002Fcomponents\u002Ftests in `.ts`\u002F`.tsx`, never plain JavaScript. Never modify auto-generated files. Use `context.webAPI` for Dataverse operations and solution packaging for releases and cross-environment promotion. Do not deploy without explicit approval.\n\nRead the [quality checklist](.\u002Freferences\u002Fquality-checklist.md) when defining acceptance criteria and again when selecting validation cases.\n\nLoad these original, official-documentation-based references as needed:\n\n- [Component patterns](.\u002Freferences\u002Fcomponent-patterns.md) when selecting widgets and designing field\u002Fdataset interactions.\n- [Manifest reference](.\u002Freferences\u002Fmanifest-reference.md) before changing bindings, resources, types, or feature declarations.\n- [Virtual control lifecycle](.\u002Freferences\u002Fcontrol-lifecycle.md) before implementing data flow, host reconciliation, async work, or cleanup.\n\nThe references distinguish platform facts from this plugin's design policies. Follow their official source links to resolve current API\u002Fschema details; do not copy or reconstruct third-party skills or examples.\n\n## 1. Discover the project and agree on the behavior\n\nInspect repository instructions, existing PCF projects, manifests, generated types, dependencies, shared helpers, localization resources, and tests before editing. Preserve unrelated changes. Extend an existing virtual control where possible; do not replace a standard control by changing only its manifest.\n\nAsk only for missing decisions:\n\n- Control name, namespace, workspace\u002Foutput folder, and whether this is a new control or an extension.\n- Field control bound to a single column, or dataset control bound to a table view\u002Fsubgrid; target placements and device sizes.\n- For fields: bound column name\u002Ftype, allowed values\u002Franges, precision, requiredness, and metadata-driven options. Do not treat choice labels as stored values.\n- For datasets: table\u002Fview\u002Fsubgrid, dataset name, columns\u002Fproperty-set mappings, sorting\u002Ffiltering\u002Fpaging, selection\u002Fnavigation, and any row editing or commands.\n- Whether this is a text box or a non-text editor; the desired control-specific default, activation gesture, and commit\u002Fcancel behavior.\n- Clear-to-null availability, validation rules, disabled\u002Fread-only and field-security expectations.\n- Display label, accessible name\u002Fhelp text, languages, and any additional integration or offline requirements.\n- For packaging: solution name, publisher name\u002Fprefix, version, and managed\u002Funmanaged outputs. For deployment: target environment(s), package type per environment, and authorization.\n\nFor each non-text field editor, agree on a small state table: stored value, display, activation\u002Fdefault, commit, cancellation, clearing, and unavailable\u002Fdisabled behavior. Default selection must be deterministic and valid for the configured metadata. Do not invent a default, choose the first option silently, or mistake `0` or `false` for null. Dataset controls retain appropriate loading\u002Fempty\u002Ferror states; apply the null contract to nullable cell editors, not an empty grid.\n\nPresent a concise implementation summary and acceptance criteria before making materially different design choices. Do not create a planning document unless requested.\n\n## 2. Verify tooling and the supported shared runtime\n\nCheck PAC CLI, Node\u002Fnpm, MSBuild and its required .NET\u002Fbuild tools, and the project's build requirements. Consult the current official documentation:\n\n- [React controls and platform libraries](https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fpower-apps\u002Fdeveloper\u002Fcomponent-framework\u002Freact-controls-platform-libraries)\n- [PAC PCF commands](https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fpower-platform\u002Fdeveloper\u002Fcli\u002Freference\u002Fpcf)\n- [PCF best practices](https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fpower-apps\u002Fdeveloper\u002Fcomponent-framework\u002Fcode-components-best-practices)\n- [Debugging and test harness](https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fpower-apps\u002Fdeveloper\u002Fcomponent-framework\u002Fdebugging-custom-controls)\n- [PCF solution packaging](https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fpower-apps\u002Fdeveloper\u002Fcomponent-framework\u002Fimport-custom-controls)\n- [PAC solution commands](https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fpower-platform\u002Fdeveloper\u002Fcli\u002Freference\u002Fsolution)\n- [Code component ALM](https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fpower-apps\u002Fdeveloper\u002Fcomponent-framework\u002Fcode-components-alm)\n\nUse the consumer's configured npm registry for every npm operation and honor their organization policies. Never pass `--registry`, modify registry configuration, or bypass a configured proxy. This skill does not require a Microsoft-internal feed. On a version 404, query that same configured registry with `npm view \u003Cpackage> versions --json`. Pin the newest available version compatible with both the documented platform contract and the project's tooling in the manifest and lockfile. If none exists, report the versions and compatibility blocker.\n\nThe documentation consulted when this skill was authored lists:\n\n| Platform library | Manifest contract | Documented runtime |\n|------------------|-------------------|--------------------|\n| React | `16.14.0` | `17.0.2` in model-driven apps |\n| Fluent v9 | `>=9.4.0 \u003C=9.46.2` | `9.68.0` |\n\nThese are a reference snapshot, not a promise of current availability. Recheck before scaffolding. A higher runtime version does **not** authorize targeting its newer APIs. Align build dependencies, React type definitions, and Fluent imports with the supported contract; do not use React 18 APIs such as `createRoot` or `useId`.\n\n## 3. Scaffold or extend the virtual project\n\nAlways use `pac pcf init` to scaffold every new control in its agreed empty project directory. Never hand-create a substitute scaffold, copy another control as the scaffold, or use a JavaScript\u002Fnon-React template. Choose one of:\n\n```powershell\npac pcf init --namespace \u003CNamespace> --name \u003CControlName> --template field --framework react\n```\n\n```powershell\npac pcf init --namespace \u003CNamespace> --name \u003CControlName> --template dataset --framework react\n```\n\nReplace placeholders with validated values. A `field` control binds its primary bound property to one column; a `dataset` control binds a manifest `data-set` to a view\u002Fsubgrid, with `property-set` mappings where needed. Inspect `pac pcf init --help` for the installed CLI's options and installation defaults. Restore dependencies only after scaffolding\u002Fchanging dependency manifests or a missing-dependency failure. Reuse the scaffold's `pcf-scripts`, generated types, and build pipeline; do not introduce a separate app bundler.\n\nFor an existing virtual project, preserve its PAC-generated scaffold and extend its editable source; do not rerun initialization over existing files. If a separate control is needed, initialize it with `pac pcf init` in a new directory.\n\nFor an existing standard control, scaffold a new React control and port its behavior into the virtual lifecycle, preserving identifiers\u002Fcontracts only where supported. Plan solution\u002Fform migration explicitly rather than flipping `control-type`.\n\n### TypeScript and generated-file boundaries\n\n- Author implementation and test source in TypeScript (`.ts`\u002F`.tsx`); never add handwritten `.js`\u002F`.jsx` control logic or bypass types with `any` casts.\n- Never modify auto-generated files: `generated\u002FManifestTypes.d.ts`, generated manifests, bundles, source maps, build intermediates, or packaged\u002Fextracted solution outputs. Do not patch tool-owned generated metadata.\n- Edit authored inputs such as `ControlManifest.Input.xml`, `index.ts`, presentation `.tsx`, RESX, and supported project configuration; these editable scaffold inputs are distinct from regenerated output.\n- Change the input manifest and run the scaffold's generation\u002Fbuild command to regenerate types. Resolve errors in authored source\u002Finputs, not by editing generated declarations.\n- Use PAC commands for solution initialization\u002Freferences and MSBuild properties for package selection. Tool-generated JavaScript build output is expected, but is never hand-authored or edited.\n\n### Manifest and library contract\n\n- Set `control-type=\"virtual\"`.\n- Declare `platform-library` resources for React and Fluent v9 using currently supported versions.\n- Import Fluent components from `@fluentui\u002Freact-components`; do not use `@fluentui\u002Freact` (v8).\n- Define typed bound\u002Finput properties, required resources, localized display\u002Fdescription keys, and feature usage actually needed.\n- Use generated `IInputs`\u002F`IOutputs`. Do not hand-edit generated types.\n- Let the PCF build externalize the declared platform libraries. Do not ship React, ReactDOM, or a second Fluent v9 implementation in the control bundle.\n- Inspect imports and production bundle module evidence (build stats\u002Fsource maps where available) to confirm externalization. A small bundle alone is not proof. Additional libraries, including icon packages, are not automatically host-provided; justify and measure them.\n\n### Lifecycle and data flow\n\n- Implement `ComponentFramework.ReactControl\u003CIInputs, IOutputs>`.\n- `init` captures the output callback and initializes supported subscriptions\u002Fresize tracking. There is no DOM container parameter for a virtual control.\n- `updateView` returns a `React.ReactElement`; the platform renders it. Do not call `ReactDOM.render`, create a React root, or manipulate host DOM.\n- Pass raw bound data, metadata, availability, and editability into typed presentation components. Keep draft interaction state distinct from host values and committed output.\n- For a field editor, `getOutputs` returns the manifest-named bound output. Update pending output **before** calling `notifyOutputChanged`; notify only for meaningful user commits, not rendering or routine host updates. Dataset row persistence is not a field output notification.\n- Verify how generated output types and the host represent clearing for the chosen column. Preserve explicit clearing separately from \"no change\"; do not assume that omitting a property clears it, force `null` through a cast, or return an invalid sentinel.\n- Reconcile host echoes, external changes, record changes, form refresh\u002Freset, and temporarily unavailable data without output loops or stale drafts. Define when an external change cancels a draft; test that policy.\n- Track and release subscriptions, timers, observers, and pending work in `destroy` or component cleanup. Prevent late async results from modifying an unmounted control or a different record.\n\n### Dataset binding and Dataverse operations\n\n- Read view\u002Fsubgrid data through `context.parameters.\u003CdatasetName>`: `columns`, `records`, `sortedRecordIds`, and the supported loading\u002Ferror, paging, sorting, filtering, selection, and navigation APIs. Preserve host view order, filters, and subgrid relationship scope; do not replace the bound dataset with a hard-coded table query.\n- Use raw record values for computation\u002Fpersistence and formatted values\u002Fmetadata for display. Handle refresh, page\u002Fview changes, empty datasets, unavailable columns, and selection without stale rows or requests on every render.\n- Perform Dataverse CRUD through the supported `context.webAPI` methods (`createRecord`, `retrieveRecord`, `retrieveMultipleRecords`, `updateRecord`, `deleteRecord`). Declare `\u003Cuses-feature name=\"WebAPI\" required=\"true\" \u002F>` within the input manifest's `feature-usage` when the control requires this capability. Do not use `Xrm.WebApi`, direct Dataverse `fetch`\u002FHTTP clients, parent-window APIs, or embedded credentials.\n- For field values, use PCF bound outputs so the form owns its normal dirty\u002Fsave lifecycle; do not bypass it with `context.webAPI.updateRecord`. Use WebAPI only for agreed additional operations or dataset row writes.\n- Await confirmed write success before reporting success or refreshing the affected dataset. Show actionable, localized errors and enforce permissions\u002Feditability; do not auto-write on render, silently retry mutations, or fake a successful save.\n- Test paging, filtering\u002Fsorting interactions, selection, row operations, and WebAPI behavior in the actual model-driven host; the test harness does not fully implement these APIs.\n\n## 4. Implement the null-to-default contract\n\nThis is mandatory for **non-text nullable field editors**:\n\n| State \u002F event | Required behavior |\n|---------------|-------------------|\n| Raw value is `null` or `undefined` | Show literal `---` as the visible value; expose localized \"No value\" semantics to assistive technology. Do not display a selected default yet. |\n| Initial render, `updateView`, rerender, focus, hover, resize | Leave the bound value untouched; never call `notifyOutputChanged` to populate a default. |\n| Deliberate activation from null | Select the agreed, valid default. For immediate-commit controls, commit once. For popup\u002Fdialog editors, select it in the draft and persist only on confirmation. |\n| Subsequent editing | Use the component's normal interaction and validation, without reapplying the default on each event. |\n| Escape\u002Fcancel before confirmation | Discard the draft and return to `---` without a bound write. |\n| Explicit clear | Commit null using the verified PCF output contract, return to `---`, and allow default selection on the next deliberate activation. |\n| Existing valid value, including `0` or `false` | Display and edit that value; never replace it with the default. |\n| Disabled\u002Fread-only but readable | Show only the formatted value label, or static `---` for null; no editor, activation, clear, or notification. |\n| Secured\u002Funreadable\u002Funavailable | Use the appropriate restricted\u002Floading presentation; do not expose data, activate, default, clear, or notify. |\n| Editable text box | Render null as an empty editable string with normal input semantics; do not insert `---` into the textbox or saved data. |\n\nUse an explicit nullish check, not truthiness. The visible placeholder is not a stored value, a choice option, or a validation workaround. Do not coerce it into a number, date, boolean, or string output. Optional placeholder text may supplement, but not replace, the literal `---` display for non-text null values.\n\nTemporarily null data in `updateView` can mean loading rather than a persisted blank. Use supported availability\u002Fsecurity signals when present. If the host does not distinguish these states, stay non-destructive: render the placeholder, never infer that null authorizes a write, and block edits when availability\u002Feditability cannot be established.\n\nWhen editing is permitted, use an accessible, focusable Fluent trigger for the null presentation, not a clickable `div` or decorative dashes. Give it a localized field name and a description such as \"No value. Activate to select the default.\" Keep `---` out of the accessible name when it would be announced as punctuation. For null sliders\u002Ftoggles and other widgets unable to represent no value, use the trigger until activation rather than rendering a misleading thumb or \"off\" state.\n\nFor activation keys, follow the selected Fluent component's documented keyboard behavior: Enter\u002FSpace for buttons, and its standard opening\u002Fediting keys for composite widgets. Do not invent global shortcuts. An activation event must not also apply the first increment\u002Ftoggle through event bubbling. For immediate controls, move focus predictably from the null trigger to the live editor; for popups, manage focus according to dialog\u002Flistbox patterns.\n\nIf required metadata forbids clearing, explain that constraint and follow form validation; do not auto-populate a default on load to hide a required-field error.\n\n### Read-only presentation\n\nWhen a field or cell is readable but editing is not permitted, render **only the current value's human-readable label** using static Fluent text, not the full editor UX with disabled styling. Derive editability from supported host mode, field security\u002Fmetadata, and applicable dataset row\u002Fcell permissions; do not infer it from whether a value is present.\n\n- Show choice\u002Fboolean metadata labels, lookup display names, formatted dates\u002Fnumbers, or the text value itself. Preserve legitimate `0` and `false`; never replace them with the null placeholder or display raw choice codes\u002Flookup IDs as labels.\n- Show static `---` for a readable null value, including read-only text fields. Associate the field\u002Fcolumn label with the value and expose localized \"No value\" semantics, without activation instructions.\n- Omit inputs, dropdowns, switches, slider\u002Frating widgets, picker triggers, clear buttons, and editing popups. Static field text creates no extra tab stop or misleading interactive ARIA role; retain necessary grid navigation for dataset cells.\n- Keep text readable in all themes; do not apply low-contrast disabled-editor styling. Do not fabricate a label when readable data\u002Fformatting metadata is unavailable; expose the appropriate unavailable\u002Floading state.\n- Unreadable\u002Fsecured fields use the restricted presentation instead of a value label. Remove stale values and drafts from visible text, accessible descriptions, and tooltips; do not bypass security to resolve a label.\n- Reevaluate on host updates. If editability is revoked mid-edit, close editing UI and discard uncommitted drafts without output notifications or Dataverse mutations. Display the current host value, not an unconfirmed draft; preserve reconciliation for already-submitted commits and handle focus safely if an editor disappears.\n- Returning to editable mode restores the editor or null trigger from current host data without automatically selecting or writing a default.\n\n## 5. Build in the horizontals\n\nUse native Fluent v9 behavior first, then supply the missing application semantics. Follow the [quality checklist](.\u002Freferences\u002Fquality-checklist.md), including:\n\n- **Accessibility:** field label, value\u002Fstate, instructions and errors; native semantics and correct ARIA relationships; screen-reader announcements for meaningful changes; no color-only meaning.\n- **Keyboard\u002Ffocus:** Tab\u002FShift+Tab entry and exit; component-standard arrow\u002FHome\u002FEnd\u002FEnter\u002FSpace behavior where applicable; Escape cancellation; focus restoration; no traps or duplicate activation.\n- **Theme\u002Fcontrast:** Fluent tokens and supported host theming. Do not assume a provider already exists or force a light theme. If a provider is needed, map a documented host theme source and test portal content. Cover dark and forced-colors\u002Fhigh-contrast modes and visible focus.\n- **Localization:** RESX for user-visible\u002Fcontrol strings, `context.resources.getString`, locale-aware number\u002Fdate formatting and pluralization, RTL layout and widget behavior. Preserve underlying typed values; do not save formatted labels or parse dates using a locale-ambiguous string.\n- **Layout\u002Finput:** allocated size\u002Fresize handling, narrow form columns, zoom\u002Freflow, touch targets, popups without clipping, and instances with unique IDs.\n- **Forms\u002Fsecurity:** disabled\u002Fread-only and field security; required\u002Finvalid states; dirty\u002Fsave\u002Frefresh and clear\u002Freload round trips; no reliance on internal `Xrm`, parent-window globals, or host DOM.\n- **Reliability\u002Fperformance:** minimal output notifications, bounded renders, instance isolation, cleanup, explicit loading\u002Ferror\u002Foffline states, supported PCF APIs and appropriately declared external services. Never log raw field data or credentials.\n\nDo not add unnecessary network calls, UI wrappers, configuration knobs, or dependencies. Follow existing project helpers and tests. Surface validation and service failures accessibly; do not swallow errors or fake success.\n\n## 6. Validate the actual requirements\n\nRun the generated project's relevant tests, lint, type-check and production PCF build using its existing scripts. Add targeted tests for newly introduced logic. If tools are missing, restore compatible dependencies through the configured feed; do not bypass a failed check.\n\nMandatory automated cases for a field control:\n\n- Null and undefined display `---`; render, focus, and host updates make zero output notifications.\n- Activation selects the agreed default; immediate controls notify exactly once, popup controls notify only on confirmation.\n- Cancellation and disabled\u002Funavailable activation notify zero times.\n- Read-only fields\u002Fcells show only formatted labels or static `---`, with no editor\u002Fclear\u002Fpopup affordances or writes. Cover choice\u002Fboolean\u002Flookup\u002Fdate\u002Fnumber\u002Ftext values, `0`\u002F`false`, secured data, host value updates, and editable\u002Fread-only transitions during a draft.\n- Clearing emits the verified clear output, not the placeholder or an omitted no-change output.\n- `0`, `false`, and other valid boundary values survive unchanged.\n- Keyboard and pointer activation use the same transition, with no double commit or first-step skip.\n- Host echo, external updates, refreshed\u002Fchanged records, and late async results do not restore a stale draft or create output loops.\n\nFor editable text boxes, test the empty-string presentation\u002Fnull conversion contract instead of the non-text placeholder rule; read-only text fields follow the static label\u002Fnull presentation. For dataset controls, test bound-view\u002Fsubgrid scope, loading\u002Fempty\u002Ferror, columns, ordering, paging, filter\u002Fsort\u002Fview changes, selection\u002Fnavigation, and per-cell editing as applicable. Test WebAPI success, permission\u002Fservice failures, and stale responses with typed test doubles without editing generated files.\n\nAlways test interactively in the PCF test harness in watch mode, from the control project directory:\n\n```powershell\nnpm start watch\n```\n\nVerify startup, open the reported harness URL, exercise the relevant pointer\u002Fkeyboard\u002Fnull-state cases, and confirm authored source changes rebuild and appear. Restart watch after input-manifest changes. For field controls, use the harness Data Inputs; for dataset controls, load synthetic CSV data, map property-set columns, and select Apply. Reapply CSV mappings after reload when needed. Do not edit generated harness files.\n\nThe harness does not fully support `context.webAPI`, dataset paging\u002Fsorting\u002Ffiltering, security, or other host-specific APIs. Use explicit typed mocks in tests or a separate test fixture for local coverage, never silent production fallbacks. Record these host cases as blocked until exercised in a model-driven app. Stop the watch process after a self-contained check unless the user requests that it remain available.\n\nTreat model-driven host verification as a separate gate. Verify platform-library reuse from the production build, then verify the control in an actual model-driven form\u002Fview\u002Fsubgrid: shared runtime, binding, Dataverse operations, form save\u002Frefresh\u002Fclear, keyboard-only navigation, screen reader, dark\u002Fhigh contrast, RTL, responsive\u002Ftouch input, and repeated instances. A static screenshot or an automated accessibility scan alone is insufficient.\n\nUse the checklist to record passed, failed, not-applicable (with a reason), and blocked cases. Do not claim host\u002Fruntime accessibility validation without executing it. If no environment or browser is available, complete local checks and clearly identify host gates as blocked.\n\n## 7. Package and hand off\n\nUse solution packaging for releases and cross-environment promotion. Provide managed and unmanaged artifacts as agreed so the same version can move across environments.\n\nFor an explicitly approved inner-loop deployment to a confirmed development environment, `pac pcf push` is an optional convenience:\n\n```powershell\npac pcf push --publisher-prefix \u003CPublisherPrefix> --environment \u003CConfirmedDevelopmentEnvironmentUrlOrId>\n```\n\nVerify the import and host behavior, and use the publisher prefix matching the intended solution. Push bypasses normal control versioning\u002Fsolution packaging requirements; it is not a release artifact, production deployment method, or substitute for the packaging gates below. Never push to downstream test\u002FUAT\u002Fproduction environments. A successful dev push does not complete production readiness.\n\n1. In an agreed empty solution directory, scaffold with `pac solution init` (not `pcf solution init`). For an existing solution project, reuse it without overwriting its metadata.\n\n   ```powershell\n   pac solution init --publisher-name \u003CPublisherName> --publisher-prefix \u003CPublisherPrefix>\n   pac solution add-reference --path \u003CAbsoluteControlProjectDirectory>\n   ```\n\n   Run `add-reference` from the solution directory for each PCF project to include. Use distinct solution\u002Fcontrol project names, preserve publisher identity, and use the supported PAC solution\u002Fcontrol version commands when updating a release.\n\n2. From the solution directory, build and restore with MSBuild. Explicitly select production configuration and package type; managed\u002Funmanaged is independent of whether the control bundle is production optimized.\n\n   ```powershell\n   msbuild .\\\u003CSolutionName>.cdsproj \u002Ft:build \u002Frestore \u002Fp:Configuration=Release \u002Fp:PcfBuildMode=production \u002Fp:SolutionPackageType=Both\n   ```\n\n   Use `SolutionPackageType=Managed` or `Unmanaged` when only that artifact is requested. Do not rely on Debug\u002FRelease defaults to choose package type. If MSBuild needs Visual Studio environment setup on Windows, initialize it and build in the same Developer Command Prompt process. Report missing build prerequisites instead of switching to a different packaging approach.\n\n3. Verify the actual ZIP paths produced under the solution build output, inspect package metadata to confirm solution\u002Fcontrol versions and managed flags, and retain both requested artifacts. Never hand-edit ZIP contents or generated solution XML. Package-only requests stop here.\n\n4. Before each import, confirm environment identity with PAC authentication\u002Fenvironment information, the exact artifact\u002Ftype, and user approval. Normally use unmanaged in the solution's development environment and managed for downstream test\u002FUAT\u002Fproduction. Do not mix types or force overwrite\u002Fupgrade without agreement. Import an explicit ZIP path rather than relying on PAC's default package selection:\n\n   ```powershell\n   pac solution import --path \u003CAbsoluteSolutionZipPath> --environment \u003CConfirmedEnvironmentUrlOrId>\n   ```\n\n   Verify completion and surface import\u002Fdependency failures. If importing asynchronously, wait for the terminal success\u002Ffailure result; accepted submission alone is not success. Promote the same built managed artifact across downstream environments instead of rebuilding per target or hard-coding environment URLs in the control.\n\nProvide the project changes, managed\u002Funmanaged artifact paths, concise usage\u002Fbinding instructions, default\u002Fclear\u002Fcommit semantics, and verification results. Document supported column\u002Fdataset types and relevant limitations in the project's existing documentation. Describe how the maker adds the field control to its column\u002Fform or the dataset control to its view\u002Fsubgrid and publishes it; successful import alone does not establish binding or host behavior.\n\nReport any unexecuted host tests or missing tooling as blockers, not completed checks. Never commit, publish, change environments, or overwrite an existing control without authorization.\n",{"name":5,"version":24,"description":7,"allowed-tools":25,"user-invocable":26},"1.0.0","Read, Write, Edit, Bash, Glob, Grep, WebFetch, WebSearch, AskUserQuestion",true,"main","67ed2d245f8d0cc8024fd2a572b67983567fb520","plugins\u002Fpowercat-pcf\u002Fskills\u002Fcreate-pcf",20,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fpower-cat-skills","https:\u002F\u002Fgithub.com\u002Fmicrosoft","https:\u002F\u002Fopensource.microsoft.com","Open source projects and samples from Microsoft","2026-11-14 00:21:20",{"source":8,"skillName":5,"commands":37,"prompt":47,"zipAvailable":26},[38,41,44],{"tool":39,"command":40},"npx","npx skills add microsoft\u002Fpower-cat-skills --skill create-pcf",{"tool":42,"command":43},"bunx","bunx skills add microsoft\u002Fpower-cat-skills --skill create-pcf",{"tool":45,"command":46},"pnpm","pnpm dlx skills add microsoft\u002Fpower-cat-skills --skill create-pcf","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fpower-cat-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fpowercat-pcf\u002Fskills\u002Fcreate-pcf\u002FSKILL.md",[49,55,59,63],{"path":50,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":53,"sourceHtmlUrl":54},"references\u002Fcomponent-patterns.md","REFERENCE","参考文档",9580,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fpower-cat-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fpowercat-pcf\u002Fskills\u002Fcreate-pcf\u002Freferences\u002Fcomponent-patterns.md",{"path":56,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":57,"sourceHtmlUrl":58},"references\u002Fcontrol-lifecycle.md",8471,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fpower-cat-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fpowercat-pcf\u002Fskills\u002Fcreate-pcf\u002Freferences\u002Fcontrol-lifecycle.md",{"path":60,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":61,"sourceHtmlUrl":62},"references\u002Fmanifest-reference.md",8151,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fpower-cat-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fpowercat-pcf\u002Fskills\u002Fcreate-pcf\u002Freferences\u002Fmanifest-reference.md",{"path":64,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":65,"sourceHtmlUrl":66},"references\u002Fquality-checklist.md",9776,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fpower-cat-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fpowercat-pcf\u002Fskills\u002Fcreate-pcf\u002Freferences\u002Fquality-checklist.md",[68,96,120,136,159,178],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":95},"01M711KHT2PNDCPT1AJ06PRTAD","powercat-skills-router","Route Microsoft Power Platform requests to the best-fit specialist skill across microsoft\u002Fpower-cat-skills and microsoft\u002Fpower-platform-skills. Use when a user asks which skill can help, wants to find or use a Power Platform skill, or requests work involving Power Apps, Power Automate, Power Pages, Dataverse, Copilot Studio, or Power Platform administration. Discover candidates, reconcile installation and updates, obtain approval for changes, load the selected skill, and continue the original task.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fpower-cat-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fpowercat-skills-router\u002Fskills\u002Fpowercat-skills-router\u002FSKILL.md",[],[75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94],"router","powercat skills router","which","discover","power","copilot","apps","when","updates","copilot studio","dataverse","studio","across","route","work","reconcile","automate","platform","for","fit","2026-11-10 10:12:30",{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":95},"01M711KBER1KD9NQQ1NSDMF8F1","eval-generator-gen-pages","Generate a three-layer eval suite (presence checks + unit tests + security analysis) for Power Apps Generative Pages in Model-Driven Apps. Generative pages are single-file React\u002FTypeScript components using Fluent UI V9 and the dataApi prop for Dataverse operations — NOT Code Apps, NOT PCF components. Code may be generated by the App Agent in make.powerapps.com or by AI code generation tools (Claude Code, GitHub Copilot CLI) using the \u002Fgenpage skill. Always produces: evals\u002Fmanifest.json, evals\u002Fpresence\u002F\u003Cid>.check.ts, evals\u002Funit\u002F\u003Cfeature>.test.tsx, evals\u002Frunner\u002Frun-evals.ts, evals\u002Frunner\u002Fpresence-runner.ts, evals\u002Frunner\u002Fsecurity-runner.ts, and evals\u002Fdashboard\u002Findex.html. Triggers: 'eval my generative page', 'generate evals for gen page', 'review my genpage code', 'test my generative page', 'check my model driven app page', 'eval generator gen pages'.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fpower-cat-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fpowercat-procode-eval\u002Fskills\u002Feval-generator-gen-pages\u002FSKILL.md",[],[103,104,105,106,107,108,109,110,79,111,81,112,85,113,114,115,116,117,118,119],"eval","generator","eval generator","eval generator gen pages","pages","unit","app","tsx","generative","URL","components","fluent","react","github copilot cli","generate","eval suite","run",{"skillNo":121,"name":122,"nameZh":6,"description":123,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":124,"categories":125,"keywords":126,"publishedAt":95},"01M711K4VSKBM85NYF3C5QQZQF","eval-generator-code-app","Generate a two-layer eval suite (presence checks + static security analysis) for a Power Apps Code App. Code Apps use @microsoft\u002Fpower-apps SDK with generated service classes in src\u002Fgenerated\u002Fservices\u002F — NOT @microsoft\u002Fpowerapps-component-framework or context.webAPI.*. BRD is optional — if absent, features are derived from a code review of the project. Always produces: evals\u002Fmanifest.json, evals\u002Fpresence\u002F\u003Cid>.check.ts files, evals\u002Frunner\u002Frun-evals.ts, evals\u002Frunner\u002Fpresence-runner.ts, evals\u002Frunner\u002Fsecurity-runner.ts, and evals\u002Fdashboard\u002Findex.html. Triggers: 'generate code app evals', 'eval my code app', 'generate tests for code app', 'code app eval generator', 'check feature completeness code app'.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fpower-cat-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fpowercat-procode-eval\u002Fskills\u002Feval-generator-code-app\u002FSKILL.md",[],[109,103,104,105,127,128,79,129,130,131,132,81,112,133,117,118,119,134,135,93],"code","eval generator code app","project","static","code review","files","component","security","context",{"skillNo":137,"name":138,"nameZh":6,"description":139,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":140,"categories":141,"keywords":142,"publishedAt":95},"01M711JZEWX0N2D7EA74YBCJ9G","powercat-overpage","Reviews the Power Pages site(s) inside a Power Platform solution .zip against best practices across Security, Performance, Accessibility, Maintainability, Architecture and Reliability — by reading the pages, web templates, custom JS\u002FCSS, settings and table permissions and reasoning about them. Optionally also ingests a browser HAR capture (recommended) to investigate real performance bottlenecks and map them to code. Produces a [SolutionName].findings.json (validated against findings.schema.json) with solution-level, per-site and per-component findings, each with a description, a suggested fix, and (where relevant) a code or HAR anchor. Then opens the PowerCAT OverPage viewer with the solution, findings and HAR loaded so the user can explore findings overlaid on a live page preview, on the actual code, and on the network waterfall. Triggers: 'powercat overpage', 'overpage my site', 'review my power pages site', 'review this portal solution', 'evaluate this power pages solution', 'audit power pages site', 'overpage', 'power pages solution review', 'analyze power pages performance', 'review power pages with har'.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fpower-cat-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fpowercat-overpage\u002Fskills\u002Fpowercat-overpage\u002FSKILL.md",[],[143,144,145,146,147,79,148,149,150,151,152,127,153,154,87,155,156,157,133,158],"powercat overpage","reviews","reliability","relevant","css","performance","explore","fix","map","preview","architecture","review","analyze","browser","permissions","audit",{"skillNo":160,"name":161,"nameZh":6,"description":162,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":163,"categories":164,"keywords":165,"publishedAt":95},"01M711JWDD22RDQ4HG6XD3V96F","powercat-overflow","Reviews every Power Automate cloud flow inside a Power Platform solution (.zip) against Microsoft's coding guidelines and produces a [SolutionName].findings.json next to the uploaded solution, then opens the hosted PowerCAT-Overflow viewer at https:\u002F\u002Fmicrosoft.github.io\u002Fpower-cat-skills\u002FPowerCAT-Overflow.html and uploads both files so the user can explore the results. Triggers: 'powercat overflow', 'overflow my solution', 'review my solution', 'evaluate flows in this solution', 'audit Power Auto","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fpower-cat-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fpowercat-overflow\u002Fskills\u002Fpowercat-overflow\u002FSKILL.md",[],[166,144,79,149,167,132,168,154,169,170,158,171,172,173,174,175,91,176,177,92],"powercat overflow","flows","auto","io","next","at","flow","my","coding","html","viewer","zip",{"skillNo":179,"name":180,"nameZh":6,"description":181,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":182,"categories":183,"keywords":184,"publishedAt":95},"01M711JRDNTWN8E2JXEE5GHB9A","dev-environment-deprecation-report","Builds a \"Developer Environments Deprecation Report\" (HTML) for any Power Platform tenant: days left until\nunmanaged developer environments are suspended, which ones are unmanaged, the apps, flows and agents at risk,\nenvironments created on behalf of other makers, and makers over the one-per-maker limit. Uses the Power\nPlatform for Admins connectors and a bundled generator script. Use when the user asks for a \"developer\nenvironment report\", \"unmanaged developer environments\", \"dev environment deprecation\", \"created on behalf\nof developer environments\", \"one PDE per maker\" or \"days left until developer environment suspension\".\nDo NOT use for production, sandbox, default or Teams environment reports, or general\ninventory\u002Fusage questions — use ask-power-platform-advisor instead.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fpower-cat-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fpowercat-governance\u002Fskills\u002Fdev-environment-deprecation-report\u002FSKILL.md",[],[185,186,187,188,189,190,191,77,79,192,193,167,194,81,82,195,196,197,198,171],"deprecation","dev environment deprecation report","environment","dev","dev environment","report","tenant","maker","inventory","default","ask","analysis","reports","advisor"]