askill
dataverse-entity-generator

dataverse-entity-generatorSafety 95Repository

Generates Microsoft Power Platform compliant Entity.xml files from table specifications. Uses proven v6.0 structural patterns to prevent import failures. Supports eap_, mpa_, ca_ prefixes. Triggers: "generate entity", "create dataverse table", "new entity xml", "add table to solution".

1 stars
1.2k downloads
Updated 3/19/2026

Package Files

Loading files...
SKILL.md

Dataverse Entity Generator

Generates structurally compliant Entity.xml files for Microsoft Power Platform solutions, using battle-tested patterns from the working v6.0 solution baseline.

CRITICAL: Why This Skill Exists

Custom Entity.xml files created from scratch frequently fail Microsoft import due to:

  • Missing LocalizedNames / LocalizedCollectionNames elements
  • PrimaryNameAttribute set on system fields instead of proper string fields
  • Missing required system fields (CreatedOn, ModifiedOn, etc.)
  • Wrong attribute ordering or missing flags (IsValidForCreate, etc.)
  • DateTime fields with invalid Format specifications

This skill prevents ALL of these by generating from a known-good template.


Workflow

  1. Receive table specification (JSON schema, natural language, or column list)
  2. Validate inputs against naming conventions and Dataverse constraints
  3. Generate Entity.xml using v6.0-compliant template structure
  4. Generate supporting files (Entity.xml, FormXml, SavedQueries if requested)
  5. Validate output against CMAP validation rules before delivery

Input Specification

Accept any of these formats:

Option A: JSON Schema (preferred)

{
  "schema_name": "eap_agents",
  "display_name": "Agent",
  "display_collection_name": "Agents",
  "description": "Registered AI agents in the platform",
  "prefix": "eap",
  "primary_name_field": "agent_name",
  "columns": [
    { "name": "agent_name", "type": "nvarchar", "length": 200, "required": true, "description": "Agent display name" },
    { "name": "agent_code", "type": "nvarchar", "length": 50, "required": true, "description": "Unique agent code" },
    { "name": "agent_type", "type": "picklist", "option_set": "eap_agent_type", "required": true },
    { "name": "is_active", "type": "bit", "default": true, "required": true },
    { "name": "config_json", "type": "ntext", "description": "JSON configuration" }
  ]
}

Option B: Natural Language

"Create a table called eap_agents with columns for agent_name (text, required), agent_code (text, required, unique), agent_type (choice), is_active (yes/no), and config_json (multiline text)"

Option C: Column List

Just a list of column names and types - the skill infers the rest.


Naming Convention Enforcement

ElementRuleExampleError if Violated
Schema name{prefix}_{lowercase}eap_agentsDV001
Column names{prefix}_{lowercase_underscores}eap_agent_nameDV002
Publisher prefixeap_, mpa_, ca_-DV003
Display nameSingular form"Agent" not "Agents"DV004
Boolean columnsIs or Has prefixis_active, has_childrenDV005
Primary key{table}ideap_agentidDV006
Lookups_id suffix on schemaeap_clientidDV007
Primary nameMust be nvarchar typeagent_nameDV073

Entity.xml Template (v6.0-Compliant)

This is the EXACT structure that passes Microsoft import. Do not deviate.

