Agent skill

Validation Microflows

by mendixlabs in mendixlabs/mxcli

Validation microflows for new/edit pages — attribute checks, feedback messages, and conditional validation chains.

Apache-2.0Auto-check passed

Install Validation Microflows

skills CLI
$ npx skills add mendixlabs/mxcli --skill validation-microflows -a claude-code

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

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

At a glance

Validation microflows for new/edit pages — attribute checks, feedback messages, and conditional validation chains.

  • Works in 2 steps: VAL_Entity_Action - The validation… → ACT_Entity_Action - The action microflow…
  • A form needs input validation with messages shown against the fields
  • SKILL.md covers When to Use This Skill, The Validation Pattern, MDL Syntax and Complete Example, plus 4 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Validation Microflows is an agent skill from mendixlabs/mxcli. Validation microflows for new/edit pages — attribute checks, feedback messages, and conditional validation chains. Use when a form needs input validation with messages shown against the fields.

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

  • A form needs input validation with messages shown against the fields

Example prompts

  • “/validation-microflows”

Workflow steps

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

  1. VAL_Entity_Action - The validation microflow that
  2. ACT_Entity_Action - The action microflow that

What it can do on your machine

Read from SKILL.md and the folder at commit a924d11. 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

Validation Microflows loads about 2.7k tokens when it runs. Until then it costs about 54 tokens; SKILL.md has 715 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 a924d11, republished under its Apache-2.0 licence (© mendixlabs). 715 words, ~2,686 tokens.

