AGENT SKILL

migrate-to-dataverse

Read the YAML files of an existing Canvas App and replace Power FX data source calls with equivalent Dataverse table calls. USE WHEN the user wants to migrate, replace, or update data source references in pa.yaml files to point to Dataverse tables.

License 许可
MIT
最近更新
2026-11-14
Stars
★ 70
Forks
20

01 前言 Front Matter

name
migrate-to-dataverse
author
Rui Santos
version
1.0.0
description
Read the YAML files of an existing Canvas App and replace Power FX data source calls with equivalent Dataverse table calls. USE WHEN the user wants to migrate, replace, or update data source references in pa.yaml files to point to Dataverse tables.
user-invocable
true

02 资源文件 1

03 SKILL.md 正文

Migrate Canvas App Data Sources to Dataverse

Read the YAML files of the current Canvas App and replace all Power FX data source calls with Dataverse equivalents for the following requirements:

$ARGUMENTS

CRITICAL: Review Guidance First

Before making any changes, you MUST read and internalize the technical reference document:

  • ${CLAUDE_PLUGIN_ROOT}/references/TechnicalGuide.md — Technical best practices, control selection, validation workflow, formulas, layout strategies

Read this file before planning any edits.

CRITICAL: Sync the Canvas App First

Before reading or editing any YAML files, call the sync_canvas MCP tool to ensure a local copy of the canvas app YAML is present and up to date. This pulls the current app state from the coauthoring session into local .pa.yaml files.

Only proceed after sync_canvas completes successfully.

Migration Workflow

1. Discover Available Data Sources

Call list_data_sources to enumerate all data sources connected to the current authoring session. This is the authoritative list of Dataverse tables (and other connectors) available for mapping.

After the call completes, share a discovery summary with the user:

Discovery complete. Available data sources ([N] total):

Name Type Key Columns
[Table Name] Dataverse / SharePoint / … [column names]

For each Dataverse table identified, call get_data_source_schema to retrieve the full column list and Power Fx types. This information is required to map source columns to destination columns accurately.

2. Read the YAML Files

Read every .pa.yaml file produced by sync_canvas. For each file:

  • Identify every Power Fx formula that references a non-Dataverse data source (e.g. SharePoint.GetItems, Filter('MyList', …), Patch('MyList', …), LookUp, Collect, ClearCollect, etc.).
  • Note the source table/list name, the columns referenced, and the operation type (Filter, Patch, LookUp, Collect, etc.).

3. Build a Column Mapping Plan

Using the schemas retrieved in step 1, produce a mapping table for every data source call found:

Proposed Mapping Plan

Source Expression Source Column Dataverse Table Dataverse Column Notes
Filter('Orders List', Status = "Open") Status cr123_orders cr123_status Type match: Text
… … … … …

Rules for column selection:

  • Prefer an exact name match (case-insensitive).
  • Fall back to a semantic name match (e.g. Title → cr123_name).
  • Flag any column with no clear match as ⚠ needs manual review.
  • Respect Power Fx type compatibility — do not map a Text column to a Choices column without an explicit conversion formula.

Present the plan to the user and ask for approval before making any changes:

Does this mapping plan look correct?

  • Approve and apply changes
  • I'd like to adjust the mapping first

If adjustments are requested, update the mapping plan accordingly and re-present.

4. Apply the Replacements

Once the plan is approved, update every affected .pa.yaml file:

  • Replace each source data-call expression with the equivalent Dataverse Power Fx expression using the approved column mapping.
  • Keep all UI properties, layout, and non-data formulas unchanged.
  • Follow the formula conventions in ${CLAUDE_PLUGIN_ROOT}/references/TechnicalGuide.md (use = prefix, wrap multi-line formulas correctly, etc.).
  • Preserve OnVisible initialization patterns — replace collection sources but keep the collection/variable structure if it exists.

Announce progress for each file:

Updating [filename].pa.yaml ([N] of [Total])…

5. Validate

Call compile_canvas after updating all files. Fix any compilation errors before finishing. Report the result:

  • On success: > Compilation successful — all replacements are valid.
  • On failure: > [N] error(s) found — fixing before finishing. [brief description of each error]

Repeat validate → fix until all files compile clean.

6. Complete

When all files pass validation, present a final summary:

Migration complete.

File Expressions Replaced Status
[filename].pa.yaml [N] Compiled

Source replaced: [original data source names] Target: [Dataverse table names used] Columns requiring manual review: [list any ⚠ flagged columns, or "none"]

04 同仓库更多 Skills

microsoft
microsoft/power-cat-skills

create-pcf

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.

★ 70
microsoft
microsoft/power-cat-skills

powercat-skills-router

Route Microsoft Power Platform requests to the best-fit specialist skill across microsoft/power-cat-skills and microsoft/power-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.

★ 70
microsoft
microsoft/power-cat-skills

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/TypeScript 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 /genpage skill. Always produces: evals/manifest.json, evals/presence/<id>.check.ts, evals/unit/<feature>.test.tsx, evals/runner/run-evals.ts, evals/runner/presence-runner.ts, evals/runner/security-runner.ts, and evals/dashboard/index.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'.

★ 70
microsoft
microsoft/power-cat-skills

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/power-apps SDK with generated service classes in src/generated/services/ — NOT @microsoft/powerapps-component-framework or context.webAPI.*. BRD is optional — if absent, features are derived from a code review of the project. Always produces: evals/manifest.json, evals/presence/<id>.check.ts files, evals/runner/run-evals.ts, evals/runner/presence-runner.ts, evals/runner/security-runner.ts, and evals/dashboard/index.html. Triggers: 'generate code app evals', 'eval my code app', 'generate tests for code app', 'code app eval generator', 'check feature completeness code app'.

★ 70
microsoft
microsoft/power-cat-skills

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/CSS, 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'.

★ 70
microsoft
microsoft/power-cat-skills

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://microsoft.github.io/power-cat-skills/PowerCAT-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

★ 70