<Entity Name="{schema_name}" LocalizedName="{display_name}" OriginalName="{schema_name}">
  <EntityInfo>
    <entity Name="{schema_name}">
      <LocalizedNames>
        <LocalizedName description="{display_name}" languagecode="1033" />
      </LocalizedNames>
      <LocalizedCollectionNames>
        <LocalizedCollectionName description="{display_collection_name}" languagecode="1033" />
      </LocalizedCollectionNames>
      <Descriptions>
        <Description description="{description}" languagecode="1033" />
      </Descriptions>
      <attributes>
        <!-- Primary Key (auto-generated) -->
        <attribute PhysicalName="{schema_name}Id">
          <Type>primarykey</Type>
          <Name>{schema_name}id</Name>
          <LogicalName>{schema_name}id</LogicalName>
          <RequiredLevel>systemrequired</RequiredLevel>
          <DisplayMask>ValidForAdvancedFind|ValidForForm|ValidForGrid</DisplayMask>
          <ImeMode>auto</ImeMode>
          <IsCustomField>0</IsCustomField>
          <IsAuditEnabled>1</IsAuditEnabled>
          <IsSecured>0</IsSecured>
          <IsCustomizable>1</IsCustomizable>
          <IsRenameable>1</IsRenameable>
          <CanModifySearchSettings>1</CanModifySearchSettings>
          <CanModifyRequirementLevelSettings>0</CanModifyRequirementLevelSettings>
          <CanModifyAdditionalSettings>0</CanModifyAdditionalSettings>
          <IsLogical>0</IsLogical>
          <IsValidForCreate>0</IsValidForCreate>
          <IsValidForRead>1</IsValidForRead>
          <IsValidForUpdate>0</IsValidForUpdate>
          <displaynames>
            <displayname description="{display_name}" languagecode="1033" />
          </displaynames>
          <Descriptions>
            <Description description="Unique identifier" languagecode="1033" />
          </Descriptions>
        </attribute>

        <!-- Primary Name Field (MUST be nvarchar, MUST have IsPrimaryName=1) -->
        <attribute PhysicalName="{primary_name_physical}">
          <Type>nvarchar</Type>
          <Name>{primary_name_logical}</Name>
          <LogicalName>{primary_name_logical}</LogicalName>
          <Length>{primary_name_length}</Length>
          <RequiredLevel>{primary_name_required}</RequiredLevel>
          <DisplayMask>ValidForAdvancedFind|ValidForForm|ValidForGrid</DisplayMask>
          <ImeMode>auto</ImeMode>
          <IsCustomField>1</IsCustomField>
          <IsAuditEnabled>1</IsAuditEnabled>
          <IsSecured>0</IsSecured>
          <IsCustomizable>1</IsCustomizable>
          <IsRenameable>1</IsRenameable>
          <IsPrimaryName>1</IsPrimaryName>
          <CanModifySearchSettings>1</CanModifySearchSettings>
          <CanModifyRequirementLevelSettings>1</CanModifyRequirementLevelSettings>
          <CanModifyAdditionalSettings>1</CanModifyAdditionalSettings>
          <IsLogical>0</IsLogical>
          <IsValidForCreate>1</IsValidForCreate>
          <IsValidForRead>1</IsValidForRead>
          <IsValidForUpdate>1</IsValidForUpdate>
          <displaynames>
            <displayname description="{primary_name_display}" languagecode="1033" />
          </displaynames>
          <Descriptions>
            <Description description="Primary name field" languagecode="1033" />
          </Descriptions>
        </attribute>

        <!-- SYSTEM FIELDS (required for all entities) -->
        <!-- CreatedOn: NO Format element, NO IsPrimaryName -->
        <attribute PhysicalName="CreatedOn">
          <Type>datetime</Type>
          <Name>createdon</Name>
          <LogicalName>createdon</LogicalName>
          <RequiredLevel>none</RequiredLevel>
          <DisplayMask>ValidForAdvancedFind|ValidForForm|ValidForGrid</DisplayMask>
          <ImeMode>inactive</ImeMode>
          <DateTimeBehavior>UserLocal</DateTimeBehavior>
          <CanChangeDateTimeBehavior>0</CanChangeDateTimeBehavior>
          <IsCustomField>0</IsCustomField>
          <IsAuditEnabled>1</IsAuditEnabled>
          <IsSecured>0</IsSecured>
          <IsCustomizable>1</IsCustomizable>
          <IsRenameable>1</IsRenameable>
          <CanModifySearchSettings>1</CanModifySearchSettings>
          <CanModifyRequirementLevelSettings>0</CanModifyRequirementLevelSettings>
          <CanModifyAdditionalSettings>0</CanModifyAdditionalSettings>
          <IsLogical>0</IsLogical>
          <IsValidForCreate>0</IsValidForCreate>
          <IsValidForRead>1</IsValidForRead>
          <IsValidForUpdate>0</IsValidForUpdate>
          <displaynames>
            <displayname description="Created On" languagecode="1033" />
          </displaynames>
          <Descriptions>
            <Description description="Date and time the record was created" languagecode="1033" />
          </Descriptions>
        </attribute>

        <!-- ModifiedOn: same pattern as CreatedOn -->
        <attribute PhysicalName="ModifiedOn">
          <Type>datetime</Type>
          <Name>modifiedon</Name>
          <LogicalName>modifiedon</LogicalName>
          <RequiredLevel>none</RequiredLevel>
          <DisplayMask>ValidForAdvancedFind|ValidForForm|ValidForGrid</DisplayMask>
          <ImeMode>inactive</ImeMode>
          <DateTimeBehavior>UserLocal</DateTimeBehavior>
          <CanChangeDateTimeBehavior>0</CanChangeDateTimeBehavior>
          <IsCustomField>0</IsCustomField>
          <IsAuditEnabled>1</IsAuditEnabled>
          <IsSecured>0</IsSecured>
          <IsCustomizable>1</IsCustomizable>
          <IsRenameable>1</IsRenameable>
          <CanModifySearchSettings>1</CanModifySearchSettings>
          <CanModifyRequirementLevelSettings>0</CanModifyRequirementLevelSettings>
          <CanModifyAdditionalSettings>0</CanModifyAdditionalSettings>
          <IsLogical>0</IsLogical>
          <IsValidForCreate>0</IsValidForCreate>
          <IsValidForRead>1</IsValidForRead>
          <IsValidForUpdate>0</IsValidForUpdate>
          <displaynames>
            <displayname description="Modified On" languagecode="1033" />
          </displaynames>
          <Descriptions>
            <Description description="Date and time the record was modified" languagecode="1033" />
          </Descriptions>
        </attribute>

        <!-- StatusCode and StateCode follow same pattern -->

        <!-- CUSTOM FIELDS inserted here following the same attribute structure -->
      </attributes>
      <EntitySetName>{schema_name}s</EntitySetName>
      <IsDuplicateCheckSupported>0</IsDuplicateCheckSupported>
      <IsBusinessProcessEnabled>0</IsBusinessProcessEnabled>
      <IsRequiredOffline>0</IsRequiredOffline>
      <IsInteractionCentricEnabled>0</IsInteractionCentricEnabled>
      <IsCollaboration>0</IsCollaboration>
      <AutoRouteToOwnerQueue>0</AutoRouteToOwnerQueue>
      <OwnershipTypeMask>UserOwned</OwnershipTypeMask>
      <IsAuditEnabled>1</IsAuditEnabled>
      <IsActivity>0</IsActivity>
      <IsActivityParty>0</IsActivityParty>
      <IsAvailableOffline>1</IsAvailableOffline>
      <IsChildEntity>0</IsChildEntity>
      <IsCustomEntity>1</IsCustomEntity>
      <HasNotes>1</HasNotes>
      <HasActivities>0</HasActivities>
      <AutoCreateAccessTeams>0</AutoCreateAccessTeams>
      <EntityColor>#0078D4</EntityColor>
      <PrimaryNameAttribute>{primary_name_logical}</PrimaryNameAttribute>
      <PrimaryIdAttribute>{schema_name}id</PrimaryIdAttribute>
    </entity>
  </EntityInfo>
