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

model-apps — плагин для Claude Code: приложения Power Apps и genux-страницы

Плагин model-apps собирает модельные приложения Power Apps и генеративные страницы из описания обычным языком — от таблиц Dataverse до кода на React.

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

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

Что делает model-apps

Плагин закрывает два сценария в модельных приложениях Power Apps. /app-builder берёт описание задачи и создаёт по нему таблицы, связи, формы, представления, диаграммы, роли безопасности, само приложение и карту сайта. /genpage отвечает за генеративные страницы: отдельные агенты планируют работу, создают сущности и параллельно пишут код на React, TypeScript и Fluent, после чего страница деплоится через встроенный SDK и проверяется в браузере.

Перед первым запуском нужны Node.js LTS, PAC CLI версии выше 2.10.0 и Azure CLI. az login должен пройти под той же учёткой, что активна в pac auth list: через az идут все обращения к Dataverse, включая деплой страницы и определение языков среды. Резервного пути через pac для этих шагов нет, поэтому без входа в az страница не уедет в среду.

Часть возможностей по умолчанию выключена: телеметрия страницы и встроенные операции Dataverse. Включаются они флагом в feature-flags.json или переменной вида GENPAGE_ENABLE_..., текущее состояние показывает node scripts/lib/feature-flags.js --list. Один вызов az может занять до 60 секунд; поднять потолок можно через POWER_PLATFORM_SKILLS_AZ_TIMEOUT_MS в миллисекундах (1000–900000).

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

  • собрать приложение Dataverse из описания задачи
  • сгенерировать React-страницу под готовую модель данных
  • выпустить роли безопасности вместе с приложением и картой сайта
  • проверить задеплоенную страницу в браузере
  • включить операции Dataverse только на один запуск

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

  • Собери модельное приложение для учёта заявок: таблицы, формы и карту сайта
  • Сделай генеративную страницу со списком заказов и фильтром по статусу
  • Запусти node scripts/lib/feature-flags.js --list и скажи, какие флаги включены

Как установить model-apps

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

/plugin marketplace add microsoft/power-platform-skills
/plugin install model-apps@power-platform-skills

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

Вопросы о model-apps

Как установить model-apps в Claude Code?

Добавьте маркетплейс командой /plugin marketplace add microsoft/power-platform-skills, затем поставьте плагин: /plugin install model-apps@power-platform-skills.

Что делает model-apps?

/app-builder собирает модельное приложение Power Apps из описания на обычном языке, а /genpage создаёт генеративные страницы на React, TypeScript и Fluent и деплоит их через встроенный SDK.

Что нужно, чтобы задеплоить страницу?

Node.js LTS, PAC CLI выше 2.10.0 и Azure CLI с выполненным az login под той же учёткой, что в pac auth list. Все вызовы Dataverse идут через az, и заменить его на pac здесь нельзя.

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

model-apps · MIT
# Model Apps Plugin

Build and deploy generative pages (genux) for Power Apps model-driven apps. This plugin provides a complete workflow — from validating prerequisites and gathering requirements, through generating React + TypeScript + Fluent code, to deploying through the bundled SDK and verifying in the browser.

## Installation

### From the marketplace

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

### From a local clone

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

## Prerequisites

