К основному содержанию
плагин

pcf — плагин для Claude Code: что делает и как установить

Сборка, тестирование, деплой и аудит компонентов PCF для Power Apps. Помогает создавать контролы для model-driven и canvas-приложений.

MIT ★ 1 167 обновлён 2026-10-29

Установить в Claude Code · Через маркетплейс плагинов Все способы и платформы ↓
/plugin marketplace add microsoft/power-platform-skills
/plugin install pcf@power-platform-skills
Открыть на GitHub

Что делает pcf

Плагин pcf автоматизирует работу с Power Apps component framework в проектах для model-driven приложений, Power Pages и canvas apps. Работа начинается с этапа планирования: формируется pcf-intent.json и файл pcf-plan.md, требующий одобрения разработчика. Затем плагин разворачивает проект по официальным шаблонам Microsoft, выполняет линтинг, модульные тесты и проверку манифеста.

Для локальной генерации и тестирования кода достаточно среды Node.js 20+. Однако без установленных PAC CLI и .NET SDK деплой решения через pac pcf push выполнить не удастся, а аудит зависимостей в Dataverse потребует Azure CLI (az).

Плагин находится в статусе превью. Поддержка Power Pages пока ограничена стандартными полями форм и тегом Liquid {% codecomponent %}, а контролы наборов данных для Pages ещё не поддерживаются.

Какие задачи решает

  • сгенерировать шаблон компонента PCF из репозитория Microsoft
  • проверить манифест и код перед сборкой в продакшен
  • развернуть компонент через PAC CLI с подтверждением окружения
  • найти все зависимости и места использования контрола в Dataverse

Примеры запросов агенту

  • /pcf:pcf Создай контрол рейтинга звёздами для формы model-driven
  • /pcf Продиагностируй, почему проект PCF не собирается
  • /pcf Разверни компонент и проверь привязку к полям

Как установить pcf

Через маркетплейс плагинов

/plugin marketplace add microsoft/power-platform-skills
/plugin install pcf@power-platform-skills

По шагам, с командами для каждой платформы: Плагины Claude Code: маркетплейсы, установка и как собрать свой

Вопросы о pcf

Как установить pcf в Claude Code?

Сначала подключите каталог командой /plugin marketplace add microsoft/power-platform-skills, а затем установите плагин вызовом /plugin install pcf@power-platform-skills.

Что делает плагин pcf?

Он ведёт разработчика по полному циклу создания PCF-компонентов: от генерации файлов по шаблонам и локальных тестов до деплоя в Power Apps.

Какие системные утилиты нужны для работы?

Для локального создания проектов и тестов требуется Node.js 20+. Для упаковки и деплоя обязательны PAC CLI и .NET SDK, а для инвентаризации в Dataverse — Azure CLI.

Исходный текст

pcf · MIT
# PCF Plugin

Build, test, diagnose, upgrade, deploy, bind, verify and inventory Power Apps component framework (PCF) code components for model-driven apps, with guided setup for Power Pages standard field controls and canvas apps.

