Official agent skill

Add Sample Data

by microsoft in microsoft/power-platform-skills

Populates Dataverse tables with sample records for testing and demoing a Power Pages site.

OfficialMITAuto-check: notesTesting & QA

Install Add Sample Data

skills CLI
$ npx skills add microsoft/power-platform-skills --skill add-sample-data -a claude-code

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

GitHub CLI
$ gh skill install microsoft/power-platform-skills add-sample-data --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/power-pages/skills/add-sample-data .claude/skills/add-sample-data && 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
add-sample-data
GitHub stars
967
Token cost
~3.1k tokens
SKILL.md length
1,271 words
Files
2 (incl. references)
Skills in repo
87
Repo updated
First seen
Licence
MIT

At a glance

Populates Dataverse tables with sample records for testing and demoing a Power Pages site.

  • Works in 6 steps: Verify Prerequisites → Discover Tables → Select Tables & Configure → …
  • The user wants to add sample data
  • SKILL.md covers Core Principles, Phase 1: Verify Prerequisites, Phase 2: Discover Tables and Phase 3: Select Tables &…, plus 4 more sections
  • Calls node

What it does

Add Sample Data is an agent skill from microsoft/power-platform-skills, published by the product's own GitHub organization. Populates Dataverse tables with sample records for testing and demoing a Power Pages site. Use when the user wants to add sample data, seed data, generate test records, or insert demo data into their tables.