| Prerequisite | Required for | Install |
|---|---|---|
| [Node.js](https://nodejs.org/) (LTS) | All skills | `winget install OpenJS.NodeJS.LTS` |
| [PAC CLI](https://learn.microsoft.com/en-us/power-platform/developer/cli/introduction) > 2.10.0 | Signing in, choosing the environment and reading the CLI version (`pac auth`, `pac org who`, `pac help`); the fallbacks of the connection, connector and deployment-settings scripts; reading a tabular connector's table columns (`scripts/connector.js schema --dataset --table`); and listing a tabular connector's tables, which no script wraps (`pac model genpage list-connector-tables`) | `dotnet tool install -g Microsoft.PowerApps.CLI.Tool` |
| [Azure CLI](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli) (`az`) | Every Dataverse call — tables, apps, languages, entity creation and generative pages — and the Power Apps service token that reading connections and connector metadata uses | `winget install Microsoft.AzureCLI` |

After installing `az`, run `az login` with the same identity as your active `pac auth list` profile. `az` is what every Dataverse call authenticates with — listing tables, apps and languages, entity creation, and the generative pages themselves, which are written, read and deleted through the bundled SDK, not through `pac model genpage` — and it signs in the Power Apps service token that the connection and connector-metadata reads use. **Deploying a page needs `az`**, and so does detecting the environment's languages: there is no `pac` fallback for either, so a missing or signed-out `az` ends language detection with the reason, never with an English default. `pac` signs you in and chooses the environment, and steps in for the connection, connector and deployment-settings scripts only where the SDK has no route or refuses (`connectionsSource` or `source` says which answered; `connectionsFallback` or `fallback` says why the SDK did not). It also lists a tabular connector's tables (`pac model genpage list-connector-tables`; no script wraps it), and `scripts/connector.js schema --dataset --table` reads a table's columns through `pac`: the plugin cannot build the client the SDK reads a connector's tables with. The type generator, the page listing and download, and putting a page in an app, taking it out and deleting it are the SDK's too (`scripts/genpage.js`), so they need `az` and no `pac`.

Each Azure CLI call (a token, `az account show`) may take up to **60 seconds** — a busy machine can
take most of that just to start `az`. A call that runs out of time is reported as a timeout (the
pre-flight's `az_timeout`), never as a missing or signed-out CLI. To allow longer, set
`POWER_PLATFORM_SKILLS_AZ_TIMEOUT_MS` in milliseconds (1000–900000), for example `120000`.

A page write whose outcome is unknown (the connection dropped before the answer) is never sent again blindly: the page is read first, and
what it holds decides whether the write landed — the message says what to check when that cannot be told. There is no `pac` call, and so
no timeout setting, for pages.

## Feature flags (defaults and overrides)

Some capabilities ship **OFF by default** while their cross-repo dependencies roll
out to production: custom telemetry and built-in Dataverse operation authoring are OFF.
Flags are catalogued (with lifecycle status) in `scripts/lib/feature-flags.js`; their on/off
value lives in `feature-flags.json` at the plugin root.

| Flag | Status | Default | Enables | Depends on |
|---|---|---|---|---|
| `custom-telemetry` | in-progress | OFF | A generated page reporting its own events, metrics, traces and exceptions to your Application Insights resource via `props.appInsights` | the page telemetry facade in the UCI host runtime, the GenUX authoring control, the AIBuilder telemetry prompt, and the `GenUxEnableCustomTelemetry` setting — all live in PROD |
| `dataverse-operations` | experimental | OFF | Offering two reviewed built-in Dataverse Functions, WhoAmI and RetrieveVersion, as explicitly selected, button-only page calls (`executeFunction`); `scripts/list-dataverse-operations.js` lists them without contacting the environment | a host runtime that implements `executeFunction`, the page `actionBindings` the plugin writes, and the `GenUxPluginActionAllowList` setting; the environment, the page player and the signed-in user's permissions are not checked — see [the built-in operations reference](references/dataverse-operations.md) |

Connector authoring is in **public preview** and no longer has a feature flag. Connector discovery, binding, deploy, and ALM packaging are always available when the required PAC and host capabilities are present.

Custom API support has no feature flag either: calling a supported public Dataverse Custom API
Action or Function from a generated page (`executeAction` / `executeFunction` /
`listBoundActions`) is always available. `GENPAGE_ENABLE_CUSTOM_API` is ignored — `0` no longer
turns Custom API discovery off, and there is nothing to turn on. The host runtimes,
revision-bound `actionBindings`, environment governance and the signed-in user's privileges
still apply.

**See the current state** (status, whether each flag is on, and why):

```bash
node scripts/lib/feature-flags.js --list
```

**Turn a flag on for a single run** via an environment variable (highest precedence):

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

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

**Turn it on persistently** by changing its committed value in `feature-flags.json`:

```json
{ "dataverse-operations": true }
```

Precedence is **env var → `feature-flags.json` → default OFF** for missing/unset
configuration (fail-closed). Host capabilities and server governance still apply; turning a
flag on grants no new privileges.
The env var name is always `GENPAGE_ENABLE_` plus the flag name in upper case, with
`-` turned into `_` (`dataverse-operations` → `GENPAGE_ENABLE_DATAVERSE_OPERATIONS`), and unknown
flags stay disabled even if a matching env var is set.

Custom API discovery omits private APIs and APIs with Entity/EntityCollection inputs or outputs.
Lookup input names stay available to the author separately from the primitive-only wire
`parameterKinds`; see [the Custom API contract](references/custom-api.md).

## Model selection

Use a general-purpose coding model or an advanced reasoning model. Lightweight models optimized
primarily for fast, simple tasks aren't recommended for `/app-builder` or `/genpage` because both
skills require multistep planning, tool use, code generation, and validation.

## Skills

PCF code components ship in the separate preview [pcf plugin](../pcf/README.md).

The plugin provides two authoring skills: `/app-builder` builds a whole model-driven app, and
`/genpage` builds standalone generative pages for an existing app. **They are independent — you can
use either on its own, and neither requires the other.**

| Skill | Status | Use it when |
|---|---|---|
| [`/app-builder`](#app-builder) | Stable | You want a whole app — tables, relationships, forms, views, charts, security roles, app + sitemap |
| [`/genpage`](#genpage) | Stable | You want one or more generative pages added to an app that already exists |

Already have an app and just want to add a page? Use `/genpage` — you never need to run
`/app-builder` first. Building from scratch? `/app-builder` authors its own generative pages as part
of the build, so you don't need to run `/genpage` afterwards.

### `/app-builder`

> Review the dry-run plan before approving, and use `teardown-model-app.js --apply` to clean up
> probes. `--changed-only` (partial apply) is still experimental and off by default. Report issues
> with `/report-issue`.

Builds and edits a whole model-driven Power App from a natural-language intent, via the headless
vendored `cds-maker-sdk`. It runs an interactive, multi-turn authoring flow and a narrated build:

1. **Select environment** — resolves the target Dataverse org and confirms auth
2. **Author the App Spec** (design-only) — tables, columns, relationships, adaptive forms with
   sub-grids, views, Choice-column charts, dashboards, generative **page intents**, personas, and the
   app shell + sitemap, with two consent levels and previews you approve before anything is written
3. **Guardrail lint** — `spec-lint` + `validateAppSpec` gate the spec before any live call
4. **Plan approval** — a phase-grouped dry-run plan is shown in plan mode for your go-ahead
5. **Generate pages** — dispatches parallel page-builder workers to write each page's `.tsx`
6. **Build** — applies the spec idempotently phase by phase, then optionally `--verify` reconciles
   the deployed app against the spec
7. **Edit** — downloads a deployed app back into an editable App Spec so you can change and rebuild it

**Usage:** Invoke directly with `/app-builder`, or use any of the keywords below:

- `Build an app for tracking service requests`
- `Create a model-driven app to manage suppliers and contracts`
- `Make me an app to manage job candidates and interviews`
- `Edit my app — add a table for invoices and put it on the nav`

### `/genpage`

Creates, updates, and deploys generative pages for model-driven Power Apps. Handles the complete workflow in a single session:

1. **Validate prerequisites** — checks Node.js and PAC CLI version
2. **Authenticate** — verifies PAC CLI auth and `az` (entity creation and page deployment both sign in through `az`)
3. **Gather requirements** — asks about page type, data source, and specific features
4. **Create entities** (optional) — uses the plugin's Node.js Web API scripts to create Dataverse tables, columns, relationships, and choice columns when the requested entities don't exist. Asks which solution to land them in
5. **Choose the app** — lists the environment's apps (`scripts/apps.js list`); when no model-driven app is targeted, the app is created in step 8, from the first page deployed (`scripts/apps.js create`), because an app opens on its pages
6. **Generate schema** — runs `scripts/genpage.js types` (the SDK's type generator) for Dataverse entity pages
7. **Generate code** — produces a complete single-file `.tsx` component (parallel page-builders for multi-page requests)
8. **Deploy** — writes the page through the bundled SDK (`scripts/genpage-upload.js`); a page needs no app, and is added to an app's navigation only when the upload names the app (`--app-id`) and asks for the placement (`--add-to-sitemap`) — `--app-id` alone only pins the default views of the page's tables in the app. For a new app the first page is deployed first, then the app is created from it, then the other pages are added
9. **Verify** — optionally opens the page in Playwright for interactive testing

**Usage:** Invoke directly with `/genpage`, or use any of the keywords below to trigger the skill automatically:

- `Build a data grid page for my model-driven app`
- `Build a sortable contact dashboard with charts for my Power App`
- `I need a genux page to display account records with sorting and filtering`
- `Generate a CRUD page for managing custom entities in Power Apps`
- `Add a new page to my model-driven app that shows opportunity records as cards`

## Running Without Interruption

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(pac *)' --allow-tool 'shell(node *)' --allow-tool 'shell(powershell *)' --allow-tool 'shell(az *)'
```

**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(pac *)",
      "Bash(node *)",
      "Bash(powershell *)",
      "Bash(az *)"
    ]
  }
}
```

**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 hooks
are scoped so they don't interfere with unrelated projects: the write-safety guard
only **flags** (never blocks) and only during an active model-apps authoring session,
and the icon validator only fires on generated-page output. At most, the icon
validator blocks a single tool call (the agent reworks it) — never the whole skill.

| Hook | When | What it does |
|---|---|---|
| Write-safety | before Write/Edit/MultiEdit | **Flags (non-blocking)** writes outside the cwd — only during a model-apps authoring session (a `genpage-plan.md`, `app-spec.json`, or `model-app-plan.md` at/under cwd, so it covers both `/genpage` and `/app-builder`). Never blocks; silent in unrelated projects. |
| Icon validator | after a generated `.tsx` write | Blocks `@fluentui/react-icons` imports that aren't in the verified list. Fires for both skills (gated on the `export default GeneratedComponent` marker, or a sibling `genpage-plan.md` / `model-app-plan.md`). |
| Skill validator | after a skill runs | Runs the skill's `validate*.js` if it has one. |
| Telemetry | on skill start / prompt | Emits `skill_started` usage telemetry (see [Telemetry](#telemetry)). |

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

| Variable | Effect |
|---|---|
| `MODEL_APPS_DISABLE_HOOKS` | Disables **all** model-apps hooks (validators + telemetry emit). |
| `MODEL_APPS_SKIP_WRITE_GUARD` | Disables **only** the write-safety guard (keeps the others). |

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

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

## Telemetry

model-apps ships opt-out usage telemetry (1DS). It is **on by default** (you opt
out). Events go to the collector for your environment's cloud — the US or EU data
boundary for a public-cloud org, or the matching sovereign collector (GCC, GCC High,
DoD, China); an unrecognized cloud sends nothing. Then:

- **What's collected:** skill name, plugin/PAC/agent versions, OS/Node versions,
  session/correlation IDs, and Dataverse organization and Entra tenant GUIDs when
  PAC is signed in. Model Apps excludes the signed-in user's Entra object ID.
  Events do not include file paths, prompts, tool inputs, entity/table names, URLs,
  credentials, usernames, or hostnames.
- **Local diagnostic mirror:** every event is also written to
  `~/.power-platform-skills/telemetry/model-apps/sessions/<id>/events.jsonl` (even
  when you've opted out of transmission) and retains the same event fields.
  Hand over that one file when filing an issue.
- **Opt out** per-user with `/model-apps:telemetry off` (re-enable with `on`, check
  with `status`), or for CI/automation set
  `POWER_PLATFORM_SKILLS_TELEMETRY_MODEL_APPS_OPTOUT=1` (highest precedence).

## Technology Stack

- **React 17 + TypeScript** — all generated page code
- **Fluent UI V9** — `@fluentui/react-components` for styling and components
- **Single file architecture** — each page is one `.tsx` file with `export default GeneratedComponent`
- **DataAPI** — typed CRUD operations against Dataverse tables via `props.dataApi`
- **PAC CLI** — sign-in and environment choice, the fallbacks of the connection, connector and deployment-settings scripts, and a tabular connector's tables and columns (`pac model genpage list-connector-tables`, `scripts/connector.js schema --dataset --table`); pages, their schema and their listing, download and removal go through the bundled SDK
- **Playwright** — optional browser verification after deployment

## Documentation

- [Build Model-Driven Apps with External Tools](https://learn.microsoft.com/en-us/power-apps/maker/model-driven-apps/model-driven-app-external-tools)
- [Generative Pages with External Tools](https://learn.microsoft.com/en-us/power-apps/maker/model-driven-apps/generative-page-external-tools)
- [Generative Pages Overview](https://learn.microsoft.com/en-us/power-apps/maker/model-driven-apps/generative-pages)
- [Power Apps Model-Driven Apps](https://learn.microsoft.com/en-us/power-apps/maker/model-driven-apps/model-driven-app-overview)
- [PAC CLI Reference](https://learn.microsoft.com/en-us/power-platform/developer/cli/reference/model)

## License

[MIT](../../LICENSE)

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

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

Все плагины по теме «Облака: AWS, Azure, GCP» →
power-apps-code-apps официальный Awesome Copilot Community Плагин разворачивает каркас проектов Power Apps Code Apps и подключает агента-эксперта по Dataverse и Power Platform. ★ 41 430звёзд репо 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звёзд репо MCP Dataverse codeurali Сервер подключает ИИ-ассистентов к Microsoft Dataverse для чтения схем, генерации точных OData-запросов и выполнения пакетных операций. Помогает избежать ошибок в структуре таблиц. CX Codex +1 ★ 18звёзд репо azure-container-apps MicrosoftDocs Помогает проектировать и развёртывать приложения в Azure Container Apps. Он также подсказывает, как разбирать сбои, настраивать сеть и масштабирование. CX Codex +1 1 400установок azure-static-web-apps MicrosoftDocs Скилл со справочником по Azure Static Web Apps: архитектура, лимиты тарифов, безопасность и развёртывание. CX Codex +1 206установок container-apps-gpu-2025 JosiahSiegel Скилл container-apps-gpu-2025 для Claude Code — база знаний по Azure Container Apps с серверлесными GPU, профилями Dedicated, интеграцией Dapr и автомасштабированием до нуля. CX Codex +1 163установок

Из того же набора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звёзд репо pcf Сборка, тестирование, деплой и аудит компонентов PCF для Power Apps. Помогает создавать контролы для model-driven и canvas-приложений. ★ 1 167звёзд репо power-pages Плагин Microsoft для Claude с 39 скиллами: каркас сайта Power Pages, локальная правка, деплой, активация и браузерные тесты. ★ 1 167звёзд репо

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

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