javascript-actions

A guide for creating and using Mendix JavaScript actions, which are custom functions that run in a browser or on a device. They are called from nanoflows, Mendix's client-side workflows, rather than microflows, which run on the server.

In plain words
What is it for?
Use it to add browser APIs, network requests, geolocation, DOM behavior, or existing marketplace capabilities to a Mendix app through JavaScript actions.
Why use it?
It clarifies where client-side code belongs and keeps browser or device behavior separate from server-side Java actions.

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/javascript-actions
Any agent
npx skills add mendixlabs/mxcli --skill javascript-actions
Clone the repo
git clone --depth 1 https://github.com/mendixlabs/mxcli

Made for: Claude Code, Codex.

Per session 53 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,509 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.00053 $0.01509
Opus 5 $0.00026 $0.00754
Sonnet 5 $0.00011 $0.00302
Haiku 4.5 $0.00005 $0.00151

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

Security

Grade A, and why

javascript-actions 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/javascript-actions/SKILL.md · 193 lines

How it starts

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

Mendix JavaScript Actions Skill

Guidance for creating, calling, and dropping JavaScript actions in Mendix projects with MDL. JavaScript actions hold custom client-side logic and are called from nanoflows (not microflows — those use Java actions).

When to Use This Skill

  • Adding client-side behaviour (browser/native APIs, DOM, fetch, geolocation, …)
  • Logic that must run on the device rather than the server
  • Calling an existing JavaScript action from a nanoflow
  • Wrapping a marketplace/native capability exposed as a JS action

For server-side custom code, use Java actions instead (see java-actions).

Overview

A JavaScript action is two things on disk:

  1. The model unit (JavaScriptActions$JavaScriptAction).
  2. A source file javascriptsource/<Module>/actions/<Name>.js containing an exported async function.

CREATE JAVASCRIPT ACTION writes both. The MDL body you provide becomes the function body (between the BEGIN USER CODE / END USER CODE markers), so it normally returns a Promise.

Syntax

CREATE [OR MODIFY] JAVASCRIPT ACTION Module.Name ( parameters )
    RETURNS type
    [EXPOSED AS 'caption' IN 'category']
    [PLATFORM Web | Native | Hybrid | All]   -- default Web
AS $$
    <javascript>
$$;

DROP JAVASCRIPT ACTION Module.Name;

Clause order is fixed: returns, then exposed as, then platform, then as.

  • AS $$ ... $$ is mandatory. Omitting the body causes no viable alternative at input '...'. Use a stub: AS $$ return Promise.resolve(false); $$.
  • PLATFORM defaults to Web. Use Native, Hybrid, or All to widen.
  • OR MODIFY updates an existing action in place (UUID preserved); without it, a duplicate name is an error (use create or modify to overwrite).

Parameter types

Same type system as Java actions:

  • Primitives: String, Integer, Long, Decimal, Boolean, DateTime
  • Entity: Module.EntityName · List: List of Module.EntityName
  • Enumeration: ENUM Module.EnumName
  • Type parameter (generics): declare EntityType: ENTITY <pEntity>, then use the bare pEntity for instance parameters
  • Append NOT NULL to mark a parameter required.

Read the full file on GitHub · 193 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 · 193 lines · 53 tokens per session scan A c3a059a56cf3

Subscribe to this mod's changes

javascript-actions is a skill published in the GitHub repository mendixlabs/mxcli (115 stars, last pushed 2d ago), licensed Apache-2.0. It adds 53 tokens to every session and 1,509 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.

Related

Other skills, from other repositories

frontend-design

Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI).…

bytedance/deer-flow · 77 tokens

tmux

Remote-control tmux sessions for interactive CLIs by sending keystrokes and scraping pane output.

the-open-agent/openagent · 22 tokens

argent-device-interact

Interact with an iOS simulator, Android emulator, or Chromium (CDP) app using argent MCP tools. Use when tapping UI elements, performing gestures, scrolling/swiping, typing text, pressing hardware buttons, launching apps, opening URLs, taking screenshots, waiting for an element to appear or disappear, or checking…

software-mansion/argent · 73 tokens

argent-metro-debugger

Debug a JS runtime via CDP using argent debugger tools. Primary path is React Native via Metro (iOS / Android / Vega); a subset of the tools (debugger-connect, debugger-status, debugger-evaluate, debugger-log-registry) also drive a Chromium (CDP) app's renderer (an Electron app, or any Chromium browser exposing CDP)…

software-mansion/argent · 104 tokens

kb-builder

Build an Obsidian-compatible knowledge base from public web sources using the TinyFish CLI. Use this skill when a user wants a builder-grade markdown knowledge base on a technical topic, asks for a structured research vault, or wants a topic compiled from live public sources into interlinked markdown files. Supports…

tinyfish-io/tinyfish-cookbook · 158 tokens

tinyfish-social-listening

Monitor brand mentions, sentiment, and industry chatter across the web using TinyFish Search and Fetch. Use when a user asks to track what people are saying about a brand, product, or topic, run social listening, or get a pulse on public perception. If the user already named the target, proceed directly. Default time…

tinyfish-io/tinyfish-cookbook · 86 tokens