Agent skill

Javascript Actions

by mendixlabs in mendixlabs/mxcli

Create, call and drop JavaScript actions — client-side logic called from nanoflows, not microflows.

Apache-2.0Auto-check passed

Install Javascript Actions

skills CLI
$ npx skills add mendixlabs/mxcli --skill javascript-actions -a claude-code

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

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

At a glance

Create, call and drop JavaScript actions — client-side logic called from nanoflows, not microflows.

  • Works in 2 steps: The model unit… → A source file…
  • Behaviour must run in the browser
  • SKILL.md covers When to Use This Skill, Overview, Syntax and Examples, plus 6 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Javascript Actions is an agent skill from mendixlabs/mxcli. Create, call and drop JavaScript actions — client-side logic called from nanoflows, not microflows. Use when behaviour must run in the browser or on the device: DOM, fetch, geolocation, or wrapping a marketplace JS action.

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It works with JavaScript and Java. 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

  • Behaviour must run in the browser
  • On the device: DOM
  • Wrapping a marketplace JS action

Example prompts

  • “/javascript-actions”

Workflow steps

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

  1. The model unit (JavaScriptActions$JavaScriptAction).
  2. A source file javascriptsource//actions/.js containing an

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 sql and javascript).

    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

Javascript Actions loads about 1.4k tokens when it runs. Until then it costs about 60 tokens; SKILL.md has 488 words of instructions outside code blocks.

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

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). 488 words, ~1,449 tokens.

