Agent skill

Cheatsheet Errors

by mendixlabs in mendixlabs/mxcli

Quick fixes for the MDL syntax errors that come up most: undeclared variables, wrong retrieve source, list operations, expression mistakes.

Apache-2.0Auto-check passed

Install Cheatsheet Errors

skills CLI
$ npx skills add mendixlabs/mxcli --skill cheatsheet-errors -a claude-code

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

GitHub CLI
$ gh skill install mendixlabs/mxcli cheatsheet-errors --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/cheatsheet-errors .claude/skills/cheatsheet-errors && 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
cheatsheet-errors
GitHub stars
128
Token cost
~2.3k tokens
SKILL.md length
888 words
Files
1
Skills in repo
72
Repo updated
First seen
Licence
Apache-2.0

At a glance

Quick fixes for the MDL syntax errors that come up most: undeclared variables, wrong retrieve source, list operations, expression mistakes.

  • Works in 2 steps: Check entity exists: list entities in… → Use fully qualified name:…
  • Mxcli check reports an error and you want the fix rather than the reference
  • SKILL.md covers Variable Errors, Expression Errors, Control Flow Errors and Syntax Errors, plus 3 more sections
  • Calls git

What it does

Cheatsheet Errors is an agent skill from mendixlabs/mxcli. Quick fixes for the MDL syntax errors that come up most: undeclared variables, wrong retrieve source, list operations, expression mistakes. Use when mxcli check reports an error and you want the fix rather than the reference.

Its SKILL.md is about 2.3k 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

  • Mxcli check reports an error and you want the fix rather than the reference

Example prompts

  • “/cheatsheet-errors”

Workflow steps

2 steps, taken from the first numbered list in SKILL.md.

  1. Check entity exists: list entities in ModuleName
  2. Use fully qualified name: Module.EntityName

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

    Shell commands in SKILL.md call:

    • git

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

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    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

Cheatsheet Errors loads about 2.3k tokens when it runs. Until then it costs about 61 tokens; SKILL.md has 888 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~61
When it runs · the whole SKILL.md, loaded when a task matches
~2.3k

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). 888 words, ~2,316 tokens.

