setup-datamodel

Plugin check : Run node "${CLAUDE_PLUGIN_ROOT}/scripts/check-version.js" β€” if it outputs a message, show it to the user before proceeding.

npx skills add https://github.com/microsoft/power-platform-skills --skill setup-datamodel

πŸ“‹ Shared instructions: shared-instructions.md β€” read first.

Set Up Data Model + Connectors

Combined orchestrator for standalone data source planning. Designs the Dataverse schema, plans connectors, gets approval on both, then delegates execution to /add-dataverse and /add-connector.

Use this skill whenUse /add-dataverse directly when
Standalone schema + connector design (project may or may not exist yet)The plan already exists and you just need to apply tables + generate services
You have an existing ER diagram (image / Mermaid / text) to import/create-mobile-app is invoking this as a sub-step with --skip-planning
Re-planning the schema or connectors mid-projectYou only need to add a single table or a single connector

Workflow

  1. Verify project & auth β†’ 2. Design data model β†’ 3. Plan connectors β†’ 4. Combined approval β†’ 5. Execute data model β†’ 6. Execute connectors β†’ 7. Summary

Phase 1 β€” Verify Project & Auth

Confirm we're inside a Power Apps mobile app:

test -f power.config.json && echo "OK" || echo "ERROR: not a mobile app β€” run /create-mobile-app first"
node "${PLUGIN_ROOT}/scripts/resolve-environment.js" "$(node -e \"console.log(require('./power.config.json').environmentId)\")"

Capture the environment URL, environment ID, tenant ID, and organization ID for Phase 5.

Phase 2 β€” Design Data Model

Telemetry checkpoint: design_dataverse_schema

