From code-apps-preview
Adds Dataverse tables to Power Apps code apps with generated TypeScript models and services. Creates new tables via API. Use for connecting to Dataverse, schema design, or querying data.
How this skill is triggered — by the user, by Claude, or both
Slash command
/code-apps-preview:add-dataverseopusThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
**📋 Shared Instructions: [shared-instructions.md](${CLAUDE_PLUGIN_ROOT}/shared/shared-instructions.md)** - Cross-cutting concerns.
📋 Shared Instructions: shared-instructions.md - Cross-cutting concerns.
References:
Two paths: existing tables (skip to Step 5) or new tables (full workflow).
Check memory bank for project context. Ask the user:
account, contact, cr123_customentity)If tables already exist: Skip to Step 5.
If creating new tables:
contact for people, account for organizations)EnterPlanMode, present ER model with tables, columns, relationships, and creation orderExitPlanModeSee api-authentication-reference.md for full details.
az account show # Verify Azure CLI logged in
pwsh -NoProfile -Command "pac org who" # Get environment URL
$api = Initialize-DataverseApi -EnvironmentUrl "https://<org>.crm.dynamics.com"
$headers = $api.Headers
$baseUrl = $api.BaseUrl
$publisherPrefix = $api.PublisherPrefix
Requires System Administrator or System Customizer security role.
Always query existing tables first before creating:
$existingTables = Invoke-RestMethod -Uri "$baseUrl/EntityDefinitions?`$filter=IsCustomEntity eq true&`$select=SchemaName,LogicalName,DisplayName" -Headers $headers
See table-management-reference.md for Find-SimilarTables, Compare-TableSchemas, and Build-TableNameMapping functions.
Present findings to user with AskUserQuestion:
Get explicit confirmation before creating. Create in dependency order:
Use safe functions from table-management-reference.md:
New-DataverseTableIfNotExistsAdd-DataverseColumnIfNotExistsAdd-DataverseLookupIfNotExists (from data-architecture-reference.md)For each table:
pwsh -NoProfile -Command "pac code add-data-source -a dataverse -t <table-logical-name>"
Can add multiple tables by running the command for each one.
The command generates:
src/generated/models/{Table}Model.ts -- TypeScript interfacessrc/generated/services/{Table}Service.ts -- CRUD methods (create, get, getAll, update, delete)Show the user a usage example:
import { AccountsService } from "../generated/services/AccountsService";
const result = await AccountsService.getAll({
select: ["name", "accountnumber"],
filter: "statecode eq 0",
orderBy: ["name asc"],
top: 50
});
const accounts = result.data || [];
Key rules:
AccountsService.getAll()), not fetch/axiosresult.data for actual datanpm run build
Fix TypeScript errors before proceeding. Do NOT deploy yet.
Record which tables were added (or created), generated files, and any schema notes.
npx claudepluginhub microsoft/power-platform-skills --plugin code-apps-previewPopulates Dataverse tables with sample records via OData API for testing and demoing Power Pages sites. Handles prerequisites, table discovery from manifest or API, and ordered insertions.
Defines and evolves Dataverse data models — tables, columns, relationships, forms, and views — using the Python SDK and Web API within a solution context. Publishes metadata changes to the environment rather than hand-editing XML.
Creates React and Vite code apps for Power Apps. Scaffolds projects, checks prerequisites like Node.js and pac CLI, authenticates, builds, and deploys to Power Platform.