cheatsheet-variables

A one-page syntax reference for declaring and assigning variables in MDL microflows, including basic values, dates, enumerations, entities, and lists.

In plain words
What is it for?
Use it while writing MDL microflows to check declaration syntax and examples for each supported variable type.
Why use it?
It helps avoid spelling and type mistakes when creating variables or fixing declaration errors.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/mendixlabs/mxcli/cheatsheet-variables
Any agent
npx skills add mendixlabs/mxcli --skill cheatsheet-variables
Clone the repo
git clone --depth 1 https://github.com/mendixlabs/mxcli

Made for: Claude Code, Codex.

Per session 50 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,247 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00050 $0.01247
Opus 5 $0.00025 $0.00624
Sonnet 5 $0.00010 $0.00249
Haiku 4.5 $0.00005 $0.00125

Measured yesterday against content hash e2e8315c8ecd, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

cheatsheet-variables scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/mendix/cheatsheet-variables/SKILL.md · 117 lines

How it starts

The opening of the file, as written. The whole thing — 117 lines — stays where its author put it; the contents beside it link to each section on GitHub.

MDL Variable Cheatsheet

Quick reference for variable declarations in MDL microflows.

Declaration Syntax

Type Syntax Example
String declare $name string = 'value'; declare $message string = '';
Integer declare $name integer = 0; declare $count integer = 0;
Boolean declare $name boolean = true; declare $IsValid boolean = true;
Decimal declare $name decimal = 0.0; declare $Amount decimal = 0;
DateTime declare $name datetime = [%CurrentDateTime%]; declare $Now datetime = [%CurrentDateTime%];
Enumeration declare $name Enumeration(Module.Enum) = Module.Enum.Value; declare $s Enumeration(Sales.Status) = Sales.Status.Open;
Object (Entity) Do not declare — use a parameter, retrieve, create, or loop iterator $Customer = create Sales.Customer (Name = $n);
List Do not declare — use a parameter, retrieve, or create list $Orders = create list of Sales.Order;

Key Rules

  1. Primitives (String/Integer/Long/Decimal/Boolean/DateTime/Enumeration): Use declare $var type = value; — these are the only types declare (a Create Variable activity) accepts.
  2. Objects (entities): Never declare an object. Mendix forbids the Create Variable activity from holding an object (CE0053/CE0038, plus CE7247 on a later set; flagged as MDL043 by mxcli check) — bare or initialized. Get the object from a microflow parameter, a retrieve … limit 1, $var = create Module.Entity(...), or a loop iterator. There is no "empty object variable" and no aliasing activity — reuse the variable you already have.
  3. Lists: Never declare a list — same Create Variable restriction (CE0053/CE0038, flagged as MDL040). Get the list from a microflow parameter, a retrieve, or $var = create list of Module.Entity;
  4. SET requires DECLARE: Always declare primitive variables before using SET.
  5. Parameters are pre-declared: Microflow parameters don't need DECLARE (and a parameter may be an object/list type — that restriction is only on declare).

Read the full file on GitHub · 117 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 117 lines · 50 tokens per session scan A e2e8315c8ecd

Subscribe to this mod's changes

cheatsheet-variables is a skill published in the GitHub repository mendixlabs/mxcli (115 stars, last pushed 2d ago), licensed Apache-2.0. It adds 50 tokens to every session and 1,247 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.