Download SKILL.mdSave it as .claude/skills/validation-microflows/SKILL.md (or your agent's skills folder).
name
validation-microflows
description
Validation microflows for new/edit pages — attribute checks, feedback messages, and conditional validation chains. Use when a form needs input validation with messages shown against the fields.

Validation Microflows Skill

This skill provides guidance for creating validation microflows in MDL that validate user input on NewEdit pages and provide feedback to users.

When to Use This Skill

Use this skill when:

  • Creating validation logic for NewEdit pages
  • Implementing attribute validation with feedback messages
  • Building conditional validation chains
  • Creating action microflows that call validation microflows

Nanoflow validation: The same patterns apply to nanoflows (create nanoflow instead of create microflow). Use nanoflows for client-side validation when server roundtrips are unnecessary — validation feedback renders instantly without a network call.

The Validation Pattern

Mendix validation follows a two-microflow pattern:

  1. VAL_Entity_Action - The validation microflow that:

    • Takes an entity object as parameter
    • Validates each required field
    • Shows validation feedback on invalid fields
    • Returns a Boolean indicating overall validity
  2. ACT_Entity_Action - The action microflow that:

    • Calls the validation microflow
    • Only proceeds with save/commit if validation passes
    • Closes the page on success

MDL Syntax

VALIDATION FEEDBACK Statement
mdl
validation feedback $VariableName/attributename message 'Error message';

With template arguments (for dynamic messages):

mdl
validation feedback $VariableName/attributename message '{1}' with ({1} = $MessageVariable);
CLOSE PAGE Statement
mdl
close page;

Or to close multiple pages:

mdl
close page 2;

Complete Example

Validation Microflow (VAL_Car_NewEdit)
mdl
mdl 1;
/**
 * Validates a Car entity for NewEdit operations
 *
 * Performs validation on all required fields and displays
 * appropriate error messages to the user.
 *
 * @param $Car The Car entity to validate
 * @returns Boolean indicating if all validations passed
 */
create microflow MdlTemplates.VAL_Car_NewEdit (
  $Car: MdlTemplates.Car
)
returns boolean as $IsValid
folder 'OverviewPages'
begin
  -- Initialize validation flag
  declare $IsValid boolean = true;

  -- Validate Brand (required text field)
  if trim($Car/Brand) = '' then
    set $IsValid = false;
    validation feedback $Car/Brand message 'Brand is required';
  end if;

  -- Validate Model (required text field)
  if trim($Car/model) = '' then
    set $IsValid = false;
    validation feedback $Car/model message 'Model is required';
  end if;

  -- Validate Price (required, must be positive)
  if $Car/Price = empty then
    set $IsValid = false;
    validation feedback $Car/Price message 'Price is required';
  else
    if $Car/Price <= 0 then
      set $IsValid = false;
      validation feedback $Car/Price message 'Price must be greater than 0';
    end if;
  end if;

  -- Validate enumeration (required)
  if $Car/CarType = empty then
    set $IsValid = false;
    validation feedback $Car/CarType message 'Car type is required';
  end if;

  return $IsValid;
end;
Action Microflow (ACT_Car_NewEdit)
mdl
mdl 1;
/**
 * Handles the Save action for Car NewEdit page
 *
 * Validates the Car, commits it if valid, and closes the page.
 *
 * @param $Car The Car entity to save
 * @returns Boolean indicating success
 */
create microflow MdlTemplates.ACT_Car_NewEdit (
  $Car: MdlTemplates.Car
)
returns boolean as $IsValid
folder 'OverviewPages'
begin
  -- Call validation microflow
  $IsValid = call microflow MdlTemplates.VAL_Car_NewEdit(param = $Car);

  -- Only save if validation passed
  if $IsValid then
    commit $Car;
    close page;
  end if;

  return $IsValid;
end;

Validation Patterns

Simple Required Field Validation
mdl
if trim($entity/TextField) = '' then
  set $IsValid = false;
  validation feedback $entity/TextField message 'This field is required';
end if;
Numeric Range Validation
mdl
if $entity/Amount != empty then
  if $entity/Amount < 0 or $entity/Amount > 1000 then
    set $IsValid = false;
    validation feedback $entity/Amount message 'Amount must be between 0 and 1000';
  end if;
end if;
Enumeration Required Validation
mdl
if $entity/status = empty then
  set $IsValid = false;
  validation feedback $entity/status message 'Status is required';
end if;
Enumeration Value Comparison

IMPORTANT: When comparing enumeration values, use the fully qualified enumeration value, NOT a string literal.

mdl
-- CORRECT: Use fully qualified enumeration value
if $task/TaskStatus = Module.TaskStatus.Completed then
  -- Task is completed
end if;

if $task/TaskStatus != Module.TaskStatus.Cancelled then
  -- Task is not cancelled
end if;

-- WRONG: Do NOT use string literals for enumeration comparison
-- IF $Task/TaskStatus = 'Completed' THEN  -- This is incorrect!
Conditional Validation Based on Enumeration
mdl
-- Validate CompletedDate only when status is Completed
if $task/TaskStatus = Module.TaskStatus.Completed then
  if $task/CompletedDate = empty then
    set $IsValid = false;
    validation feedback $task/CompletedDate message 'Completed date is required';
  end if;
end if;

-- Validate DueDate for active (non-completed, non-cancelled) tasks
if $task/TaskStatus != Module.TaskStatus.Completed and $task/TaskStatus != Module.TaskStatus.Cancelled then
  if $task/DueDate = empty then
    set $IsValid = false;
    validation feedback $task/DueDate message 'Due date is required for active tasks';
  end if;
end if;
Date Validation
mdl
if $entity/StartDate != empty and $entity/EndDate != empty then
  if $entity/EndDate < $entity/StartDate then
    set $IsValid = false;
    validation feedback $entity/EndDate message 'End date must be after start date';
  end if;
end if;
Dynamic Message with Template Arguments
mdl
-- Build validation message with dynamic content
declare $ValidationMessage string = '';
if $entity/value < $entity/MinValue then
  set $ValidationMessage = 'Value must be at least ' + toString($entity/MinValue);
end if;
if $entity/value > $entity/MaxValue then
  set $ValidationMessage = if trim($ValidationMessage) = ''
    then 'Value must be at most ' + toString($entity/MaxValue)
    else $ValidationMessage + '. Value must be at most ' + toString($entity/MaxValue);
end if;

if trim($ValidationMessage) != '' then
  set $IsValid = false;
  validation feedback $entity/value message '{1}' with ({1} = $ValidationMessage);
end if;
Association Validation
mdl
-- Validate that an association is set
if $Order/Order_Customer = empty then
  set $IsValid = false;
  validation feedback $Order/Module.Order_Customer message 'Customer is required';
end if;

Implementation Checklist

When implementing validation microflows:

  1. Initialize the validation flag: Always start with declare $IsValid boolean = true;

  2. Declare all variables before using SET: You must use declare before set for primitive variables. Parameters are automatically available but local variables require declaration.

  3. Validate all required fields: Check each attribute that needs validation

  4. Set flag to false on error: set $IsValid = false; before showing feedback

  5. Show clear error messages: Use validation feedback with descriptive messages

  6. Return the validation flag: End with return $IsValid;

  7. Handle nullable fields: Check for empty before validating nullable fields

  8. Use appropriate validation order: Validate presence before other constraints

Important: The script executor validates that all variables used with set are declared. If you use set $Var = ... without a prior declare $Var type = ..., you will receive an error like:

variable '$Var' is not declared. use declare $Var: <type> before using set

Files Modified

This feature is implemented in:

  • mdl/grammar/MDL.g4 - ANTLR4 grammar with VALIDATION FEEDBACK tokens
  • mdl/ast/ast_microflow.go - AST type definitions (MfValidationFeedbackStmt)
  • mdl/visitor/visitor_microflow_statements.go - ANTLR listener to build AST
  • mdl/executor/cmd_microflows_builder.go - Flow builder with variable validation
  • mdl/executor/cmd_microflows_show.go - DESCRIBE formatter for MDL output
  • mdl/backend/modelsdk/microflow_write.go - BSON serialization for ValidationFeedbackAction
  • sdk/microflows/microflows_actions.go - ValidationFeedbackAction struct
Show full SKILL.md (313 more words)Show less

Validation rules (CREATE VALIDATION RULE)

binds a regex or a range to one attribute — create validation rule for Mod.Entity.Attr regex Mod.Pattern error message '…'. The rule is anonymous and entity-scoped, so the statement names the attribute; re-running it replaces the rule of the same type and leaves the attribute's others alone. Unlocked by a STORAGE-NAME OVERRIDE in modelsdk/gen: it bound RegularExpression where Studio Pro stores RegExIdentifier, and the control (same script, key reverted) fails CE0135 "No regular expression specified" while the fixed one is 0 errors on mxbuild 11.13 with RegExIdentifier on disk. Range bounds are inclusive and map to Mendix's only three kinds (from X to Y/from X/to Y → Between/GreaterThanOrEqualTo/SmallerThanOrEqualTo); there is no strict </>, and the old grammar's forms for it — plus an EXPRESSION rule type Mendix does not have and an inline regex literal — were removed, having never had a visitor or handler. Required/Unique stay attribute constraints (not null error message '…' / unique error message '…'), not a second spelling here. drop validation rule [if exists] for Mod.Entity.Attr [regex | range] removes a rule; without a kind it removes both the regex and the range rule and leaves Required/Unique alone. Rewriting an entity carrying MaxLength or EqualsTo is refused on both engines rather than silently downgraded to Required; that round trip was lossy and mx check stayed green, because a Required rule is valid. Both engines carry each rule's payload on READ (ruleInfoFromGen / parseValidationRuleInfo), which is what makes the refusal narrow instead of covering all of RegEx and Range — and what lets a range bounded by another attribute survive a rewrite even though MDL cannot author one (describe entity marks it with a comment rather than rendering it wrong). A rule whose payload did not survive the read is refused as firmly as an unknown type: a bare RuleInfo of the right $Type constrains nothing, which is the same silent downgrade wearing the right name

© 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/validation-microflows of mendixlabs/mxcli.

Open the folder on GitHubat commit a924d11

Compare with similar skills

Validation Microflows 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.

Validation Microflows compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Validation Microflows this skillmendixlabs/mxcli128—~2.7kAutomated safety check: PassApache-2.0
Feedbackcodewhale-hq/Codewhale41k—~272Automated safety check: PassMIT
Feedbacknexu-io/nexu3.3k—~660Automated safety check: WarnMIT
Feedbacktinyfish-io/tinyfish-cookbook2.2k—~600Automated safety check: PassMIT
UX Feedbacksickn33/agentic-awesome-skills47k1 repos~994Automated safety check: PassMIT
Performance AttributionHKUDS/Vibe-Trading35k—~3.1kAutomated safety check: PassMIT

Similar skills

  • Feedback

    codewhale-hq/Codewhale

    Report a Codewhale bug or idea as a GitHub issue. An agent skill from codewhale-hq/Codewhale.

    41k GitHub stars~272 tokensUpdated today
    Auto-check passed
  • Feedback

    nexu-io/nexu

    Send feedback to the Nexu team. An agent skill from nexu-io/nexu.

    3.3k GitHub stars~660 tokensUpdated 5 mo ago
    Productivity & AutomationAuto-check: warnings
  • Feedback

    tinyfish-io/tinyfish-cookbook

    File structured feedback about TinyFish — bug reports, confusing setup steps, missing features, or a doctor diagnostic report.

    2.2k GitHub stars~600 tokensUpdated 6 days ago
    Testing & QAAuto-check passed
  • UX Feedback

    sickn33/agentic-awesome-skills

    Add appropriate user feedback states (loading, success, error, empty) to a component or page

    47k GitHub starsUsed in 1 repo~994 tokens
    Auto-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 yesterday
    Business, Finance & HRAuto-check passed
  • Feedback Mastery

    davila7/claude-code-templates

    Navigate difficult conversations and deliver constructive feedback using structured frameworks.

    32k GitHub starsUsed in 2 repos~2.9k tokens
    Business, Finance & HRAuto-check passed

More from mendixlabs/mxcli

All 75 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
  • Mock REST APIs

    mendixlabs/mxcli

    Stand up an HTTP endpoint you control instead of a live third-party API, and point the Mendix app at it — Prism from an OpenAPI contract, a constant swap, or a forward proxy.

    128 GitHub starsUsed in 1 repo~2.5k tokens
    Auto-check passed
  • REST Client

    mendixlabs/mxcli

    Call external REST APIs from Mendix — the three approaches (inline REST CALL, consumed REST client document, generated from OpenAPI) and how to choose.

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

Questions about Validation Microflows

What does Validation Microflows do?

Validation microflows for new/edit pages — attribute checks, feedback messages, and conditional validation chains. Validation Microflows is an agent skill from mendixlabs/mxcli. Validation microflows for new/edit pages — attribute checks, feedback messages, and conditional validation chains.

When should I use Validation Microflows?

Validation Microflows fits situations like: A form needs input validation with messages shown against the fields.

How do I install Validation Microflows in Claude Code?

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

How do I install Validation Microflows in Codex?

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

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

What does Validation Microflows need to run?

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

Does Validation Microflows 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 Validation Microflows 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 Validation Microflows use?

Validation Microflows 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 Validation Microflows 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 Validation Microflows?

Skills that share tags, products or a category with Validation Microflows: Feedback (codewhale-hq/Codewhale, 41k stars), Feedback (nexu-io/nexu, 3.3k stars), Feedback (tinyfish-io/tinyfish-cookbook, 2.2k stars) and UX Feedback (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 Validation Microflows?

mendixlabs (a GitHub organization) maintains it in mendixlabs/mxcli, which has 128 GitHub stars. The repository holds 75 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.