Agent skill

Mdl Entities

by mendixlabs in mendixlabs/mxcli

Complete syntax reference for entities, attributes and associations — every entity kind, attribute type, and association form.

Apache-2.0Auto-check passed

Install Mdl Entities

skills CLI
$ npx skills add mendixlabs/mxcli --skill mdl-entities -a claude-code

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

GitHub CLI
$ gh skill install mendixlabs/mxcli mdl-entities --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/mendixlabs/mxcli.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/mendix/mdl-entities .claude/skills/mdl-entities && 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
mdl-entities
GitHub stars
128
Token cost
~2.7k tokens
SKILL.md length
560 words
Files
1
Skills in repo
72
Repo updated
First seen
Licence
Apache-2.0

At a glance

Complete syntax reference for entities, attributes and associations — every entity kind, attribute type, and association form.

  • Altering a domain model and the exact spelling matters
  • SKILL.md covers Entity Types, Persistent Entity, Non-Persistent Entity and Attribute Types, plus 9 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Mdl Entities is an agent skill from mendixlabs/mxcli. Complete syntax reference for entities, attributes and associations — every entity kind, attribute type, and association form. Use when writing or altering a domain model and the exact spelling matters.

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

The repository describes itself as: Mendix cli tool, a headless way to work with Mendix projects. Enables Mendix projects for use with 3rd party agentic coding tools like Claude Code and Copilot. Includes a… The licence is Apache-2.0.

When your agent uses it

  • Altering a domain model and the exact spelling matters

Example prompts

  • “/mdl-entities”

What it can do on your machine

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

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are mdl).

    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

Mdl Entities loads about 2.7k tokens when it runs. Until then it costs about 54 tokens; SKILL.md has 560 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~54
When it runs · the whole SKILL.md, loaded when a task matches
~2.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 passed

The automated check found no risky patterns in SKILL.md.

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 mendixlabs/mxcli at commit 20a6c89, republished under its Apache-2.0 licence (© mendixlabs). 560 words, ~2,658 tokens.

Download SKILL.mdSave it as .claude/skills/mdl-entities/SKILL.md (or your agent's skills folder).
name
mdl-entities
description
Complete syntax reference for entities, attributes and associations — every entity kind, attribute type, and association form. Use when writing or altering a domain model and the exact spelling matters.

MDL Entity Syntax Reference

Complete syntax reference for creating entities, attributes, and associations.

Entity Types

TypeKeywordStored in DBUse Case
Persistentcreate persistent entityYesBusiness data
Non-Persistentcreate non-persistent entityNoTemporary/view data
Viewcreate view entityNo (OQL query)Aggregated/computed data

Persistent Entity

mdl
mdl 1;
/**
 * Customer entity for storing customer data
 */
create persistent entity Module.Customer (
  -- String attributes
  Name: string(100) not null,
  Email: string(200),
  Code: string(20) unique,

  -- Numeric attributes
  Age: integer,
  CreditLimit: decimal,

  -- Boolean
  IsActive: boolean default true,

  -- Date/Time
  BirthDate: datetime,   -- there is no date-only type; `date` is refused
  -- Use autocreateddate (not datetime) to record when the object was created.
  -- 'CreatedDate' as a plain datetime triggers lint error MDL020.
  CreatedDate: autocreateddate,

  -- Enumeration
  status: Module.CustomerStatus default Active,

  -- Auto-number (REQUIRES a seed via `default N` — without it the build fails
  -- CE7247 "Value cannot be empty")
  CustomerNumber: autonumber default 1
);

Non-Persistent Entity

Used for temporary data, form parameters, or calculated values.

mdl
mdl 1;
/**
 * Search parameters for customer search form
 */
create non-persistent entity Module.CustomerSearchParams (
  SearchName: string(100),
  SearchEmail: string(200),
  MinCreditLimit: decimal,
  IncludeInactive: boolean default false
);

Attribute Types

TypeSyntaxExample
StringName: string(length)Name: string(100)
IntegerName: integercount: integer
LongName: longBigNumber: long
DecimalName: decimalAmount: decimal
BooleanName: booleanIsActive: boolean
DateTimeName: datetimeCreatedAt: datetime
EnumerationName: Module.EnumNamestatus: Module.Status
AutoNumberName: autonumber default 1Code: autonumber default 1 (seed required)
BinaryName: binaryFileData: binary
Hashed StringName: hashedstringpassword: hashedstring

Attribute Modifiers

ModifierMeaningExample
not nullRequired fieldName: string(100) not null
uniqueUnique constraintCode: string(20) unique
default valueDefault valueIsActive: boolean default true

Note: Boolean attributes auto-default to false when no default is specified.

Generalization (Inheritance)

CRITICAL: EXTENDS goes BEFORE the opening parenthesis, not after!

mdl
mdl 1;
/**
 * Base entity
 */
create persistent entity Module.Person (
  PersonName: string(100) not null,
  Email: string(200)
);

/**
 * Customer extends Person - EXTENDS before (
 */
create persistent entity Module.Customer extends Module.Person (
  CustomerCode: string(20),
  CreditLimit: decimal
);

Common parent entities for file/image storage:

mdl
mdl 1;
-- Image entity (inherits Name, Size, Contents, thumbnail)
create persistent entity Module.ProductPhoto extends System.Image (
  PhotoCaption: string(200),
  SortOrder: integer default 0
);

-- File document (inherits Name, Size, Contents)
create persistent entity Module.Attachment extends System.FileDocument (
  AttachmentDescription: string(500)
);

Wrong (parse error):

mdl
-- EXTENDS after ) = parse error!
create persistent entity Module.Photo (
  PhotoCaption: string(200)
) extends System.Image;

