Official agent skill

Setup Datamodel

by microsoft in microsoft/power-platform-skills

A skill your agent uses 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.

OfficialMITAuto-check: notesDevelopment

Install Setup Datamodel

skills CLI
$ npx skills add microsoft/power-platform-skills --skill setup-datamodel -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install microsoft/power-platform-skills setup-datamodel --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/microsoft/power-platform-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/mobile-apps/skills/setup-datamodel .claude/skills/setup-datamodel && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
setup-datamodel
GitHub stars
967
Token cost
~2.6k tokens
SKILL.md length
968 words
Files
1
Skills in repo
87
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses 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.

  • Works in 8 steps: Verify Project & Auth → Design Data Model → Plan Connectors → …
  • The user wants to design
  • SKILL.md covers Workflow and Reference
  • Calls node and npx

What it does

Setup Datamodel is an agent skill from microsoft/power-platform-skills, published by the product's own GitHub organization. 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.

Its SKILL.md is about 2.6k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Diagrams. It works with Mermaid. The repository describes itself as: A plugin marketplace for GitHub Copilot and other AI agents that provides Power Platform development plugins, including reusable skills, agents, and commands for building and… The licence is MIT.

When your agent uses it

  • The user wants to design
  • Redesign the Dataverse schema and connector plan for an existing mobile app
  • Has an ER diagram (image
  • Is creating a brand-new app — /create-mobile-app handles the data model inline

Example prompts

  • “/setup-datamodel”

Requirements

  • Node.js
  • Pre-approved tools (allowed-tools): Read, Edit, Write, Grep, Glob, Bash, AskUserQuestion, EnterPlanMode, ExitPlanMode, Task, Skill

Workflow steps

8 steps, taken from the step headings in SKILL.md.

  1. Verify Project & Auth
  2. Design Data Model
  3. Plan Connectors
  4. Combined Approval
  5. Execute Data Model
  6. Execute Connectors
  7. 5 — Offline profile reconciliation
  8. Summary

What it can do on your machine

Read from SKILL.md and the folder at commit 5ef4e4f. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Edit
    • Write
    • Grep
    • Glob
    • Bash
    • AskUserQuestion
    • EnterPlanMode
    • ExitPlanMode
    • Task

    …and 1 more on the same allowed-tools line.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • node
    • npx

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use npx, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Setup Datamodel loads about 2.6k tokens when it runs. Until then it costs about 71 tokens; SKILL.md has 968 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~71
When it runs · the whole SKILL.md, loaded when a task matches
~2.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Read, Edit, Write, Grep, Glob, Bash, AskUserQuestion, EnterPlanMode, ExitPlanMode, Task, Skill

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from microsoft/power-platform-skills at commit 5ef4e4f, republished under its MIT licence (© microsoft). 968 words, ~2,638 tokens.

Download SKILL.mdSave it as .claude/skills/setup-datamodel/SKILL.md (or your agent's skills folder).
name
setup-datamodel
description
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.
allowed-tools
Read, Edit, Write, Grep, Glob, Bash, AskUserQuestion, EnterPlanMode, ExitPlanMode, Task, Skill
user-invocable
true
model
opus

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

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

Show full SKILL.md (394 more words)Show less
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

© microsoft, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in plugins/mobile-apps/skills/setup-datamodel of microsoft/power-platform-skills.

Open the folder on GitHubat commit 5ef4e4f

Compare with similar skills

Setup Datamodel next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Setup Datamodel compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Setup Datamodel this skillmicrosoft/power-platform-skills967—~2.6kAutomated safety check: NotesMIT
Archify Diagramstt-a1i/archify79k—~2.9kAutomated safety check: PassMIT
Diagram Designcathrynlavery/diagram-design44k1 repos~7.5kAutomated safety check: PassMIT
Draw.io Diagram StudioAgents365-ai/drawio-skill10k—~2.4kAutomated safety check: NotesMIT
Pretty Mermaid Rendererimxv/Pretty-mermaid-skills1.5k—~2kAutomated safety check: PassMIT
Archify Diagram BuilderUnclecheng-li/AI_Animation1.4k2 repos~4.1kAutomated safety check: PassMIT

Similar skills

  • Archify Diagrams

    tt-a1i/archify

    Creates interactive architecture, workflow, sequence, data-flow and lifecycle diagrams as standalone HTML with inline SVG, themes and image or video export.

    79k GitHub stars~2.9k tokensUpdated today
    DevelopmentAuto-check passed
  • Diagram Design

    cathrynlavery/diagram-design

    Creates branded diagrams, from architecture, flowchart and sequence to charts and maps, as self-contained HTML with inline SVG, with import from draw.io, Mermaid and Excalidraw.

    44k GitHub starsUsed in 1 repo~7.5k tokens
    DevelopmentAuto-check passed
  • Draw.io Diagram Studio

    Agents365-ai/drawio-skill

    Creates and edits editable draw.io diagrams from descriptions, code, infrastructure files, SQL and API schemas, with sync, review, test and export tools.

    10k GitHub stars~2.4k tokensUpdated 5 days ago
    DevelopmentAuto-check: notes
  • Pretty Mermaid Renderer

    imxv/Pretty-mermaid-skills

    Writes and renders Mermaid diagrams as themed SVG, PNG or terminal ASCII and Unicode art with a bundled Node.js CLI that needs no browser.

    1.5k GitHub stars~2k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • Archify Diagram Builder

    Unclecheng-li/AI_Animation

    Builds validated architecture, workflow, sequence, data-flow and lifecycle diagrams as standalone interactive HTML from a small JSON spec, with optional motion and image export.

    1.4k GitHub starsUsed in 2 repos~4.1k tokens
    DevelopmentAuto-check passed
  • Mermaid

    WH-2099/mermaid-skill

    Generate Mermaid diagrams from user requirements. An agent skill from WH-2099/mermaid-skill.

    288 GitHub starsUsed in 4 repos~958 tokens
    DevelopmentAuto-check passed

More from microsoft/power-platform-skills

All 87 skills in this repo
  • Manage Firewall

    microsoft/power-platform-skills

    Official

    Inspects and configures the web application firewall (WAF) in front of a Power Pages production site.

    967 GitHub stars~4.5k tokensUpdated today
    Auto-check: notes
  • Manage Headers

    microsoft/power-platform-skills

    Official

    Inspects and configures the security headers a Power Pages site sends to browsers — Content Security Policy, frame and clickjacking protection, cross-origin sharing, cookie behavior, and related…

    967 GitHub stars~3k tokensUpdated today
    Auto-check: notes
  • Scan Code

    microsoft/power-platform-skills

    Official

    Scans a Power Pages site project for security issues in source code and dependencies.

    967 GitHub stars~3.4k tokensUpdated today
    Auto-check: notes
  • Scan Site

    microsoft/power-platform-skills

    Official

    Runs a security scan on a deployed Power Pages site, fetches the latest scan report, and produces a plain-language summary.

    967 GitHub stars~3.2k tokensUpdated today
    Auto-check: notes
  • Setup Datamodel

    microsoft/power-platform-skills

    Official

    Creates Dataverse tables, columns, and relationships for a Power Pages site based on a data model proposal.

    967 GitHub stars~4k tokensUpdated today
    Auto-check: notes
  • Add Server Logic

    microsoft/power-platform-skills

    Official

    Creates, edits, and manages Power Pages Server Logic files — server-side JavaScript that runs securely on the Power Pages runtime.

    967 GitHub stars~18k tokensUpdated today
    Auto-check: notes

Works with

Categories

Questions about Setup Datamodel

What does Setup Datamodel do?

A skill your agent uses 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. Setup Datamodel is an agent skill from microsoft/power-platform-skills, published by the product's own GitHub organization. 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.

When should I use Setup Datamodel?

Setup Datamodel fits situations like: the user wants to design; redesign the Dataverse schema and connector plan for an existing mobile app; has an ER diagram (image; is creating a brand-new app — /create-mobile-app handles the data model inline.

How do I install Setup Datamodel in Claude Code?

Run `npx skills add microsoft/power-platform-skills --skill setup-datamodel -a claude-code`. Or copy the skill folder (plugins/mobile-apps/skills/setup-datamodel in microsoft/power-platform-skills) into .claude/skills/setup-datamodel in your project. Claude Code loads it when a task matches its description.

How do I install Setup Datamodel in Codex?

Run `npx skills add microsoft/power-platform-skills --skill setup-datamodel -a codex`. Or copy the skill folder (plugins/mobile-apps/skills/setup-datamodel in microsoft/power-platform-skills) into .agents/skills/setup-datamodel in your project. Codex loads it when a task matches its description.

Can I use Setup Datamodel in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add microsoft/power-platform-skills --skill setup-datamodel -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/setup-datamodel, .gemini/skills/setup-datamodel, .github/skills/setup-datamodel and .opencode/skills/setup-datamodel in your project.

What does Setup Datamodel need to run?

Going by SKILL.md and its folder, Setup Datamodel needs the command-line tools its instructions call (node and npx). Our summary lists: Node.js. Its frontmatter pre-approves these tools: Read, Edit, Write, Grep, Glob, Bash, AskUserQuestion, EnterPlanMode, ExitPlanMode, Task, Skill.

Does Setup Datamodel access the network?

SKILL.md contains no URLs. Its commands use npx, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Setup Datamodel safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Setup Datamodel use?

Setup Datamodel is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Setup Datamodel use?

About 2.6k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Setup Datamodel?

Skills that share tags, products or a category with Setup Datamodel: Archify Diagrams (tt-a1i/archify, 79k stars), Diagram Design (cathrynlavery/diagram-design, 44k stars), Draw.io Diagram Studio (Agents365-ai/drawio-skill, 10k stars) and Pretty Mermaid Renderer (imxv/Pretty-mermaid-skills, 1.5k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Setup Datamodel?

microsoft (a GitHub organization, an official publisher) maintains it in microsoft/power-platform-skills, which has 967 GitHub stars. The repository holds 87 skills in this directory. The repository was last updated on October 6, 2026.

Source: microsoft/power-platform-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.