> **Preview**: Behaviour, file formats and commands may change between releases, and no recipe is runtime-certified yet. See [`docs/pcf-capabilities.md`](docs/pcf-capabilities.md) for what is proven today and [#656](https://github.com/microsoft/power-platform-skills/issues/656) for pending work.

This release supports Power Pages only for standard field controls: the form-field journey and the standalone Liquid journey (`{% codecomponent %}`), both guided. Dataset controls on Pages (form sub-grid and list) are not supported in this release.

Canvas apps are guided: an admin must turn on **Power Apps component framework for canvas apps** in each environment in the Power Platform admin center. The skill uses the model-driven gate profile and reviews canvas API limits by hand; reading the setting and automated canvas runtime evidence are not implemented. See [canvas setup](references/pcf-canvas.md).

## Installation

```bash
/plugin marketplace add microsoft/power-platform-skills
/plugin install pcf@power-platform-skills
```

```bash
copilot --plugin-dir /path/to/power-platform-skills/plugins/pcf
# or
claude --plugin-dir /path/to/power-platform-skills/plugins/pcf
```

## Prerequisites

| Prerequisite | Required for | Install |
|---|---|---|
| [Node.js](https://nodejs.org/) 20+ and npm | All PCF work | `winget install OpenJS.NodeJS.LTS` |
| [PAC CLI](https://learn.microsoft.com/en-us/power-platform/developer/cli/introduction) | Deploy/package flows | `dotnet tool install -g Microsoft.PowerApps.CLI.Tool` |
| [.NET SDK](https://dotnet.microsoft.com/download) | PAC solution packaging and package smoke tests | `winget install Microsoft.DotNet.SDK.8` |
| [Azure CLI](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli) (`az`) | Dataverse verify and inventory reads | `winget install Microsoft.AzureCLI` |

`/pcf` can scaffold, lint, test, build, doctor and upgrade locally with Node.js alone. Deploy needs PAC CLI and the .NET SDK; verify and inventory need Azure CLI for Dataverse Web API reads.

## Skill

Invoke as `/pcf:pcf` when the namespaced form matters, or `/pcf` when unambiguous.

1. **Plan** — captures `pcf-intent.json`, renders `pcf-plan.md`, and asks for approval before writes.
2. **Scaffold** — creates field/dataset and standard/virtual projects from Microsoft-maintained templates, with optional recipes.
3. **Implement and repair** — applies PCF best practices, host policy, source checks and upgrade guidance.
4. **Gate** — runs manifest, host, source, lint, unit-test and production-build checks.
5. **Deploy** — uses `pac pcf push` with an explicit environment and recorded consent.
6. **Bind and verify** — guides Maker binding, then checks registration and draft/published metadata.
7. **Inventory** — lists registered controls and registered where-used dependencies.

Example prompts:

- `Create a PCF star rating control for a model-driven form`
- `Diagnose why this PCF project will not build`
- `Upgrade this PCF control to the pcf compatibility matrix`
- `Deploy this PCF control and verify the binding`
- `Inventory where this PCF control is used`

## Running Without Interruption

The skill pauses before environment writes, destructive local changes, deployment, and binding instructions that require maker action. Unattended runs may scaffold, lint, test, build, doctor, upgrade in dry-run mode, verify already-deployed metadata, and inventory read-only Dataverse evidence when credentials are available.

The plugin invokes multiple tools during a session. To reduce approval prompts:

### GitHub Copilot CLI

**Option 1 — Allow specific tools (recommended)**

```bash
copilot --allow-tool 'write' --allow-tool 'shell(node *)' --allow-tool 'shell(npm *)' --allow-tool 'shell(pac *)' --allow-tool 'shell(az *)' --allow-tool 'shell(powershell *)'
```

**Option 2 — Allow all tools**

```bash
copilot --allow-all-tools
```

### Claude Code

**Option 1 — Permission mode (recommended)**

```jsonc
// .claude/settings.json
{
  "defaultMode": "acceptEdits",
  "permissions": {
    "allow": [
      "Bash(node *)",
      "Bash(npm *)",
      "Bash(pac *)",
      "Bash(az *)",
      "Bash(powershell *)"
    ]
  }
}
```

**Option 2 — Auto-accept all**

```bash
claude --dangerously-skip-permissions
```

## Hooks and guardrails

The plugin registers lifecycle hooks (in `hooks/hooks.json`) that run automatically while it's loaded. They are **fail-open**: any internal error exits 0, so a hook can never fail or abort a skill run. Because the plugin installs **globally**, the write-safety guard is scoped so it does not interfere with unrelated projects: it only **flags** (never blocks) writes outside the cwd during an active PCF authoring session (a `pcf-intent.json` or `pcf-plan.md` at/under cwd).

| Hook | When | What it does |
|---|---|---|
| Write-safety | before Write/Edit/MultiEdit | **Flags (non-blocking)** writes outside the cwd only during a PCF authoring session. Never blocks; silent in unrelated projects. |
| Skill telemetry | before Skill/skill | Emits `skill_started` for tracked PCF skills; see [Telemetry](#telemetry). |
| Prompt telemetry | on UserPromptSubmit | Emits `skill_started` for tracked PCF slash commands; see [Telemetry](#telemetry). |

**Escape hatches** (environment variables — set to `1` or `true`):

| Variable | Effect |
|---|---|
| `PCF_DISABLE_HOOKS` | Disables **all** pcf hooks. |
| `PCF_SKIP_WRITE_GUARD` | Disables **only** the write-safety guard. |

```powershell
# Windows (PowerShell)
$env:PCF_DISABLE_HOOKS = "1"
```

```bash
# macOS / Linux (bash)
export PCF_DISABLE_HOOKS=1
```

## Telemetry

Usage telemetry is **enabled and default-on** for transmission, with **no first-run prompt**. PCF shares model-apps' 1DS tenant and instrumentation keys; its bundled `ikey.json` is a byte-identical copy.

The hooks send **`skill_started` only**, with these approved base fields:

- `pluginName`, `pluginVersion`, `skillName` - plugin and invoked skill identity.
- `sessionId`, `correlationId` - session and per-invocation correlation.
- `osName`, `osVersion`, `nodeVersion` - OS and Node runtime metadata (Node major version only).
- `pacCliVersion`, `aiAgentName`, `aiAgentVersion` - PAC and host agent metadata when available.
- `orgId`, `tenantId` - Dataverse organization and Entra tenant GUIDs when PAC is signed in.

There is **no user object ID** and **no `eventInfo` payload**. The Power Apps client `event` envelope uses `clientType: "PcfAIPlugin"` and `pluginName: "pcf"` so PCF usage stays separate from other plugins and native-client traffic.

**Routing matches model-apps:** a public-cloud organization routes by its geo to the US or EU collector, with no public-default fallback when its geo is unknown. Only signed-out PAC uses the configured US default. Sovereign or internal clouds route from the PAC cloud stamp alone, never to a public collector; unknown clouds and signed-in organizations without a cloud stamp send nothing.

**Never sent:** file paths, cwd, environment variables, prompts, skill arguments, tool inputs, site names, Dataverse URLs, stack traces, error-message text, credentials, usernames or hostnames.

**Transmission opt-outs:** `/pcf:telemetry off` saves `telemetry["pcf"] = "off"` in `~/.power-platform-skills/config.json`; `POWER_PLATFORM_SKILLS_TELEMETRY_PCF_OPTOUT=1` (or `true`) has the **highest precedence**, including over `/pcf:telemetry on`. `/pcf:telemetry status` shows the actual build state and effective preference.

**Local mirror:** `~/.power-platform-skills/telemetry/pcf/sessions/<sessionId>/events.jsonl` retains the same approved fields even after a transmission opt-out. Sessions older than 14 days are pruned best-effort, and logs rotate above 10 MB.

## Relation to model-apps

PCF code components ship in this separate plugin because the same component can be used by model-driven apps, canvas apps and Power Pages; this release builds and verifies them for model-driven apps, and guides Power Pages standard field controls and canvas apps. The model-apps plugin still owns whole-app and generative-page authoring: `/model-apps:app-builder` builds whole apps, and `/model-apps:genpage` builds pages. The plugins connect only at the skill level. With both installed, an agent working in `/model-apps:app-builder` can hand a control off to `/pcf:pcf` by passing it a `pcf-intent.json`; App Builder does not do this on its own. Neither plugin runs the other's scripts, because each installs on its own.

© Microsoft · MIT · microsoft/power-platform-skills

Похожие плагины

Все плагины по теме «Фронтенд и UI» →
pcf-tooling официальный github Правило pcf-tooling для GitHub Copilot, которое подключает Microsoft Power Platform CLI при работе с Power Apps Component Framework. Срабатывает на файлах TypeScript, JavaScript, JSON, XML и проектах PCF. CX Codex +1 ★ 41 430звёзд репо pcf-alm официальный github Правило pcf-alm для GitHub Copilot описывает управление жизненным циклом PCF-компонентов в Microsoft Dataverse: настройку сборки, версионирование и поставку решений. CX Codex +1 ★ 41 430звёзд репо MCP Dataverse codeurali Сервер подключает ИИ-ассистентов к Microsoft Dataverse для чтения схем, генерации точных OData-запросов и выполнения пакетных операций. Помогает избежать ошибок в структуре таблиц. CX Codex +1 ★ 18звёзд репо dataverse microsoft Плагин для работы с Microsoft Dataverse и Dynamics 365 через Claude Code. Помогает писать запросы, менять схему таблиц, импортировать данные и развёртывать решения. ★ 262звёзд репо mcp-power-automate kaael1 MCP-сервер, через который агент читает, проверяет, правит и откатывает облачные потоки Power Automate. Авторизация берётся из вашей открытой сессии Chromium. CX Codex +1 ★ 30звёзд репо impeccable pbakaus Плагин impeccable для Claude Code, который даёт агенту словарь дизайнера и 24 команды для работы с интерфейсами. Запускается на каждом этапе: от сбора контекста проекта до финальной полировки перед релизом. ★ 114 575звёзд репо hyperframes HeyGen Плагин hyperframes для Claude Code собирает MP4-видео из HTML- и CSS-вёрстки через диалог с агентом. Создаёт субтитры и анимированные ролики. ★ 87 887звёзд репо chrome-devtools-mcp ChromeDevTools Плагин chrome-devtools-mcp подключает Chrome к агенту через протокол MCP для записи трассировок производительности, отладки сетевых запросов и автоматизации действий в браузере. ★ 58 707звёзд репо

Из того же набора157

Весь набор →
power-automate Открывает доступ к облачным потокам Power Automate через автономный сервер FlowAgent. С его помощью правят логику, диагностируют сбои и переносят потоки между средами. ★ 1 167звёзд репо power-apps-mobile-extension Плагин power-apps-mobile-extension помогает спроектировать и собрать нативный контрол Power Apps Mobile в .ppmplugin и создать парный PCF-контрол для Canvas app. ★ 1 167звёзд репо mobile-app Скилл mobile-app для Claude, который собирает мобильное приложение Power Apps на Expo и React Native: план, экраны, нативные функции и коннекторы. ★ 1 167звёзд репо code-apps-preview Плагин code-apps-preview помогает создавать и развёртывать код-приложения Power Apps на базе React и Vite с готовыми коннекторами платформы. ★ 1 167звёзд репо canvas-apps Плагин canvas-apps связывает Claude Code с открытым приложением Power Apps Canvas. Агент сможет создавать и менять экраны, элементы управления и формулы. ★ 1 167звёзд репо mcp-apps Плагин mcp-apps собирает серверный рантайм MCP-инструмента с JSON-регистрацией и HTML-виджет для его результатов, в том числе без CDN. ★ 1 167звёзд репо model-apps Плагин model-apps собирает модельные приложения Power Apps и генеративные страницы из описания обычным языком — от таблиц Dataverse до кода на React. ★ 1 167звёзд репо power-pages Плагин Microsoft для Claude с 39 скиллами: каркас сайта Power Pages, локальная правка, деплой, активация и браузерные тесты. ★ 1 167звёзд репо

Спонсоры проекта

Компании, которые помогают держать аналитику открытой