Associations

Reference (Many-to-One)
mdl
mdl 1;
/**
 * Order belongs to one Customer
 */
create association Module.Order_Customer
from Module.Order to Module.Customer
type reference;

Direction: from the entity that holds the foreign key (the "many" / child side) to the entity being referenced (the "one" / parent side). Name convention is Child_Parent.

Reference Set (Many-to-Many)
mdl
mdl 1;
/**
 * Product can be in many Categories
 * Category can have many Products
 */
create association Module.Product_Category
from Module.Product to Module.Category
type ReferenceSet
owner both;
Association with Delete Behavior
mdl
mdl 1;
/**
 * Delete orders when their customer is deleted
 */
create association Module.Order_Customer
from Module.Order to Module.Customer
type reference
on delete cascade;

Delete behaviors (applied to the referenced to entity):

  • on delete cascade - delete the referencing objects too (cascade)
  • on delete set null - delete, nullify the reference (default)
  • on delete restrict - only delete when nothing references it

Enumerations

mdl
mdl 1;
/**
 * Order status values
 */
create enumeration Module.OrderStatus (
  Draft 'Draft',
  Pending 'Pending',
  Approved 'Approved',
  Shipped 'Shipped',
  Delivered 'Delivered',
  Cancelled 'Cancelled'
);

View Entity (OQL)

mdl
mdl 1;
/**
 * Monthly sales summary by customer
 */
create view entity Module.CustomerSalesSummary (
  CustomerName: string(100),
  TotalOrders: integer,
  TotalAmount: decimal,
  LastOrderDate: datetime
)
as
  select
    c.Name as CustomerName,
    count(o.OrderID) as TotalOrders,
    sum(o.Amount) as TotalAmount,
    max(o.OrderDate) as LastOrderDate
  from Module.Customer c
  left join c/Module.Order_Customer/Module.Order o
  GROUP by c.Name;

Derived string columns must be string(200). A plain pass-through column (c.Name as CustomerName) inherits its source attribute's length, so declaring string(100) above is fine. But a derived string column — cast(x as string), a string-returning CASE, or a string expression — is normalized by Mendix to the platform default length string(200). Declaring any other length (string(30), unlimited, …) passes mxcli check's parser but fails the MxBuild consistency check with CE6770 "View Entity is out of sync with the OQL Query." mxcli check catches this pre-build as MDL031 with a suggested fix:

mdl
mdl 1;
create view entity Module.TicketLabel (
  StatusLabel: string(200)          -- derived → must be 200, not string(30)
) as
  select cast(t.Status as string) as StatusLabel from Module.Ticket t;
Show full SKILL.md (219 more words)Show less

Entity with Index

mdl
mdl 1;
/**
 * Product with search index
 */
create persistent entity Module.Product (
  Code: string(20) not null,
  Name: string(100) not null,
  Category: string(50),
  Price: decimal
)
index (Code)
index (Category);

A Mendix index has no name — its columns, in order and direction, are its identity. A name is accepted (index idx_code on (Code)) but not stored, so check warns (MDL-IDX01), describe prints the index back as index (Code), and drop index idx_code cannot find it. Write indexes anonymously; drop one by its columns: alter entity Module.Product drop index (Code). Multi-column indexes list the columns in order: index (Row, Col desc).

Complete Domain Model Example

mdl
mdl 1;
-- Enumeration
create enumeration Shop.OrderStatus (
  Draft 'Draft',
  Confirmed 'Confirmed',
  Shipped 'Shipped',
  Delivered 'Delivered'
);

-- Customer entity
create persistent entity Shop.Customer (
  Name: string(100) not null,
  Email: string(200) not null unique,
  Phone: string(20),
  IsActive: boolean default true,
  CreatedDate: autocreateddate
);

