diff-script

A command-line comparison tool for Mendix projects and MDL scripts. Mendix is a platform for building applications, and an MDL script describes changes to a Mendix project.

In plain words
What is it for?
Use it to inspect changes as a unified diff, side-by-side comparison, or structural summary, with optional color and width settings.
Why use it?
It shows what a proposed script would add, remove, or change before the script is applied.

Command for Claude Code

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 commands/mendixlabs/mxcli/diff-script
Clone the repo
git clone --depth 1 https://github.com/mendixlabs/mxcli

Made for: Claude Code.

Per session 10 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 585 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.00010 $0.00585
Opus 5 $0.00005 $0.00293
Sonnet 5 $0.00002 $0.00117
Haiku 4.5 $0.00001 $0.00059

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

Security

Grade A, and why

diff-script 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 2d ago.

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/commands/mendix/diff-script.md · 101 lines

How it starts

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

Diff Script

Compare an MDL script against the current state of a Mendix project to see what would change.

Commands

# Unified diff (default) - traditional +/- format
mxcli diff -p app.mpr changes.mdl

# Side-by-side comparison
mxcli diff -p app.mpr changes.mdl --format side

# Structural summary
mxcli diff -p app.mpr changes.mdl --format struct

# With color output
mxcli diff -p app.mpr changes.mdl --color

# Side-by-side with custom width
mxcli diff -p app.mpr changes.mdl --format side --width 140

Output Formats

Unified (default)

Traditional diff format showing + for additions and - for removals:

--- Entity.MyModule.Customer (current)
+++ Entity.MyModule.Customer (script)
@@ -1,5 +1,6 @@
 CREATE PERSISTENT ENTITY MyModule.Customer (
   Name: String(100) NOT NULL,
-  Email: String(200)
+  Email: String(200) NOT NULL,
+  Phone: String(20)
 );

Side-by-Side (--format side)

Two-column comparison showing current vs proposed:

Entity.MyModule.Customer
──────────────────────────────────────────────────────────────────
Current                              │ Script
──────────────────────────────────────────────────────────────────
  Email: String(200)                 │   Email: String(200) NOT NULL,  ~
                                     │   Phone: String(20)             +

Structural (--format struct)

Summary of changes by element type:

Entity: MyModule.Customer
  ~ Attribute Email: changed
  + Attribute Phone: String(20)

Entity: MyModule.Order
  + New

What Gets Compared

  • Entities: Attributes, constraints, indexes, documentation
  • Enumerations: Values and captions
  • Associations: Type, owner, delete behavior
  • Microflows: Parameters, return type, body statements

Summary Output

Every diff ends with a summary:

Summary: 2 new, 3 modified, 5 unchanged

Use Cases

  1. Preview changes before executing a script
  2. Review modifications in a pull request
  3. Audit what an MDL script will modify
  4. Documentation of changes between versions

Read the full file on GitHub · 101 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. 2d ago First seen · 101 lines · 10 tokens per session scan A bccb2fbba88d

Subscribe to this mod's changes

diff-script is a command published in the GitHub repository mendixlabs/mxcli (115 stars, last pushed 2d ago), licensed Apache-2.0. It adds 10 tokens to every session and 585 once invoked, about $0.0001 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.