Its SKILL.md is about 3.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/odata-record-patterns.md`).

It sits in Testing & QA, covering Test generation and Test data and fixtures. It works with Microsoft Azure. 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 add sample data
  • Generate test records
  • Insert demo data into their tables

Example prompts

  • “Use the add-sample-data skill to populate Dataverse tables with sample records for testing and demoing a Power Pages site”
  • “/add-sample-data”

Requirements

  • Pre-approved tools (allowed-tools): Read, Write, Bash, Grep, Glob, AskUserQuestion, Task, TaskCreate, TaskUpdate, TaskList, mcp__plugin_power-pages_microsoft-learn__microsoft_docs_search, mcp__plugin_power-pages_microsoft-learn__microsoft_code_sample_search, mcp__plugin_power-pages_microsoft-learn__microsoft_docs_fetch

Workflow steps

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

  1. Verify Prerequisites
  2. Discover Tables
  3. Select Tables & Configure
  4. Generate & Review Sample Data
  5. Insert Sample Data
  6. Verify & Summarize

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
    • Write
    • Bash
    • Grep
    • Glob
    • AskUserQuestion
    • Task
    • TaskCreate
    • TaskUpdate
    • TaskList

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

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • node

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

  • Network

    No URLs in SKILL.md.

    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

Add Sample Data loads about 3.1k tokens when it runs, and up to ~4.7k if it reads all its reference files. Until then it costs about 56 tokens; SKILL.md has 1,271 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~56
When it runs · the whole SKILL.md, loaded when a task matches
~3.1k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~4.7k

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, Write, Bash, Grep, Glob, AskUserQuestion, Task, TaskCreate, TaskUpdate, TaskList, mcp__plugin_

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). 1,271 words, ~3,061 tokens.

Download SKILL.mdSave it as .claude/skills/add-sample-data/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
add-sample-data
description
Populates Dataverse tables with sample records for testing and demoing a Power Pages site. Use when the user wants to add sample data, seed data, generate test records, or insert demo data into their tables.
allowed-tools
Read, Write, Bash, Grep, Glob, AskUserQuestion, Task, TaskCreate, TaskUpdate, TaskList, mcp__plugin_power-pages_microsoft-learn__microsoft_docs_search, mcp__plugin_power-pages_microsoft-learn__microsoft_code_sample_search, mcp__plugin_power-pages_microsoft-learn__microsoft_docs_fetch
user-invocable
true
model
sonnet

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

Add Sample Data

Populate Dataverse tables with sample records via OData API so users can test and demo their Power Pages sites.

Core Principles

  • Respect insertion order: Always insert parent/referenced tables before child/referencing tables so lookup IDs are available when needed.
  • Use TaskCreate/TaskUpdate: Track all progress throughout all phases -- create the todo list upfront with all phases before starting any work.
  • Fail gracefully: On insertion failure, log the error and continue with remaining records -- never attempt automated rollback.

Initial request: $ARGUMENTS


Phase 1: Verify Prerequisites

Goal: Confirm PAC CLI auth, acquire an Azure CLI token, and verify API access

Actions:

  1. Create todo list with all 6 phases (see Progress Tracking table)
  2. Follow the prerequisite steps in ${PLUGIN_ROOT}/references/dataverse-prerequisites.md to verify PAC CLI auth, acquire an Azure CLI token, and confirm API access. Note the environment URL as <envUrl> for subsequent script calls.

Output: Authenticated session with valid token and confirmed API access


Phase 2: Discover Tables

Goal: Find the custom tables available in the user's Dataverse environment

Actions:

Path A: Read .datamodel-manifest.json (Preferred)

Check if .datamodel-manifest.json exists in the project root (written by the setup-datamodel skill). If it exists, read it -- it already contains table logical names, display names, and column info.

See ${PLUGIN_ROOT}/references/datamodel-manifest-schema.md for the full manifest schema.

Path B: Query OData API (Fallback)

If no manifest exists, discover custom tables via OData:

node "${PLUGIN_ROOT}/scripts/dataverse-request.js" <envUrl> GET "EntityDefinitions?\$select=LogicalName,DisplayName,EntitySetName&\$filter=IsCustomEntity eq true"

For each discovered table, fetch its custom columns:

node "${PLUGIN_ROOT}/scripts/dataverse-request.js" <envUrl> GET "EntityDefinitions(LogicalName='<table>')/Attributes?\$select=LogicalName,DisplayName,AttributeType,RequiredLevel&\$filter=IsCustomAttribute eq true"
2.1 Present Available Tables

Show the user the list of discovered tables with their columns so they can choose which to populate.

Output: List of discovered tables with their columns presented to the user


Phase 3: Select Tables & Configure

Goal: Gather user preferences on which tables to populate and how many records to create

Actions:

3.1 Select Tables
<!-- gate: add-sample-data:3.1.tables | category=plan | cancel-leaves=nothing -->

🚦 Gate (plan · add-sample-data:3.1.tables): Multi-select over discovered tables — decides which tables get populated with sample data.

Trigger: Phase 2 discovery completed. Why we ask: Auto-selecting all tables can pollute production-shape tables (e.g. contact) with throwaway records. Cancel leaves: Nothing — no record inserts yet.

Use AskUserQuestion to ask which tables they want to populate (use multiSelect: true). List all discovered tables as options.

3.2 Select Record Count
<!-- gate: add-sample-data:3.2.count | category=plan | cancel-leaves=nothing -->

🚦 Gate (plan · add-sample-data:3.2.count): Pick records-per-table (5 / 10 / 25 / Custom). Custom branch is a follow-up free-text prompt under the same gate.

Trigger: Tables selected in 3.1. Why we ask: Inserting hundreds of records can blow past Dataverse storage / API throttling budgets. Cancel leaves: Nothing — no record inserts yet.

Use AskUserQuestion to ask how many sample records per table:

OptionDescription
5 recordsQuick test -- just enough to verify the setup
10 recordsLight demo data for basic testing
25 recordsFuller dataset for realistic demos
CustomLet the user specify a number
3.3 Determine Insertion Order

Analyze relationships between selected tables. Parent/referenced tables must be inserted first so their IDs are available for child/referencing table lookups.

Build the insertion order:

  1. Tables with no lookup dependencies (parent tables) -- insert first
  2. Tables that reference already-inserted tables -- insert next
  3. Continue until all tables are ordered

Output: Confirmed table selection, record count, and insertion order


Phase 4: Generate & Review Sample Data

Goal: Generate contextually appropriate sample records and get user approval before inserting

Actions:

4.1 Generate Contextual Sample Data

For each selected table, generate sample records with contextually appropriate values based on column names and types:

  • String columns: Generate realistic values matching the column name (e.g., "Email" -> jane.doe@example.com, "Phone" -> (555) 123-4567, "Name" -> realistic names)
  • Memo columns: Generate short descriptive text relevant to the column name
  • Integer/Decimal/Currency columns: Generate reasonable numeric values
  • DateTime columns: Generate dates within a sensible range (past year to next month)
  • Boolean columns: Mix of true and false values
  • Picklist/Choice columns: Query valid options first (see references/odata-record-patterns.md), then use actual option values
  • Lookup columns: Reference records from parent tables that will be/were already inserted
4.2 Present Sample Data Preview

For each table, show a markdown table previewing the sample records directly in the conversation:

markdown
### Project (cr123_project) -- 5 records

| Name | Description | Status | Start Date |
|------|-------------|--------|------------|
| Website Redesign | Modernize the corporate website | 100000000 (Active) | 2025-03-15 |
| Mobile App | Build iOS and Android app | 100000001 (Planning) | 2025-04-01 |
| ... | ... | ... | ... |

Show relationship handling: which lookup fields reference which parent table records.

Output: Sample data plan ready for insertion. Proceed directly to Phase 5.


Phase 5: Insert Sample Data

Goal: Execute OData POST calls to create all approved sample records with correct relationship handling

Actions:

Refer to references/odata-record-patterns.md for full patterns.

5.1 Get Entity Set Names

For each table, get the entity set name (needed for the API URL):

node "${PLUGIN_ROOT}/scripts/dataverse-request.js" <envUrl> GET "EntityDefinitions(LogicalName='<table>')?\$select=EntitySetName"
5.2 Get Picklist Options

For any picklist/choice columns, query valid option values before insertion:

node "${PLUGIN_ROOT}/scripts/dataverse-request.js" <envUrl> GET "EntityDefinitions(LogicalName='<table>')/Attributes(LogicalName='<column>')/Microsoft.Dynamics.CRM.PicklistAttributeMetadata?\$expand=OptionSet"

Use the actual Value integers from the option set in your sample data.

Show full SKILL.md (508 more words)Show less
5.3 Insert Parent Tables First

Insert records into parent/referenced tables first to capture their IDs:

node "${PLUGIN_ROOT}/scripts/dataverse-request.js" <envUrl> POST "<EntitySetName>" --body '{"cr123_name":"Sample Record","cr123_description":"A sample record for testing"}' --include-headers

The --include-headers flag includes the OData-EntityId response header, which contains the created record ID. Parse the GUID from the response to use in child table lookups.

Store parent record IDs for use in child table lookups.

5.4 Insert Child Tables with Lookups

For child/referencing tables, use @odata.bind syntax to set lookup fields:

node "${PLUGIN_ROOT}/scripts/dataverse-request.js" <envUrl> POST "<ChildEntitySetName>" --body '{"cr123_name":"Child Record","cr123_ParentId@odata.bind":"/<ParentEntitySetName>(<parent_guid>)"}' --include-headers
5.5 Track Progress

Track each insertion attempt:

  • Record table name, record number, success/failure
  • On failure, log the error message but continue with remaining records
  • Do NOT attempt automated rollback on failure
5.6 Refresh Token Periodically

The dataverse-request.js script handles 401 token refresh internally. For long-running operations (many records), periodically re-run verify-dataverse-access.js to confirm the session is still valid:

node "${PLUGIN_ROOT}/scripts/verify-dataverse-access.js" <envUrl>

Output: All approved records inserted with parent-child relationships established


Phase 6: Verify & Summarize

Goal: Confirm record counts and present a final summary to the user

Actions:

6.1 Verify Record Counts

For each table that was populated, query the record count:

node "${PLUGIN_ROOT}/scripts/dataverse-request.js" <envUrl> GET "<EntitySetName>?\$count=true&\$top=0"

The @odata.count field in the response gives the total record count.

6.2 Record Skill Usage

Reference: ${PLUGIN_ROOT}/references/skill-tracking-reference.md

Follow the skill tracking instructions in the reference to record this skill's usage. Use --skillName "AddSampleData".

6.3 Present Summary

Present a summary table:

TableRecords RequestedRecords CreatedFailures
cr123_project (Project)10100
cr123_task (Task)1091

Include:

  • Total records created across all tables
  • Any failures with error details
  • Lookup relationships that were established
6.4 Suggest Next Steps

After the summary, suggest:

  • Review the data in the Power Pages maker portal or model-driven app
  • If the site is not yet built: /create-site
  • If the site is ready to deploy: /deploy-site

Output: Verified record counts and summary presented to the user


Important Notes

Throughout All Phases
  • Use TaskCreate/TaskUpdate to track progress at every phase
  • Ask for user confirmation at key decision points (see list below)
  • Respect insertion order -- always insert parent tables before child tables
  • Fail gracefully -- log errors and continue, never rollback automatically
  • Refresh tokens every 20 records to avoid expiration
Key Decision Points (Wait for User)
  1. After Phase 2: Confirm which tables to populate
  2. After Phase 3: Confirm record count and insertion order
  3. After Phase 6: Review summary and decide next steps
Progress Tracking

Before starting Phase 1, create a task list with all phases using TaskCreate:

Task subjectactiveFormDescription
Verify prerequisitesVerifying prerequisitesConfirm PAC CLI auth, acquire Azure CLI token, verify API access
Discover tablesDiscovering tablesRead .datamodel-manifest.json or query OData API for custom tables
Select tables and configureConfiguring tablesUser picks tables, record count, and determine insertion order
Generate and review sample dataGenerating sample dataGenerate contextual sample records, present preview, get user approval
Insert sample dataInserting recordsExecute OData POST calls with relationship handling and token refresh
Verify and summarizeVerifying resultsConfirm record counts, present summary, suggest next steps

Mark each task in_progress when starting it and completed when done via TaskUpdate. This gives the user visibility into progress and keeps the workflow deterministic.


Begin with Phase 1: Verify Prerequisites

© 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

SKILL.md and 1 other file (references) in plugins/power-pages/skills/add-sample-data of microsoft/power-platform-skills.

  • SKILL.md
  • references/odata-record-patterns.md

Open the folder on GitHubat commit 5ef4e4f

Compare with similar skills

Add Sample Data 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.

Add Sample Data compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Add Sample Data this skillmicrosoft/power-platform-skills967—~3.1kAutomated safety check: NotesMIT
Skill Doli Test InteractiveDolibarr/dolibarr7.7k1 repos~5.5kAutomated safety check: PassGPL-3.0
Run E2E Testkubernetes-sigs/cloud-provider-azure294—~3.8kAutomated safety check: PassApache-2.0
Codexqa Testdata Generatoropenqa-cn/codexqa152—~4.8kAutomated safety check: PassApache-2.0
Eval Designagentscope-ai/OpenJudge867—~2.8kAutomated safety check: WarnApache-2.0
Sdaf Quality AssuranceAzure/sap-automation145—~1.6kAutomated safety check: PassMIT

Similar skills

  • Create interactive PHP test case scripts for Dolibarr ERP/CRM that allow users to setup test data, view results via direct links, and tear down (clean up) the data.

    7.7k GitHub starsUsed in 1 repo~5.5k tokens
    Testing & QAAuto-check passed
  • Run E2E Test

    kubernetes-sigs/cloud-provider-azure

    Official

    Parse a Go e2e test from tests/e2e/, translate each step to kubectl and az CLI commands, and interactively replay the test against a live cluster.

    294 GitHub stars~3.8k tokensUpdated today
    Testing & QAAuto-check passed
  • Constructs test data against real backends and writes it back into test cases as executable preconditions.

    152 GitHub stars~4.8k tokensUpdated 4 days ago
    Testing & QAAuto-check passed
  • Eval Design

    agentscope-ai/OpenJudge

    A skill your agent uses when the user needs to design evaluation datasets, create test cases, stratify samples, generate adversarial examples, extract eval dimensions from traces/specs, or build a…

    867 GitHub stars~2.8k tokensUpdated 26 days ago
    Testing & QAAuto-check: warnings
  • Sdaf Quality Assurance

    Azure/sap-automation

    Official

    Validate a deployed SDAF SAP system through the SDAF-owned QA entry points: the local quality-assurance menu and the documented Azure DevOps pipeline 13 path.

    145 GitHub stars~1.6k tokensUpdated today
    Testing & QAAuto-check passed
  • Wellknown Analyzer

    microsoft/terraform-provider-fabric

    Official

    Analyze dependencies and determine what infrastructure must be added to tools/scripts/Set-WellKnown.ps1 and internal/testhelp/wellknown.go so that acceptance tests for a new resource have all…

    128 GitHub stars~3.2k tokensUpdated yesterday
    Testing & QAAuto-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 Add Sample Data

What does Add Sample Data do?

Populates Dataverse tables with sample records for testing and demoing a Power Pages site. Add Sample Data is an agent skill from microsoft/power-platform-skills, published by the product's own GitHub organization. Populates Dataverse tables with sample records for testing and demoing a Power Pages site.

When should I use Add Sample Data?

Add Sample Data fits situations like: the user wants to add sample data; generate test records; insert demo data into their tables.

How do I install Add Sample Data in Claude Code?

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

How do I install Add Sample Data in Codex?

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

Can I use Add Sample Data 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 add-sample-data -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/add-sample-data, .gemini/skills/add-sample-data, .github/skills/add-sample-data and .opencode/skills/add-sample-data in your project.

What does Add Sample Data need to run?

Going by SKILL.md and its folder, Add Sample Data needs the command-line tools its instructions call (node). Its frontmatter pre-approves these tools: Read, Write, Bash, Grep, Glob, AskUserQuestion, Task, TaskCreate, TaskUpdate, TaskList, mcp__plugin_power-pages_microsoft-learn__microsoft_docs_search, mcp__plugin_power-pages_microsoft-learn__microsoft_code_sample_search, mcp__plugin_power-pages_microsoft-learn__microsoft_docs_fetch.

Does Add Sample Data access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Add Sample Data 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 Add Sample Data use?

Add Sample Data 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 Add Sample Data use?

About 3.1k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.6k tokens, read only when the agent opens those files.

What are the alternatives to Add Sample Data?

Skills that share tags, products or a category with Add Sample Data: Skill Doli Test Interactive (Dolibarr/dolibarr, 7.7k stars), Run E2E Test (kubernetes-sigs/cloud-provider-azure, 294 stars), Codexqa Testdata Generator (openqa-cn/codexqa, 152 stars) and Eval Design (agentscope-ai/OpenJudge, 867 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Add Sample Data?

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.