Download SKILL.mdSave it as .claude/skills/javascript-actions/SKILL.md (or your agent's skills folder).
name
javascript-actions
description
Create, call and drop JavaScript actions — client-side logic called from nanoflows, not microflows. Use when behaviour must run in the browser or on the device: DOM, fetch, geolocation, or wrapping a marketplace JS action.

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

sql
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.

Examples

Simple action (Web default):

sql
mdl 1;
CREATE JAVASCRIPT ACTION MyFirstModule.JSA_IsOnline () RETURNS Boolean
AS $$
    return Promise.resolve(navigator.onLine);
$$;

Parameters + return:

sql
mdl 1;
CREATE JAVASCRIPT ACTION MyFirstModule.JSA_Add (
    A: Integer NOT NULL,
    B: Integer NOT NULL
) RETURNS Integer
AS $$
    return Promise.resolve(A + B);
$$;

Exposed toolbox action, native platform:

sql
mdl 1;
CREATE JAVASCRIPT ACTION MyFirstModule.JSA_ShowToast (
    Message: String NOT NULL,
    Duration: Integer
) RETURNS Boolean
EXPOSED AS 'Show Toast' IN 'UI'
PLATFORM Native
AS $$
    console.log(Message);
    return Promise.resolve(true);
$$;

Idempotent update (UUID preserved):

sql
mdl 1;
CREATE OR MODIFY JAVASCRIPT ACTION MyFirstModule.JSA_Add (
    A: Integer NOT NULL,
    B: Integer NOT NULL,
    C: Integer
) RETURNS Integer
AS $$
    return Promise.resolve(A + B + (C || 0));
$$;

Drop (removes the unit and the .js file):

sql
mdl 1;
DROP JAVASCRIPT ACTION MyFirstModule.JSA_Add;
Show full SKILL.md (213 more words)Show less

Calling from a nanoflow

JavaScript actions are invoked with CALL JAVASCRIPT ACTION inside a nanoflow body (arguments use Name = value):

sql
$Sum = call javascript action MyFirstModule.JSA_Add(A = 2, B = 3);

This is the nanoflow counterpart of CALL JAVA ACTION (microflows). Use it in a CREATE NANOFLOW ... BEGIN ... END; body.

The generated .js file

CREATE writes (and OR MODIFY rewrites) javascriptsource/<Module>/actions/<Name>.js:

javascript
// This file was generated by Mendix Studio Pro.
// ...
// BEGIN EXTRA CODE
// END EXTRA CODE

/**
 * @param {number} A
 * @param {number} B
 * @returns {Promise.<number>}
 */
export async function JSA_Add(A, B) {
    // BEGIN USER CODE
    return Promise.resolve(A + B);
    // END USER CODE
}

Only the code between the USER CODE / EXTRA CODE markers is preserved when Studio Pro regenerates the file. The MDL $$ body $$ lands inside USER CODE.

Inspecting

sql
LIST JAVASCRIPT ACTIONS [IN Module];
DESCRIBE JAVASCRIPT ACTION Module.Name;   -- re-executable MDL (signature + body)

DESCRIBE output round-trips: it re-parses as a CREATE JAVASCRIPT ACTION.

Validation Checklist

  • Body present: AS $$ ... $$; — never omit it
  • Body returns a Promise (the function is async)
  • Clause order: returns → exposed as → platform → as
  • Required parameters marked NOT NULL
  • Use CALL JAVASCRIPT ACTION from nanoflows, CALL JAVA ACTION from microflows
  • Validate before applying: mxcli check script.mdl

Common Errors

SymptomCauseFix
no viable alternative at input '...'Missing AS $$ ... $$ bodyAdd a body (stub return Promise.resolve(false);)
already exists — use create or modify to overwriteDuplicate name without OR MODIFYAdd OR MODIFY
Action runs nowhere / wrong clientPLATFORM too narrowSet PLATFORM All (or the right target)
mismatched input 'platform'Clause out of orderPut platform after exposed as, before as
  • java-actions — server-side custom code (microflows)
  • write-nanoflows — nanoflow syntax and restrictions
  • mxcli syntax javascript-action — quick syntax reference

© 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/javascript-actions of mendixlabs/mxcli.

Open the folder on GitHubat commit a924d11

Compare with similar skills

Javascript Actions 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.

Javascript Actions compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Javascript Actions this skillmendixlabs/mxcli128—~1.4kAutomated safety check: PassApache-2.0
Fory Releaseapache/fory4.6k—~2.9kAutomated safety check: PassApache-2.0
Code Audit3stoneBrother/code-audit8931 repos~2.7kAutomated safety check: PassNone
CodeQL Security Scantrailofbits/skills7.4k—~4.6kAutomated safety check: NotesCC-BY-SA-4.0
Fory Version Bumpapache/fory4.6k—~1.1kAutomated safety check: PassApache-2.0
Dr Jskilljdubois/dr-jskill342—~4.6kAutomated safety check: NotesApache-2.0

Similar skills

  • Fory Release

    apache/fory

    Prepare an Apache Fory release candidate from a clean release branch, including the version bump, RC tag, JVM staging, ASF source artifacts, SVN upload, and vote email.

    4.6k GitHub stars~2.9k tokensUpdated today
    Auto-check passed
  • Code Audit

    3stoneBrother/code-audit

    Professional code security audit skill covering 55+ vulnerability types.

    893 GitHub starsUsed in 1 repo~2.7k tokens
    SecurityAuto-check passed
  • CodeQL Security Scan

    trailofbits/skills

    Official

    Scans a codebase for vulnerabilities with CodeQL's data flow and taint tracking in run-all or important-only modes, including data extensions for project-specific sources and sinks.

    7.4k GitHub stars~4.6k tokensUpdated 5 days ago
    SecurityAuto-check: notes
  • Bump Apache Fory release or post-release development versions across Java, Kotlin, Scala, Python, Rust, Go, C++, C, Dart, JavaScript, Swift, integration tests, examples, and source docs.

    4.6k GitHub stars~1.1k tokensUpdated today
    MobileAuto-check passed
  • Dr Jskill

    jdubois/dr-jskill

    Creates Java + Spring Boot projects: Web applications, full-stack apps with Vue.js or Angular or React or vanilla JS, PostgreSQL, REST APIs, and Docker.

    342 GitHub stars~4.6k tokensUpdated 8 days ago
    Backend & APIsAuto-check: notes
  • Run profile-driven bottleneck optimization across Apache Fory implementations (Java, C++, Python/Cython, Go, Rust, Swift, C, JavaScript/TypeScript, Dart, Kotlin, Scala).

    4.6k GitHub stars~2.2k tokensUpdated today
    MobileAuto-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

Works with

Questions about Javascript Actions

What does Javascript Actions do?

Create, call and drop JavaScript actions — client-side logic called from nanoflows, not microflows. Javascript Actions is an agent skill from mendixlabs/mxcli. Create, call and drop JavaScript actions — client-side logic called from nanoflows, not microflows.

When should I use Javascript Actions?

Javascript Actions fits situations like: behaviour must run in the browser; on the device: DOM; wrapping a marketplace JS action.

How do I install Javascript Actions in Claude Code?

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

How do I install Javascript Actions in Codex?

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

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

What does Javascript Actions need to run?

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

Does Javascript Actions 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 Javascript Actions 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 Javascript Actions use?

Javascript Actions 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 Javascript Actions use?

About 1.4k tokens (SKILL.md is roughly 5.8k 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 Javascript Actions?

Skills that share tags, products or a category with Javascript Actions: Fory Release (apache/fory, 4.6k stars), Code Audit (3stoneBrother/code-audit, 893 stars), CodeQL Security Scan (trailofbits/skills, 7.4k stars) and Fory Version Bump (apache/fory, 4.6k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Javascript Actions?

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.