Setup Datamodel logo

Setup Datamodel

Organization
microsoft
setup-datamodel

Use when the user wants to design or redesign the Dataverse schema and connector plan for an existing mobile app, or has an ER diagram (image, Mermaid, or text) to apply. Skip when the user is creating a brand-new app — /create-mobile-app handles the data model inline.

Overview

Publishermicrosoft
Repositorypower-platform-skills
Skill namesetup-datamodel
Stars
895
Forks
182
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by microsoft on GitHub. Read the source before you install it.

Installation

Install the Setup Datamodel AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/microsoft/power-platform-skills.git /tmp/power-platform-skills
mkdir -p .claude/skills
cp -r /tmp/power-platform-skills/plugins/mobile-apps/skills/setup-datamodel .claude/skills/setup-datamodel
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Setup Datamodel in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Setup Datamodel on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Setup Datamodel is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

📋 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:

bash
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:

bash
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

Frequently asked questions

What does the Setup Datamodel AI skill do?

Use when the user wants to design or redesign the Dataverse schema and connector plan for an existing mobile app, or has an ER diagram (image, Mermaid, or text) to apply. Skip when the user is creating a brand-new app — /create-mobile-app handles the data model inline.

Why use Setup Datamodel on TypingMind?

Because you install it once and use it with any model. Setup Datamodel is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Setup Datamodel in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/microsoft/power-platform-skills/tree/main/plugins/mobile-apps/skills/setup-datamodel. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Setup Datamodel?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Setup Datamodel?

As many as you like. As long as a model supports skills, you can use Setup Datamodel with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Setup Datamodel AI skill free?

Yes. It is published on GitHub by microsoft under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