</Entity>

Custom Column Type Templates

nvarchar (Single Line of Text)

<attribute PhysicalName="{physical_name}">
  <Type>nvarchar</Type>
  <Name>{logical_name}</Name>
  <LogicalName>{logical_name}</LogicalName>
  <Length>{max_length}</Length>
  <RequiredLevel>{required_level}</RequiredLevel>
  <DisplayMask>ValidForAdvancedFind|ValidForForm|ValidForGrid</DisplayMask>
  <ImeMode>auto</ImeMode>
  <IsCustomField>1</IsCustomField>
  <IsAuditEnabled>1</IsAuditEnabled>
  <IsSecured>0</IsSecured>
  <IsCustomizable>1</IsCustomizable>
  <IsRenameable>1</IsRenameable>
  <CanModifySearchSettings>1</CanModifySearchSettings>
  <CanModifyRequirementLevelSettings>1</CanModifyRequirementLevelSettings>
  <CanModifyAdditionalSettings>1</CanModifyAdditionalSettings>
  <IsLogical>0</IsLogical>
  <IsValidForCreate>1</IsValidForCreate>
  <IsValidForRead>1</IsValidForRead>
  <IsValidForUpdate>1</IsValidForUpdate>
  <displaynames>
    <displayname description="{display_name}" languagecode="1033" />
  </displaynames>
  <Descriptions>
    <Description description="{description}" languagecode="1033" />
  </Descriptions>