-- Product entity
create persistent entity Shop.Product (
  Code: string(20) not null unique,
  Name: string(100) not null,
  description: string(500),
  Price: decimal not null,
  Stock: integer default 0,
  IsAvailable: boolean default true
);

-- Order entity
create persistent entity Shop.Order (
  OrderNumber: autonumber default 1,
  OrderDate: datetime not null,
  status: Shop.OrderStatus default Draft,
  TotalAmount: decimal,
  Notes: string(500)
);

-- Order line entity
create persistent entity Shop.OrderLine (
  Quantity: integer not null,
  UnitPrice: decimal not null,
  LineTotal: decimal
);

-- Associations
create association Shop.Order_Customer
from Shop.Order to Shop.Customer
type reference;

create association Shop.OrderLine_Order
from Shop.OrderLine to Shop.Order
type reference
on delete cascade;

create association Shop.OrderLine_Product
from Shop.OrderLine to Shop.Product
type reference;

Changing an Existing Domain Model

Choose the mode by who owns the entity (choose-edit-mode). An entity, association or enumeration authored in Studio Pro is changed with alter, not by re-running describe output:

mdl
mdl 1;
alter entity Shop.Order add attribute Note: string(200);
alter association Shop.Order_Customer set on delete set null;
alter enumeration Shop.OrderStatus add value Cancelled caption 'Cancelled';

Re-running create or modify from describe on a Studio Pro association has flipped its storage from table to column, which is a schema change. Run mxcli diff first: it runs the script on a scratch copy and lists every unit exec would write. Never drop and re-create an entity to change it: the new entity has a new identity, and the runtime drops the old table and its rows.

Quick Reference

Entity Creation
mdl
create persistent entity Module.Name (attributes);
create non-persistent entity Module.Name (attributes);
create view entity Module.Name (attributes) as select ...;
Attribute Syntax
mdl
attributename: type [(length)] [not null] [unique] [default value]
Association Syntax
mdl
create association Module.Child_Parent
from Module.ChildEntity to Module.ParentEntity
[type reference | ReferenceSet]
[owner default | both]
[storage column | table]
[on delete cascade | restrict | set null [error message '...']];

Every clause is optional; unstated means type Reference owner Default storage column on delete set null. describe prints only the clauses that differ, so a table association always shows storage table.

Enumeration Syntax
mdl
mdl 1;
create enumeration Module.Name (
  Value1 'Caption1',
  Value2 'Caption2'
);

-- Optionally place the enumeration in a module folder:
create enumeration Module.Currency (
  USD 'US Dollar',
  EUR 'Euro'
) FOLDER 'Shared';
-- Or move an existing one:  move enumeration Module.Currency to folder 'Shared';

© mendixlabs, Apache-2.0. 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 .claude/skills/mendix/mdl-entities of mendixlabs/mxcli.

Open the folder on GitHubat commit 20a6c89

Compare with similar skills

Mdl Entities 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.

Mdl Entities compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Mdl Entities this skillmendixlabs/mxcli128—~2.7kAutomated safety check: PassApache-2.0
Twenty Syncable Entity Cache and Transformtwentyhq/twenty58k—~2.4kAutomated safety check: PassCustom licence
Performance AttributionHKUDS/Vibe-Trading35k—~3.1kAutomated safety check: PassMIT
Twenty Syncable Entity Typestwentyhq/twenty58k—~2.8kAutomated safety check: PassCustom licence
Direction Attributethedaviddias/Front-End-Checklist74k—~534Automated safety check: PassMIT
Fetchpriority Attributethedaviddias/Front-End-Checklist74k—~535Automated safety check: PassMIT

Similar skills

  • Walks through step 2 of adding a syncable entity to the Twenty server: a cache service for flat entity maps and utilities that transform entities and DTOs into universal flat entities.

    58k GitHub stars~2.4k tokensUpdated today
    Backend & APIsAuto-check passed
  • Performance Attribution

    HKUDS/Vibe-Trading

    Explains why a portfolio beat or lagged its benchmark with Brinson sector attribution, factor alpha and beta decomposition, timing evaluation and benchmark comparison.

    35k GitHub stars~3.1k tokensUpdated today
    Business, Finance & HRAuto-check passed
  • Walks through the first of six steps for adding a syncable entity to Twenty's server: metadata name, TypeORM entity, flat types and central constants.

    58k GitHub stars~2.8k tokensUpdated today
    DevelopmentAuto-check passed
  • Direction Attribute

    thedaviddias/Front-End-Checklist

    A skill your agent uses when reviewing templates, rendered HTML, or shared components related to Set text direction for RTL languages.

    74k GitHub stars~534 tokensUpdated yesterday
    Auto-check passed
  • Fetchpriority Attribute

    thedaviddias/Front-End-Checklist

    A skill your agent uses when optimising Largest Contentful Paint (LCP), reducing render-blocking resource contention, or fine-tuning resource loading order in the critical rendering path.

    74k GitHub stars~535 tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed
  • Lang Attribute

    thedaviddias/Front-End-Checklist

    A skill your agent uses when applies to all HTML documents. An agent skill from thedaviddias/Front-End-Checklist.

    74k GitHub stars~995 tokensUpdated yesterday
    Frontend & DesignAuto-check passed

