[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M699S8TPZQ7DSVBKXCC894MV":3,"skill-same:01M699S8TPZQ7DSVBKXCC894MV":91},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":31,"publishedAt":55,"linkOnly":56,"markdownContent":57,"markdownBody":58,"frontMatter":59,"refName":62,"commitSha":63,"skillDirectory":64,"forksCount":65,"repositoryHtmlUrl":66,"repositoryHomepageUrl":67,"ownerHtmlUrl":68,"ownerBlogUrl":69,"ownerDescription":70,"updatedAt":71,"install":72,"resources":84},"01M699S8TPZQ7DSVBKXCC894MV","add-sample-data",null,"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.","microsoft\u002Fpower-platform-skills","microsoft","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F6154722?v=4","01M698VYDXZ6JW5WH3CRV650R8","Microsoft","01M699JVYJFB75D9JM70BN4H0Q",1134,"MIT","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fpower-platform-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fpower-pages\u002Fskills\u002Fadd-sample-data\u002FSKILL.md",[18,23,26],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000008","测试与质量","SCENARIO","使用场景",{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",{"categoryNo":27,"categoryName":28,"taxonomyType":29,"taxonomyTypeDesc":30},"01JBSEEDCAT000000000000033","数据分析师","PROFESSION","适用职业",[32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,9,52,53,54],"add","sample","add sample data","data","when","testing","tables","sonnet","seed","power","fetch","write","read","Bash","search","code","learn","generate","power pages","dataverse","test","docs","MCP","2026-11-10 10:12:30",false,"---\nname: add-sample-data\ndescription: >-\n  Populates Dataverse tables with sample records for testing and demoing a Power Pages site.\n  Use when the user wants to add sample data, seed data, generate test records, or insert\n  demo data into their tables.\nuser-invocable: true\nallowed-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\nmodel: sonnet\n---\n\n> **Plugin check**: Run `node \"${PLUGIN_ROOT}\u002Fscripts\u002Fcheck-version.js\"` — if it outputs a message, show it to the user before proceeding.\n\n# Add Sample Data\n\nPopulate Dataverse tables with sample records via OData API so users can test and demo their Power Pages sites.\n\n## Core Principles\n\n- **Respect insertion order**: Always insert parent\u002Freferenced tables before child\u002Freferencing tables so lookup IDs are available when needed.\n- **Use TaskCreate\u002FTaskUpdate**: Track all progress throughout all phases -- create the todo list upfront with all phases before starting any work.\n- **Fail gracefully**: On insertion failure, log the error and continue with remaining records -- never attempt automated rollback.\n\n**Initial request:** $ARGUMENTS\n\n---\n\n## Phase 1: Verify Prerequisites\n\n**Goal**: Confirm PAC CLI auth, acquire an Azure CLI token, and verify API access\n\n**Actions**:\n\n1. Create todo list with all 6 phases (see [Progress Tracking](#progress-tracking) table)\n2. Follow the prerequisite steps in `${PLUGIN_ROOT}\u002Freferences\u002Fdataverse-prerequisites.md` to verify PAC CLI auth, acquire an Azure CLI token, and confirm API access. Note the environment URL as `\u003CenvUrl>` for subsequent script calls.\n\n**Output**: Authenticated session with valid token and confirmed API access\n\n---\n\n## Phase 2: Discover Tables\n\n**Goal**: Find the custom tables available in the user's Dataverse environment\n\n**Actions**:\n\n### Path A: Read `.datamodel-manifest.json` (Preferred)\n\nCheck 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.\n\nSee `${PLUGIN_ROOT}\u002Freferences\u002Fdatamodel-manifest-schema.md` for the full manifest schema.\n\n### Path B: Query OData API (Fallback)\n\nIf no manifest exists, discover custom tables via OData:\n\n```\nnode \"${PLUGIN_ROOT}\u002Fscripts\u002Fdataverse-request.js\" \u003CenvUrl> GET \"EntityDefinitions?\\$select=LogicalName,DisplayName,EntitySetName&\\$filter=IsCustomEntity eq true\"\n```\n\nFor each discovered table, fetch its custom columns:\n\n```\nnode \"${PLUGIN_ROOT}\u002Fscripts\u002Fdataverse-request.js\" \u003CenvUrl> GET \"EntityDefinitions(LogicalName='\u003Ctable>')\u002FAttributes?\\$select=LogicalName,DisplayName,AttributeType,RequiredLevel&\\$filter=IsCustomAttribute eq true\"\n```\n\n### 2.1 Present Available Tables\n\nShow the user the list of discovered tables with their columns so they can choose which to populate.\n\n**Output**: List of discovered tables with their columns presented to the user\n\n---\n\n## Phase 3: Select Tables & Configure\n\n**Goal**: Gather user preferences on which tables to populate and how many records to create\n\n**Actions**:\n\n### 3.1 Select Tables\n\n\u003C!-- gate: add-sample-data:3.1.tables | category=plan | cancel-leaves=nothing -->\n\n> ? **Gate (plan · add-sample-data:3.1.tables):** Multi-select over discovered tables — decides which tables get populated with sample data.\n>\n> **Trigger:** Phase 2 discovery completed.\n> **Why we ask:** Auto-selecting all tables can pollute production-shape tables (e.g. `contact`) with throwaway records.\n> **Cancel leaves:** Nothing — no record inserts yet.\n\nUse `AskUserQuestion` to ask which tables they want to populate (use `multiSelect: true`). List all discovered tables as options.\n\n### 3.2 Select Record Count\n\n\u003C!-- gate: add-sample-data:3.2.count | category=plan | cancel-leaves=nothing -->\n\n> ? **Gate (plan · add-sample-data:3.2.count):** Pick records-per-table (5 \u002F 10 \u002F 25 \u002F Custom). Custom branch is a follow-up free-text prompt under the same gate.\n>\n> **Trigger:** Tables selected in 3.1.\n> **Why we ask:** Inserting hundreds of records can blow past Dataverse storage \u002F API throttling budgets.\n> **Cancel leaves:** Nothing — no record inserts yet.\n\nUse `AskUserQuestion` to ask how many sample records per table:\n\n| Option | Description |\n|--------|-------------|\n| **5 records** | Quick test -- just enough to verify the setup |\n| **10 records** | Light demo data for basic testing |\n| **25 records** | Fuller dataset for realistic demos |\n| **Custom** | Let the user specify a number |\n\n### 3.3 Determine Insertion Order\n\nAnalyze relationships between selected tables. Parent\u002Freferenced tables must be inserted first so their IDs are available for child\u002Freferencing table lookups.\n\nBuild the insertion order:\n\n1. Tables with no lookup dependencies (parent tables) -- insert first\n2. Tables that reference already-inserted tables -- insert next\n3. Continue until all tables are ordered\n\n**Output**: Confirmed table selection, record count, and insertion order\n\n---\n\n## Phase 4: Generate & Review Sample Data\n\n**Goal**: Generate contextually appropriate sample records and get user approval before inserting\n\n**Actions**:\n\n### 4.1 Generate Contextual Sample Data\n\nFor each selected table, generate sample records with contextually appropriate values based on column names and types:\n\n- **String columns**: Generate realistic values matching the column name (e.g., \"Email\" -> `jane.doe@example.com`, \"Phone\" -> `(555) 123-4567`, \"Name\" -> realistic names)\n- **Memo columns**: Generate short descriptive text relevant to the column name\n- **Integer\u002FDecimal\u002FCurrency columns**: Generate reasonable numeric values\n- **DateTime columns**: Generate dates within a sensible range (past year to next month)\n- **Boolean columns**: Mix of `true` and `false` values\n- **Picklist\u002FChoice columns**: Query valid options first (see references\u002Fodata-record-patterns.md), then use actual option values\n- **Lookup columns**: Reference records from parent tables that will be\u002Fwere already inserted\n\n### 4.2 Present Sample Data Preview\n\nFor each table, show a markdown table previewing the sample records directly in the conversation:\n\n```markdown\n### Project (cr123_project) -- 5 records\n\n| Name | Description | Status | Start Date |\n|------|-------------|--------|------------|\n| Website Redesign | Modernize the corporate website | 100000000 (Active) | 2025-03-15 |\n| Mobile App | Build iOS and Android app | 100000001 (Planning) | 2025-04-01 |\n| ... | ... | ... | ... |\n```\n\nShow relationship handling: which lookup fields reference which parent table records.\n\n**Output**: Sample data plan ready for insertion. Proceed directly to Phase 5.\n\n---\n\n## Phase 5: Insert Sample Data\n\n**Goal**: Execute OData POST calls to create all approved sample records with correct relationship handling\n\n**Actions**:\n\nRefer to `references\u002Fodata-record-patterns.md` for full patterns.\n\n### 5.1 Get Entity Set Names\n\nFor each table, get the entity set name (needed for the API URL):\n\n```\nnode \"${PLUGIN_ROOT}\u002Fscripts\u002Fdataverse-request.js\" \u003CenvUrl> GET \"EntityDefinitions(LogicalName='\u003Ctable>')?\\$select=EntitySetName\"\n```\n\n### 5.2 Get Picklist Options\n\nFor any picklist\u002Fchoice columns, query valid option values before insertion:\n\n```\nnode \"${PLUGIN_ROOT}\u002Fscripts\u002Fdataverse-request.js\" \u003CenvUrl> GET \"EntityDefinitions(LogicalName='\u003Ctable>')\u002FAttributes(LogicalName='\u003Ccolumn>')\u002FMicrosoft.Dynamics.CRM.PicklistAttributeMetadata?\\$expand=OptionSet\"\n```\n\nUse the actual `Value` integers from the option set in your sample data.\n\n### 5.3 Insert Parent Tables First\n\nInsert records into parent\u002Freferenced tables first to capture their IDs:\n\n```\nnode \"${PLUGIN_ROOT}\u002Fscripts\u002Fdataverse-request.js\" \u003CenvUrl> POST \"\u003CEntitySetName>\" --body '{\"cr123_name\":\"Sample Record\",\"cr123_description\":\"A sample record for testing\"}' --include-headers\n```\n\nThe `--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.\n\nStore parent record IDs for use in child table lookups.\n\n### 5.4 Insert Child Tables with Lookups\n\nFor child\u002Freferencing tables, use `@odata.bind` syntax to set lookup fields:\n\n```\nnode \"${PLUGIN_ROOT}\u002Fscripts\u002Fdataverse-request.js\" \u003CenvUrl> POST \"\u003CChildEntitySetName>\" --body '{\"cr123_name\":\"Child Record\",\"cr123_ParentId@odata.bind\":\"\u002F\u003CParentEntitySetName>(\u003Cparent_guid>)\"}' --include-headers\n```\n\n### 5.5 Track Progress\n\nTrack each insertion attempt:\n\n- Record table name, record number, success\u002Ffailure\n- On failure, log the error message but continue with remaining records\n- Do NOT attempt automated rollback on failure\n\n### 5.6 Refresh Token Periodically\n\nThe `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:\n\n```\nnode \"${PLUGIN_ROOT}\u002Fscripts\u002Fverify-dataverse-access.js\" \u003CenvUrl>\n```\n\n**Output**: All approved records inserted with parent-child relationships established\n\n---\n\n## Phase 6: Verify & Summarize\n\n**Goal**: Confirm record counts and present a final summary to the user\n\n**Actions**:\n\n### 6.1 Verify Record Counts\n\nFor each table that was populated, query the record count:\n\n```\nnode \"${PLUGIN_ROOT}\u002Fscripts\u002Fdataverse-request.js\" \u003CenvUrl> GET \"\u003CEntitySetName>?\\$count=true&\\$top=0\"\n```\n\nThe `@odata.count` field in the response gives the total record count.\n\n### 6.2 Record Skill Usage\n\n> Reference: `${PLUGIN_ROOT}\u002Freferences\u002Fskill-tracking-reference.md`\n\nFollow the skill tracking instructions in the reference to record this skill's usage. Use `--skillName \"AddSampleData\"`.\n\n### 6.3 Present Summary\n\nPresent a summary table:\n\n| Table | Records Requested | Records Created | Failures |\n|-------|-------------------|-----------------|----------|\n| `cr123_project` (Project) | 10 | 10 | 0 |\n| `cr123_task` (Task) | 10 | 9 | 1 |\n\nInclude:\n\n- Total records created across all tables\n- Any failures with error details\n- Lookup relationships that were established\n\n### 6.4 Suggest Next Steps\n\nAfter the summary, suggest:\n\n- Review the data in the Power Pages maker portal or model-driven app\n- If the site is not yet built: `\u002Fcreate-site`\n- If the site is ready to deploy: `\u002Fdeploy-site`\n\n**Output**: Verified record counts and summary presented to the user\n\n---\n\n## Important Notes\n\n### Throughout All Phases\n\n- **Use TaskCreate\u002FTaskUpdate** to track progress at every phase\n- **Ask for user confirmation** at key decision points (see list below)\n- **Respect insertion order** -- always insert parent tables before child tables\n- **Fail gracefully** -- log errors and continue, never rollback automatically\n- **Refresh tokens** every 20 records to avoid expiration\n\n### Key Decision Points (Wait for User)\n\n1. After Phase 2: Confirm which tables to populate\n2. After Phase 3: Confirm record count and insertion order\n3. After Phase 6: Review summary and decide next steps\n\n### Progress Tracking\n\nBefore starting Phase 1, create a task list with all phases using `TaskCreate`:\n\n| Task subject | activeForm | Description |\n|-------------|------------|-------------|\n| Verify prerequisites | Verifying prerequisites | Confirm PAC CLI auth, acquire Azure CLI token, verify API access |\n| Discover tables | Discovering tables | Read .datamodel-manifest.json or query OData API for custom tables |\n| Select tables and configure | Configuring tables | User picks tables, record count, and determine insertion order |\n| Generate and review sample data | Generating sample data | Generate contextual sample records, present preview, get user approval |\n| Insert sample data | Inserting records | Execute OData POST calls with relationship handling and token refresh |\n| Verify and summarize | Verifying results | Confirm record counts, present summary, suggest next steps |\n\nMark 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.\n\n---\n\n**Begin with Phase 1: Verify Prerequisites**\n","> **Plugin check**: Run `node \"${PLUGIN_ROOT}\u002Fscripts\u002Fcheck-version.js\"` — if it outputs a message, show it to the user before proceeding.\n\n# Add Sample Data\n\nPopulate Dataverse tables with sample records via OData API so users can test and demo their Power Pages sites.\n\n## Core Principles\n\n- **Respect insertion order**: Always insert parent\u002Freferenced tables before child\u002Freferencing tables so lookup IDs are available when needed.\n- **Use TaskCreate\u002FTaskUpdate**: Track all progress throughout all phases -- create the todo list upfront with all phases before starting any work.\n- **Fail gracefully**: On insertion failure, log the error and continue with remaining records -- never attempt automated rollback.\n\n**Initial request:** $ARGUMENTS\n\n---\n\n## Phase 1: Verify Prerequisites\n\n**Goal**: Confirm PAC CLI auth, acquire an Azure CLI token, and verify API access\n\n**Actions**:\n\n1. Create todo list with all 6 phases (see [Progress Tracking](#progress-tracking) table)\n2. Follow the prerequisite steps in `${PLUGIN_ROOT}\u002Freferences\u002Fdataverse-prerequisites.md` to verify PAC CLI auth, acquire an Azure CLI token, and confirm API access. Note the environment URL as `\u003CenvUrl>` for subsequent script calls.\n\n**Output**: Authenticated session with valid token and confirmed API access\n\n---\n\n## Phase 2: Discover Tables\n\n**Goal**: Find the custom tables available in the user's Dataverse environment\n\n**Actions**:\n\n### Path A: Read `.datamodel-manifest.json` (Preferred)\n\nCheck 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.\n\nSee `${PLUGIN_ROOT}\u002Freferences\u002Fdatamodel-manifest-schema.md` for the full manifest schema.\n\n### Path B: Query OData API (Fallback)\n\nIf no manifest exists, discover custom tables via OData:\n\n```\nnode \"${PLUGIN_ROOT}\u002Fscripts\u002Fdataverse-request.js\" \u003CenvUrl> GET \"EntityDefinitions?\\$select=LogicalName,DisplayName,EntitySetName&\\$filter=IsCustomEntity eq true\"\n```\n\nFor each discovered table, fetch its custom columns:\n\n```\nnode \"${PLUGIN_ROOT}\u002Fscripts\u002Fdataverse-request.js\" \u003CenvUrl> GET \"EntityDefinitions(LogicalName='\u003Ctable>')\u002FAttributes?\\$select=LogicalName,DisplayName,AttributeType,RequiredLevel&\\$filter=IsCustomAttribute eq true\"\n```\n\n### 2.1 Present Available Tables\n\nShow the user the list of discovered tables with their columns so they can choose which to populate.\n\n**Output**: List of discovered tables with their columns presented to the user\n\n---\n\n## Phase 3: Select Tables & Configure\n\n**Goal**: Gather user preferences on which tables to populate and how many records to create\n\n**Actions**:\n\n### 3.1 Select Tables\n\n\u003C!-- gate: add-sample-data:3.1.tables | category=plan | cancel-leaves=nothing -->\n\n> ? **Gate (plan · add-sample-data:3.1.tables):** Multi-select over discovered tables — decides which tables get populated with sample data.\n>\n> **Trigger:** Phase 2 discovery completed.\n> **Why we ask:** Auto-selecting all tables can pollute production-shape tables (e.g. `contact`) with throwaway records.\n> **Cancel leaves:** Nothing — no record inserts yet.\n\nUse `AskUserQuestion` to ask which tables they want to populate (use `multiSelect: true`). List all discovered tables as options.\n\n### 3.2 Select Record Count\n\n\u003C!-- gate: add-sample-data:3.2.count | category=plan | cancel-leaves=nothing -->\n\n> ? **Gate (plan · add-sample-data:3.2.count):** Pick records-per-table (5 \u002F 10 \u002F 25 \u002F Custom). Custom branch is a follow-up free-text prompt under the same gate.\n>\n> **Trigger:** Tables selected in 3.1.\n> **Why we ask:** Inserting hundreds of records can blow past Dataverse storage \u002F API throttling budgets.\n> **Cancel leaves:** Nothing — no record inserts yet.\n\nUse `AskUserQuestion` to ask how many sample records per table:\n\n| Option | Description |\n|--------|-------------|\n| **5 records** | Quick test -- just enough to verify the setup |\n| **10 records** | Light demo data for basic testing |\n| **25 records** | Fuller dataset for realistic demos |\n| **Custom** | Let the user specify a number |\n\n### 3.3 Determine Insertion Order\n\nAnalyze relationships between selected tables. Parent\u002Freferenced tables must be inserted first so their IDs are available for child\u002Freferencing table lookups.\n\nBuild the insertion order:\n\n1. Tables with no lookup dependencies (parent tables) -- insert first\n2. Tables that reference already-inserted tables -- insert next\n3. Continue until all tables are ordered\n\n**Output**: Confirmed table selection, record count, and insertion order\n\n---\n\n## Phase 4: Generate & Review Sample Data\n\n**Goal**: Generate contextually appropriate sample records and get user approval before inserting\n\n**Actions**:\n\n### 4.1 Generate Contextual Sample Data\n\nFor each selected table, generate sample records with contextually appropriate values based on column names and types:\n\n- **String columns**: Generate realistic values matching the column name (e.g., \"Email\" -> `jane.doe@example.com`, \"Phone\" -> `(555) 123-4567`, \"Name\" -> realistic names)\n- **Memo columns**: Generate short descriptive text relevant to the column name\n- **Integer\u002FDecimal\u002FCurrency columns**: Generate reasonable numeric values\n- **DateTime columns**: Generate dates within a sensible range (past year to next month)\n- **Boolean columns**: Mix of `true` and `false` values\n- **Picklist\u002FChoice columns**: Query valid options first (see references\u002Fodata-record-patterns.md), then use actual option values\n- **Lookup columns**: Reference records from parent tables that will be\u002Fwere already inserted\n\n### 4.2 Present Sample Data Preview\n\nFor each table, show a markdown table previewing the sample records directly in the conversation:\n\n```markdown\n### Project (cr123_project) -- 5 records\n\n| Name | Description | Status | Start Date |\n|------|-------------|--------|------------|\n| Website Redesign | Modernize the corporate website | 100000000 (Active) | 2025-03-15 |\n| Mobile App | Build iOS and Android app | 100000001 (Planning) | 2025-04-01 |\n| ... | ... | ... | ... |\n```\n\nShow relationship handling: which lookup fields reference which parent table records.\n\n**Output**: Sample data plan ready for insertion. Proceed directly to Phase 5.\n\n---\n\n## Phase 5: Insert Sample Data\n\n**Goal**: Execute OData POST calls to create all approved sample records with correct relationship handling\n\n**Actions**:\n\nRefer to `references\u002Fodata-record-patterns.md` for full patterns.\n\n### 5.1 Get Entity Set Names\n\nFor each table, get the entity set name (needed for the API URL):\n\n```\nnode \"${PLUGIN_ROOT}\u002Fscripts\u002Fdataverse-request.js\" \u003CenvUrl> GET \"EntityDefinitions(LogicalName='\u003Ctable>')?\\$select=EntitySetName\"\n```\n\n### 5.2 Get Picklist Options\n\nFor any picklist\u002Fchoice columns, query valid option values before insertion:\n\n```\nnode \"${PLUGIN_ROOT}\u002Fscripts\u002Fdataverse-request.js\" \u003CenvUrl> GET \"EntityDefinitions(LogicalName='\u003Ctable>')\u002FAttributes(LogicalName='\u003Ccolumn>')\u002FMicrosoft.Dynamics.CRM.PicklistAttributeMetadata?\\$expand=OptionSet\"\n```\n\nUse the actual `Value` integers from the option set in your sample data.\n\n### 5.3 Insert Parent Tables First\n\nInsert records into parent\u002Freferenced tables first to capture their IDs:\n\n```\nnode \"${PLUGIN_ROOT}\u002Fscripts\u002Fdataverse-request.js\" \u003CenvUrl> POST \"\u003CEntitySetName>\" --body '{\"cr123_name\":\"Sample Record\",\"cr123_description\":\"A sample record for testing\"}' --include-headers\n```\n\nThe `--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.\n\nStore parent record IDs for use in child table lookups.\n\n### 5.4 Insert Child Tables with Lookups\n\nFor child\u002Freferencing tables, use `@odata.bind` syntax to set lookup fields:\n\n```\nnode \"${PLUGIN_ROOT}\u002Fscripts\u002Fdataverse-request.js\" \u003CenvUrl> POST \"\u003CChildEntitySetName>\" --body '{\"cr123_name\":\"Child Record\",\"cr123_ParentId@odata.bind\":\"\u002F\u003CParentEntitySetName>(\u003Cparent_guid>)\"}' --include-headers\n```\n\n### 5.5 Track Progress\n\nTrack each insertion attempt:\n\n- Record table name, record number, success\u002Ffailure\n- On failure, log the error message but continue with remaining records\n- Do NOT attempt automated rollback on failure\n\n### 5.6 Refresh Token Periodically\n\nThe `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:\n\n```\nnode \"${PLUGIN_ROOT}\u002Fscripts\u002Fverify-dataverse-access.js\" \u003CenvUrl>\n```\n\n**Output**: All approved records inserted with parent-child relationships established\n\n---\n\n## Phase 6: Verify & Summarize\n\n**Goal**: Confirm record counts and present a final summary to the user\n\n**Actions**:\n\n### 6.1 Verify Record Counts\n\nFor each table that was populated, query the record count:\n\n```\nnode \"${PLUGIN_ROOT}\u002Fscripts\u002Fdataverse-request.js\" \u003CenvUrl> GET \"\u003CEntitySetName>?\\$count=true&\\$top=0\"\n```\n\nThe `@odata.count` field in the response gives the total record count.\n\n### 6.2 Record Skill Usage\n\n> Reference: `${PLUGIN_ROOT}\u002Freferences\u002Fskill-tracking-reference.md`\n\nFollow the skill tracking instructions in the reference to record this skill's usage. Use `--skillName \"AddSampleData\"`.\n\n### 6.3 Present Summary\n\nPresent a summary table:\n\n| Table | Records Requested | Records Created | Failures |\n|-------|-------------------|-----------------|----------|\n| `cr123_project` (Project) | 10 | 10 | 0 |\n| `cr123_task` (Task) | 10 | 9 | 1 |\n\nInclude:\n\n- Total records created across all tables\n- Any failures with error details\n- Lookup relationships that were established\n\n### 6.4 Suggest Next Steps\n\nAfter the summary, suggest:\n\n- Review the data in the Power Pages maker portal or model-driven app\n- If the site is not yet built: `\u002Fcreate-site`\n- If the site is ready to deploy: `\u002Fdeploy-site`\n\n**Output**: Verified record counts and summary presented to the user\n\n---\n\n## Important Notes\n\n### Throughout All Phases\n\n- **Use TaskCreate\u002FTaskUpdate** to track progress at every phase\n- **Ask for user confirmation** at key decision points (see list below)\n- **Respect insertion order** -- always insert parent tables before child tables\n- **Fail gracefully** -- log errors and continue, never rollback automatically\n- **Refresh tokens** every 20 records to avoid expiration\n\n### Key Decision Points (Wait for User)\n\n1. After Phase 2: Confirm which tables to populate\n2. After Phase 3: Confirm record count and insertion order\n3. After Phase 6: Review summary and decide next steps\n\n### Progress Tracking\n\nBefore starting Phase 1, create a task list with all phases using `TaskCreate`:\n\n| Task subject | activeForm | Description |\n|-------------|------------|-------------|\n| Verify prerequisites | Verifying prerequisites | Confirm PAC CLI auth, acquire Azure CLI token, verify API access |\n| Discover tables | Discovering tables | Read .datamodel-manifest.json or query OData API for custom tables |\n| Select tables and configure | Configuring tables | User picks tables, record count, and determine insertion order |\n| Generate and review sample data | Generating sample data | Generate contextual sample records, present preview, get user approval |\n| Insert sample data | Inserting records | Execute OData POST calls with relationship handling and token refresh |\n| Verify and summarize | Verifying results | Confirm record counts, present summary, suggest next steps |\n\nMark 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.\n\n---\n\n**Begin with Phase 1: Verify Prerequisites**\n",{"name":5,"model":39,"description":7,"allowed-tools":60,"user-invocable":61},"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",true,"main","0a55a88fa2855404029d1e5450faf92878baf763","plugins\u002Fpower-pages\u002Fskills\u002Fadd-sample-data",228,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fpower-platform-skills","https:\u002F\u002Fmicrosoft.github.io\u002Fpower-platform-skills\u002F","https:\u002F\u002Fgithub.com\u002Fmicrosoft","https:\u002F\u002Fopensource.microsoft.com","Open source projects and samples from Microsoft","2026-11-12 02:16:25",{"source":8,"skillName":5,"commands":73,"prompt":83,"zipAvailable":61},[74,77,80],{"tool":75,"command":76},"npx","npx skills add microsoft\u002Fpower-platform-skills --skill add-sample-data",{"tool":78,"command":79},"bunx","bunx skills add microsoft\u002Fpower-platform-skills --skill add-sample-data",{"tool":81,"command":82},"pnpm","pnpm dlx skills add microsoft\u002Fpower-platform-skills --skill add-sample-data","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fpower-platform-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fpower-pages\u002Fskills\u002Fadd-sample-data\u002FSKILL.md",[85],{"path":86,"resourceType":87,"resourceTypeDesc":88,"sizeBytes":89,"sourceHtmlUrl":90},"references\u002Fodata-record-patterns.md","REFERENCE","参考文档",6483,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fpower-platform-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fpower-pages\u002Fskills\u002Fadd-sample-data\u002Freferences\u002Fodata-record-patterns.md",[92,111,132,150,164,174],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":55},"01M699WVHX0XN59EPBTTPEKYPG","setup","Use when Process Intelligence needs building, explicit cloud\u002Faccount\u002Fenvironment configuration, sign-in, connection diagnostics, or recovery from an authentication error.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fpower-platform-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fprocess-intelligence\u002Fskills\u002Fsetup\u002FSKILL.md",[],[94,44,36,99,100,101,102,103,104,105,106,107,108,109,110,45],"connection","error","sign","intelligence","configuration","use","process","diagnostics","environment","authentication","cloud","recovery",{"skillNo":112,"name":113,"nameZh":6,"description":114,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":115,"categories":116,"keywords":120,"publishedAt":55},"01M699WSR9EX55YY1WD9J22FEG","report-issue","Use when the user wants a Process Intelligence bug-report draft or support summary for a failed operation.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fpower-platform-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fprocess-intelligence\u002Fskills\u002Freport-issue\u002FSKILL.md",[117],{"categoryNo":118,"categoryName":119,"taxonomyType":29,"taxonomyTypeDesc":30},"01JBSEEDCAT000000000000034","行政与办公人员",[121,122,123,124,125,105,104,126,127,102,128,129,130,36,131],"report issue","report","issue","support","user","bug","summary","draft","operation","for","bug-report",{"skillNo":133,"name":134,"nameZh":6,"description":135,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":136,"categories":137,"keywords":138,"publishedAt":55},"01M699WR26YQ9Q21KE6MJF5B2G","investigate-process","Use when a broad Process Mining business question, observed pattern or competing explanation needs investigation across analytical perspectives.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fpower-platform-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fprocess-intelligence\u002Fskills\u002Finvestigate-process\u002FSKILL.md",[],[105,139,140,141,36,142,143,144,145,44,146,104,147,148,149],"investigate","investigate process","mining","process mining","investigation","perspectives","question","business","pattern","across","analytical",{"skillNo":151,"name":152,"nameZh":6,"description":153,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":154,"categories":155,"keywords":156,"publishedAt":55},"01M699WP9SDG5ZR12P8VYNXKTN","derive-metric","Use when a requested measure is missing, a saved custom metric needs reuse, or an ephemeral formula or derived scalar is needed.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fpower-platform-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fprocess-intelligence\u002Fskills\u002Fderive-metric\u002FSKILL.md",[],[157,158,44,104,159,160,161,162,163,36],"metric","derive metric","formula","missing","reuse","saved","custom",{"skillNo":165,"name":166,"nameZh":6,"description":167,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":168,"categories":169,"keywords":170,"publishedAt":55},"01M699WMG5R8P6SMTDAS1TKF9E","compare-cohorts","Use when comparing process cohorts, departments, periods or before-and-after results under matched definitions.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fpower-platform-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fprocess-intelligence\u002Fskills\u002Fcompare-cohorts\u002FSKILL.md",[],[171,172,36,104,105,173,44],"compare","compare cohorts","results",{"skillNo":175,"name":176,"nameZh":6,"description":177,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":178,"categories":179,"keywords":180,"publishedAt":55},"01M699WJWNVTMP9XK3NCJHV14D","analyze-variants","Use when investigating common or slow variants, repeated work, unusual paths, or a specific Process Mining case.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fpower-platform-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fprocess-intelligence\u002Fskills\u002Fanalyze-variants\u002FSKILL.md",[],[181,182,183,142,36,141,184,185,104,105,44,186,187],"analyze","variants","analyze variants","case","paths","work","common"]