Download SKILL.mdSave it as .claude/skills/cheatsheet-errors/SKILL.md (or your agent's skills folder).
name
cheatsheet-errors
description
Quick fixes for the MDL syntax errors that come up most: undeclared variables, wrong retrieve source, list operations, expression mistakes. Use when `mxcli check` reports an error and you want the fix rather than the reference.

MDL Common Errors Cheatsheet

Quick fixes for common MDL syntax errors.

Variable Errors

"Variable 'X' is not declared"

Problem: Using SET on a variable that wasn't declared.

mdl
-- WRONG
if $value > 10 then
  set $IsValid = false;  -- ERROR: $IsValid not declared
end if;

Fix: Add DECLARE before SET.

mdl
-- CORRECT
declare $IsValid boolean = true;
if $value > 10 then
  set $IsValid = false;
end if;
"Selected type is not allowed" (CE0053)

Problem: Declaring an object (entity) or list variable. A declare maps to a Create Variable activity, which only accepts primitives (String/Integer/Long/Decimal/Boolean/DateTime/Enumeration). Declaring an object or list is rejected (CE0053/CE0038, plus CE7247 on any later set) — bare or initialized. The as keyword is also a parse error in mxcli. mxcli check flags an object declare as MDL043 and a list declare as MDL040.

mdl
-- WRONG: declaring an object — there is no "empty object variable" (MDL043)
declare $Product Module.Product = empty;
declare $Product as Module.Product;         -- AS is also a parse error
-- WRONG: declaring a list (MDL040)
declare $Products list of Module.Product = empty;

Fix: Objects and lists can't be declared — get them from a source that produces one.

mdl
-- object: a microflow parameter, a retrieve, a create, or a loop iterator
retrieve $Product from Module.Product where Code = $Code first;  -- retrieve
$Product = create Module.Product (Name = $Name);                   -- create
-- or: create microflow M.Save ($Product: Module.Product) ... / loop $Product in $Products ...

-- list: a parameter, a retrieve, or a create list
$Products = create list of Module.Product;   -- empty list to accumulate into
retrieve $Products from Module.Product where ...;  -- or populate from the database

Expression Errors

"Error in expression" (CE0117)

Problem 1: Using unqualified association name in XPath.

mdl
-- WRONG: Missing module qualification
set $Name = $Order/Customer/Name;

Fix: Use fully qualified association name.

mdl
-- CORRECT: Module.AssociationName
set $Name = $Order/Shop.Order_Customer/Name;

Problem 2: Using not without parentheses — Mendix requires not(expr) form.

mdl
-- WRONG: bare not rejected by Studio Pro
if not $IsActive then ...
if not contains($Name, 'demo') then ...

Fix: Always wrap the negated expression in parentheses.

mdl
-- CORRECT: not(expr)
if not($IsActive) then ...
if not(contains($Name, 'demo')) then ...

mxcli enforces this at parse time — not expr without parens is a syntax error.

"Type mismatch" in enum comparison

Problem: Comparing enumeration with string literal.

mdl
-- WRONG: String literal instead of enum value
if $task/status = 'Completed' then

Fix: Use qualified enumeration value.

mdl
-- CORRECT: Module.Enumeration.Value
if $task/status = Module.TaskStatus.Completed then

Control Flow Errors

"Activity cannot be the last object" (CE0105)

Problem: Missing RETURN statement.

mdl
-- WRONG: No RETURN
begin
  declare $Result boolean = true;
  log info 'Done';
  -- Missing RETURN!
end;

Fix: Add RETURN statement.

mdl
-- CORRECT
begin
  declare $Result boolean = true;
  log info 'Done';
  return $Result;
end;
"Action activity is unreachable" (CE0104)

Problem: Code after RETURN statement.

mdl
-- WRONG: Code after RETURN
if $value < 0 then
  return false;
  log info 'Negative';  -- Unreachable!
end if;

Fix: Move code before RETURN.

mdl
-- CORRECT
if $value < 0 then
  log info 'Negative';
  return false;
end if;

Syntax Errors

Division operator
mdl
-- WRONG: Using / for division
set $average = $Total / $count;

-- CORRECT: Use 'div' keyword
set $average = $Total div $count;
Missing END IF / END LOOP
mdl
-- WRONG: Missing END IF
if $value > 0 then
  set $Positive = true;
-- Missing END IF!

-- CORRECT
if $value > 0 then
  set $Positive = true;
end if;
Missing semicolons
mdl
-- WRONG: Missing semicolon
declare $count integer = 0
set $count = 1

-- CORRECT
declare $count integer = 0;
set $count = 1;

Reference Errors

"Module not found"

Problem: Using non-existent module name.

Fix: Check module exists with list modules.

"Entity not found"

Problem: Using non-existent entity name.

Fix:

  1. Check entity exists: list entities in ModuleName
  2. Use fully qualified name: Module.EntityName
"Microflow not found"

Problem: Calling non-existent microflow.

Fix:

  1. Check microflow exists: list microflows in ModuleName
  2. Use fully qualified name: Module.MicroflowName
"page not found" for a page the script creates further down (MDL-PAGE01)

Problem: A widget action targets a page created by a LATER statement in the same script. Page references resolve in statement order, and exec is not transactional — the statements before the failure are already written.

Fix:

  1. Move the create page for the target above the page that links to it.
  2. If two pages link to each other, no ordering works: create one without the linking widget, then add it with alter page ... insert.
  3. Commit before executing a large script — recovery from a partial run is git checkout -- App.mpr mprcontents/.
"not found" for anything else the script creates further down (MDL-ORDER01)

Problem: Same shape as MDL-PAGE01, for the other references the executor resolves when it writes the referring document — a flow's parameter or return type, an entity attribute's enumeration, an association endpoint, a call microflow/call nanoflow target, or a grant subject. check used to pass these and exec then failed partway through.

Fix: Move the create for the named document above the statement that uses it. Statements have no dependency order beyond this, so grouping entities and enumerations at the top of a script avoids it entirely.

Not every forward reference is an error. These execute fine with the definition afterwards, and are deliberately not flagged: an entity's extends generalization, call java action, retrieve ... from, and create <entity> inside a microflow body.

One case check cannot predict: if the document is created later by create or modify, exec still fails when the project does not already have it — but the script alone cannot say whether it does, so no error is reported. Run with -p for the fullest coverage.

Show full SKILL.md (316 more words)Show less

Studio Pro Error Code Reference

CodeMessageCommon Cause
CE0053Selected type is not allowedDeclared an object/list variable — get it from a parameter/retrieve/create/loop (MDL043 objects, MDL040 lists)
CE0104Action activity is unreachableCode after RETURN
CE0105Must end with end eventMissing RETURN
CE0117Error in expressionUnqualified association path
CE0117…on a button inside a data containerThe button passes the container it sits in by its widget name ($dvGate inside dvGate). That name is a variable only for containers nested below it; use $currentObject there. Same for data-source arguments, Visible:, Editable:, DynamicClasses:, and (as CE0161) a nested list's XPath where. MDL-BUTTON02
CE1571No argument selected for parameterA microflow/nanoflow call with a parameter nothing fills — as a datasource: or an action:. Give it an argument (action: call nanoflow M.NF(P = $value)), or nest the widget in a data container of the parameter's type. check -p reports both
CE1571…in a control barA control bar is not row-scoped, so the grid's row does not fill it: pass the grid's selection ($dgOrders, with Selection: set) or move the widget into a column. $currentObject there is MDL-BUTTON01
CE1834The 'Page' property is requiredWorkflow user task without a page — check flags MDL-WF01
CE1876Single outcome must not contain activitiesSingle-outcome user task with a nested activity flow — check flags MDL-WF02
CE6686Outcomes do not match the configured expression/microflowAn enumeration decision or call-microflow activity missing the empty outcome ('' -> { }) or an enumeration value — check flags the missing empty one as MDL-WF06
CW0094Variable never usedUnused parameter/variable

Quick Validation Checklist

Before executing MDL:

  • No object or list is declared — objects come from a parameter/retrieve/create/loop (MDL043); lists from a parameter/retrieve/create list (MDL040)
  • All SET targets have prior DECLARE
  • Association paths are qualified: $var/Module.Assoc/attr
  • Enum comparisons use Module.Enum.Value
  • Every flow path ends with RETURN
  • Division uses div not /
  • All statements end with ;
  • IF/LOOP properly closed with END IF/END LOOP

© 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/cheatsheet-errors of mendixlabs/mxcli.

Open the folder on GitHubat commit 20a6c89

Compare with similar skills

Cheatsheet Errors 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.

Cheatsheet Errors compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Cheatsheet Errors this skillmendixlabs/mxcli128—~2.3kAutomated safety check: PassApache-2.0
Fixalirezarezvani/claude-skills28k1 repos~765Automated safety check: PassMIT
Fix Issuepytorch/pytorch104k—~2.3kAutomated safety check: PassCustom licence
Orch Fix Defectaffaan-m/ECC275k1 repos~414Automated safety check: PassMIT
Logic Fix Allsickn33/agentic-awesome-skills47k1 repos~1.3kAutomated safety check: PassMIT
Fixdavepoon/buildwithclaude3.6k—~14kAutomated safety check: NotesMIT

Similar skills

  • Fix

    alirezarezvani/claude-skills

    Fix failing or flaky Playwright tests. An agent skill from alirezarezvani/claude-skills.

    28k GitHub starsUsed in 1 repo~765 tokens
    Testing & QAAuto-check passed
  • Fix Issue

    pytorch/pytorch

    Fix bugs reported in PyTorch GitHub issues by reproducing, root-causing, and implementing a fix in the local working tree.

    104k GitHub stars~2.3k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Orch Fix Defect

    affaan-m/ECC

    Orchestrate fixing a bug — reproduce it as a failing regression test, fix to green, review, and gated commit — by delegating each phase to the matching ECC agent.

    275k GitHub starsUsed in 1 repo~414 tokens
    Testing & QAAuto-check passed
  • Logic Fix All

    sickn33/agentic-awesome-skills

    Autonomous repository-wide audit-and-fix pipeline: health → review → locate/explain → fix → diff-verify → iterate until clean.

    47k GitHub starsUsed in 1 repo~1.3k tokens
    Auto-check passed
  • Fix

    davepoon/buildwithclaude

    Get fix intelligence for a vulnerability and propose concrete remediation for the current repository

    3.6k GitHub stars~14k tokensUpdated 2 days ago
    Data & AnalyticsAuto-check: notes
  • Quick Fix

    gittower/git-flow-next

    Handle a small fix or maintenance task locally end-to-end — no PR, but full review gates and a confirmed local merge into main

    458 GitHub stars~2.1k tokensUpdated 1 mo ago
    DevelopmentAuto-check: notes

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 yesterday
    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 yesterday
    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 yesterday
    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 Cheatsheet Errors

What does Cheatsheet Errors do?

Quick fixes for the MDL syntax errors that come up most: undeclared variables, wrong retrieve source, list operations, expression mistakes. Cheatsheet Errors is an agent skill from mendixlabs/mxcli. Quick fixes for the MDL syntax errors that come up most: undeclared variables, wrong retrieve source, list operations, expression mistakes.

When should I use Cheatsheet Errors?

Cheatsheet Errors fits situations like: mxcli check reports an error and you want the fix rather than the reference.

How do I install Cheatsheet Errors in Claude Code?

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

How do I install Cheatsheet Errors in Codex?

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

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

What does Cheatsheet Errors need to run?

Going by SKILL.md and its folder, Cheatsheet Errors needs the command-line tools its instructions call (git).

Does Cheatsheet Errors access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Cheatsheet Errors 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 Cheatsheet Errors use?

Cheatsheet Errors 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 Cheatsheet Errors use?

About 2.3k tokens (SKILL.md is roughly 9.3k 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 Cheatsheet Errors?

Skills that share tags, products or a category with Cheatsheet Errors: Fix (alirezarezvani/claude-skills, 28k stars), Fix Issue (pytorch/pytorch, 104k stars), Orch Fix Defect (affaan-m/ECC, 275k stars) and Logic Fix All (sickn33/agentic-awesome-skills, 47k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Cheatsheet Errors?

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.