</attribute>

ntext (Multiple Lines of Text)

Same as nvarchar but: <Type>ntext</Type>, no Length element, add <Format>TextArea</Format>

int (Whole Number)

<Type>int</Type>
<MinValue>-2147483648</MinValue>
<MaxValue>2147483647</MaxValue>

decimal

<Type>decimal</Type>
<MinValue>-100000000000</MinValue>
<MaxValue>100000000000</MaxValue>
<Precision>2</Precision>

money (Currency)

<Type>money</Type>
<MinValue>-922337203685477</MinValue>
<MaxValue>922337203685477</MaxValue>
<Precision>4</Precision>
<ImeMode>disabled</ImeMode>

bit (Yes/No)

<Type>bit</Type>
<OptionSetName>{schema_name}_{column_name}</OptionSetName>
<DefaultValue>{0_or_1}</DefaultValue>

datetime

<Type>datetime</Type>
<DateTimeBehavior>UserLocal</DateTimeBehavior>
<CanChangeDateTimeBehavior>1</CanChangeDateTimeBehavior>
<Format>DateAndTime</Format>

CRITICAL: Format must be DateAndTime or DateOnly (PascalCase). Never dateandtime.

picklist (Choice)

<Type>picklist</Type>
<OptionSetName>{option_set_name}</OptionSetName>

Option values must be in range 100000001-100000999.

lookup (Foreign Key)

<Type>lookup</Type>
<LookupTypes>
  <LookupType id="00000000-0000-0000-0000-000000000000">{target_entity}</LookupType>
</LookupTypes>

Validation Checklist (run before delivery)

Every generated Entity.xml must pass ALL of these:

#CheckError Code
1Schema name uses correct prefix (eap_, mpa_, ca_)DV003
2Display name is singularDV004
3PrimaryNameAttribute points to an nvarchar fieldDV073
4PrimaryNameAttribute field has IsPrimaryName=1DV009
5NO system field has IsPrimaryName=1DV073
6System datetime fields have NO Format element(import fail)
7Custom datetime fields use PascalCase Format(import fail)
8Entity has LocalizedNames elementDV071
9Entity has LocalizedCollectionNames elementDV070
10Name element has LocalizedName and OriginalName attributesDV070
11All boolean columns use Is/Has prefixDV005
12Primary key column ends with IdDV006
13Option set values in range 100000001-100000999DV010
14All GUIDs are lowercase, no bracesGU002, GU004

Usage

User: Generate entity for eap_agents with columns: agent_name (text, required), 
      agent_code (text, required), agent_type (choice), is_active (yes/no), config_json (multiline)

Claude: [reads this SKILL.md]
        [generates complete Entity.xml using v6.0 template]
        [validates against all 14 checks]
        [delivers compliant Entity.xml]

Install

Download ZIP
Requires askill CLI v1.0+

AI Quality Score

84/100Analyzed 2/23/2026

Highly detailed and actionable skill for generating Microsoft Power Platform compliant Entity.xml files. Contains comprehensive templates, naming conventions, and validation rules. The content is well-structured with clear examples for multiple input formats. Slight deduction for internal-only path indicator (.codex folder), but the technical content is production-quality and would be valuable as a reference. Tags are somewhat generic for the specific functionality (api, github-actions, llm don't fully capture Dataverse/Power Platform focus).

95
90
70
88
92

Metadata

Licenseunknown
Version-
Updated3/19/2026
Publisherkevcofett

Tags

apigithub-actionsllm