Check $ARGUMENTS for diagram hints first (*.png, *.jpg, erDiagram keyword, ||--o{ cardinality syntax). If a hint is present β†’ Path A. If $ARGUMENTS describes the app at all β†’ silently take Path B (architect propose). Only if both are empty, ask:

"How would you like to define the data model?"

OptionWhat happens
Upload an existing ER diagramProvide a PNG/JPG path, Mermaid block, or text description
Let the Data Model Architect propose one (default)Spawns data-model-architect agent to infer from requirements
Skip β€” no Dataverse tables neededJump to Phase 3

Default the answer to "architect propose" so an empty answer auto-proceeds without blocking the user.

Artifact storage rules for PDFs and signatures

When requirements mention signatures, sign-off, ink, drawings, generated PDFs, exported reports, evidence packets, or retained documents, make the storage target explicit in ## Data Model before approval:

User signalDataverse model implication
"capture signature", "sign off", "approval signature", "ink"Image column on the signed record for one current signature, or child Evidence/Signature table for multiple captures/history
"generate PDF", "export report", "evidence packet", "certificate PDF"Ask whether the generated PDF should be retained. If yes, use a Dataverse File column, usually on the parent record or a child Evidence/Attachment table. If no, document on-device/share-only behavior and add no column.
"upload PDF", "attach file", "import document"File column or child Attachment table with lookup to parent
"view PDF"Store or reference an HTTPS URL if the app has a durable source. Native PDF viewer 0.2.9+ also supports local file:// URIs; content://, blob:, and http:// remain unsupported.

PDF content must never be modeled as long text/base64 text. Use Dataverse File columns for retained PDFs. Signature PNGs may use Image columns when the generated service supports image payloads; use File columns or child Evidence rows when the capture should behave like an attachment.

Path A β€” Parse user-provided diagram

Accept PNG/JPG (use Read to view), Mermaid syntax (paste in chat), or text description. Parse into tables + columns + relationships. Query existing Dataverse tables to mark each as new / extend / reuse. Generate a Mermaid ER diagram for confirmation. Enter EnterPlanMode for data model approval. On ExitPlanMode approval, write the data model into native-app-plan.md ## Data Model section (creating the file if absent).

Path B β€” Spawn data-model-architect

Task: mobile-app:data-model-architect

Prompt:
  You are the data-model-architect agent for a Power Apps mobile app.
  Requirements: <$ARGUMENTS or ask the user what the app does>
  Working directory: <cwd>
  Plugin root: ${PLUGIN_ROOT}

  Follow your agent file. Return a ## Data Model section with Mermaid ER diagram,
  reuse/extend/create table, and dependency-tier ordering. If requirements mention
  signatures, pen/ink, generated PDFs, report exports, evidence packets, or uploaded
  documents, include the artifact storage target: on-device/share-only, Dataverse
  Image column, Dataverse File column, or child Evidence/Attachment table. Retained
  PDF content must use a File column, not long text/base64.

Present the returned section via EnterPlanMode / ExitPlanMode for approval.

Path C β€” No Dataverse

Write ## Data Model as "None β€” no Dataverse tables needed." Continue to Phase 3.

Phase 3 β€” Plan Connectors

Telemetry checkpoint: plan_connector_integrations

Follow shared/references/connector-planning.md:

  1. Infer β€” if $ARGUMENTS describes what the app does, scan for connector keywords. Build a candidate list.
  2. Confirm β€” present via AskUserQuestion. Let the user add, remove, or confirm.
  3. Record β€” build the ## Connectors section.

If the user provided no requirements context, ask:

"What does your app need to connect to? (e.g. SharePoint, Teams, email, Excel, OneDrive, Azure DevOps β€” or none)"

Phase 4 β€” Combined Approval

Telemetry checkpoint: approve_data_model_and_connectors

Present the full plan β€” data model + connectors β€” together in a single EnterPlanMode block:

## Plan: Data Sources

### Data Model
[reuse/extend/create table]
[Mermaid ER diagram]
[creation order tiers]

### Connectors
[connector table or "None"]

Approve both to proceed with execution?
  • Approved β†’ proceed to Phase 5
  • Change data model β†’ loop back to Phase 2 for that section only, then re-present Phase 4
  • Change connectors β†’ loop back to Phase 3, then re-present Phase 4

Phase 5 β€” Execute Data Model

Telemetry checkpoint: apply_dataverse_schema

Invoke /add-dataverse with --skip-planning so it reads the approved plan directly without re-prompting:

Invoke skill: /add-dataverse

Arguments:
  --working-dir <cwd>
  --plan-section native-app-plan.md#data-model
  --skip-planning

/add-dataverse creates tables in tier order, runs npx power-apps add-data-source --api-id dataverse --org-url <envUrl> --resource-name <name> per table from the app root, publishes customizations, writes .datamodel-manifest.json, and type-checks. Wait for it to return before Phase 6.

Cross-entity reads from the screen plan β€” the approved ### Cross-entity Reads subsection contains formatted lookups, bounded chained fetches, or external-projection-required blockers. /add-dataverse never synthesizes calculated/formula definitions through code. A user-supplied, maker-created computed column is validated as an existing dependency during reconciliation before it can be reused.

Skip if Phase 2 chose Path C (no Dataverse).

Phase 6 β€” Execute Connectors

Telemetry checkpoint: generate_connector_data_sources

Read ## Connectors from native-app-plan.md. For each connector row, invoke /add-connector:

Invoke skill: /add-connector

Arguments:
  --working-dir <cwd>
  --connector <api-name>

Run sequentially. Skip if ## Connectors is "None".

Phase 6.5 β€” Offline profile reconciliation

Telemetry checkpoint: reconcile_offline_profile

If Phase 5 created or extended Dataverse tables, an existing Mobile Offline Profile may now be missing those tables/columns. Because Phase 5 invoked /add-dataverse with --skip-planning (which suppresses that skill's own Step 8.5 reconciliation), this orchestrator owns the check. Skip when Phase 2 chose Path C (no Dataverse).

Run the local, no-network delta check:

node "${PLUGIN_ROOT}/scripts/offline-profile-delta.js"

Branch on the JSON status per offline-profile-reconciliation.md: no-manifest / no-profile / in-sync β†’ continue to Phase 7 silently (do not nag when no profile exists); delta β†’ prompt to update, then read and execute ${PLUGIN_ROOT}/skills/add-table-to-offline-profile/SKILL.md for missingTables[] and ${PLUGIN_ROOT}/skills/edit-offline-profile/SKILL.md for tablesWithNewColumns[], passing the arguments documented by each workflow, and re-check to in-sync.

Phase 7 β€” Summary

βœ… Data sources set up
─────────────────────────────────────────────
Data model:
  Tables reused  : <list>
  Tables extended: <list>
  Tables created : <list>
  Manifest       : .datamodel-manifest.json

Connectors:
  <list of added connectors, or "None">

Generated services:
  src/generated/services/ Γ— <N>
  src/generated/models/   Γ— <N>

Type-check: PASS

Next steps:
  /add-datasource   β€” add more data sources
  /add-native       β€” add device capabilities
  screen-builder    β€” implement screens using the generated services
─────────────────────────────────────────────

Reference

More skills from microsoft

oss-growth
microsoft
OSS growth hacker persona
agent-framework-azure-ai-py
microsoft
Build Azure AI Foundry agents using the Microsoft Agent Framework Python SDK (agent-framework-azure-ai). Use when creating persistent agents with AzureAIAgentsProvider, using hosted tools (code interpreter, file search, web search), integrating MCP servers, managing conversation threads, or implementing streaming responses. Covers function tools, structured outputs, and multi-tool agents.
development
airunway-aks-setup
microsoft
Set up AI Runway on AKS β€” from bare cluster to running model. Covers cluster verification, controller install, GPU assessment, provider setup, and first deployment. WHEN: "setup AI Runway", "onboard AKS cluster", "install AI Runway", "airunway setup", "deploy model to AKS", "GPU inference on AKS", "KAITO setup on AKS", "run LLM on AKS", "vLLM on AKS", "set up model serving on AKS", "AI Runway controller".
devops
appinsights-instrumentation
microsoft
Guidance for instrumenting webapps with Azure Application Insights. Provides telemetry patterns, SDK setup, and configuration references. WHEN: how to instrument app, App Insights SDK, telemetry patterns, what is App Insights, Application Insights guidance, instrumentation examples, APM best practices.
devops
applicationinsights-web-ts
microsoft
Instrument browser/web apps with the Application Insights JavaScript SDK (@microsoft/applicationinsights-web). Use for Real User Monitoring (RUM) β€” page views, clicks, AJAX/fetch dependencies, exceptions, custom events, and browser-side GenAI agent traces correlated to backend OpenTelemetry traces. Covers SDK Loader Script and npm setup, framework extensions (React, React Native, Angular), Click Analytics, telemetry initializers, and OTel GenAI semantic conventions for agent/tool/model spans emitted from the browser.
devops
azure-ai-anomalydetector-java
microsoft
Build anomaly detection applications with Azure AI Anomaly Detector SDK for Java. Use when implementing univariate/multivariate anomaly detection, time-series analysis, or AI-powered monitoring.
development
azure-ai-language-conversations-py
microsoft
Implement Conversational Language Understanding (CLU) using the azure-ai-language-conversations Python SDK. Use when working with ConversationAnalysisClient to analyze conversation intent and entities, building NLP features, or integrating language understanding into applications.
development
azure-ai-ml-py
microsoft
Azure Machine Learning SDK v2 for Python. Use for ML workspaces, jobs, models, datasets, compute, and pipelines. Triggers: "azure-ai-ml", "MLClient", "workspace", "model registry", "training jobs", "datasets".
development