More from mendixlabs/mxcli

All 72 skills in this repo
  • Mendix Odata Pushdown

    mendixlabs/mxcli

    Push OData query options into the SQL of a Mendix resource served by a read microflow, so $filter, $orderby, $top, $skip, $count and the key lookup reach the database instead of being silently…

    128 GitHub stars~2.5k tokensUpdated today
    Auto-check passed
  • Mendix Vega Charts

    mendixlabs/mxcli

    Chart a Mendix app with Vega-Lite through a pluggable widget that takes the specification and the data as separate properties, so the model emits rows and never assembles a chart payload.

    128 GitHub stars~3k tokensUpdated today
    Auto-check passed
  • Agents

    mendixlabs/mxcli

    Author Mendix AI agent documents in MDL — Model, Knowledge Base, Consumed MCP Service and Agent, with variables, tools and multi-line prompts.

    128 GitHub starsUsed in 1 repo~2.2k tokens
    Auto-check passed
  • Mendix Bulk Oql Dml

    mendixlabs/mxcli

    Run set-based INSERT, UPDATE and DELETE against Mendix entities through OQL statements, which the runtime supports and Studio Pro cannot author.

    128 GitHub stars~1.4k tokensUpdated today
    Auto-check passed
  • Business Events

    mendixlabs/mxcli

    Define event-driven APIs over Kafka with Mendix business event services — publish and subscribe contracts, CREATE/DROP/DESCRIBE.

    128 GitHub starsUsed in 1 repo~1.3k tokens
    Auto-check passed
  • Catalog Search

    mendixlabs/mxcli

    Search the Mendix Catalog platform service registry (catalog.mendix.com) from the CLI to find services published across an organisation.

    128 GitHub starsUsed in 1 repo~1.4k tokens
    Auto-check passed

Questions about Mdl Entities

What does Mdl Entities do?

Complete syntax reference for entities, attributes and associations — every entity kind, attribute type, and association form. Mdl Entities is an agent skill from mendixlabs/mxcli. Complete syntax reference for entities, attributes and associations — every entity kind, attribute type, and association form.

When should I use Mdl Entities?

Mdl Entities fits situations like: altering a domain model and the exact spelling matters.

How do I install Mdl Entities in Claude Code?

Run `npx skills add mendixlabs/mxcli --skill mdl-entities -a claude-code`. Or copy the skill folder (.claude/skills/mendix/mdl-entities in mendixlabs/mxcli) into .claude/skills/mdl-entities in your project. Claude Code loads it when a task matches its description.

How do I install Mdl Entities in Codex?

Run `npx skills add mendixlabs/mxcli --skill mdl-entities -a codex`. Or copy the skill folder (.claude/skills/mendix/mdl-entities in mendixlabs/mxcli) into .agents/skills/mdl-entities in your project. Codex loads it when a task matches its description.

Can I use Mdl Entities 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 mendixlabs/mxcli --skill mdl-entities -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/mdl-entities, .gemini/skills/mdl-entities, .github/skills/mdl-entities and .opencode/skills/mdl-entities in your project.

What does Mdl Entities need to run?

SKILL.md names no scripts, command-line tools or credentials: Mdl Entities is instructions for the agent only.

Does Mdl Entities 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 Mdl Entities safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Mdl Entities use?

Mdl Entities is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Mdl Entities use?

About 2.7k 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 Mdl Entities?

Skills that share tags, products or a category with Mdl Entities: Twenty Syncable Entity Cache and Transform (twentyhq/twenty, 58k stars), Performance Attribution (HKUDS/Vibe-Trading, 35k stars), Twenty Syncable Entity Types (twentyhq/twenty, 58k stars) and Direction Attribute (thedaviddias/Front-End-Checklist, 74k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Mdl Entities?

mendixlabs (a GitHub organization) maintains it in mendixlabs/mxcli, which has 128 GitHub stars. The repository holds 72 skills in this directory. The repository was last updated on October 7, 2026.

Source: mendixlabs/mxcli on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.