Import
asgeirtj/system_prompts_leaks
Handle explicit /import requests for read-only transcript recovery and a resume checkpoint, or continue work from other coding agents and unnamed artifacts.
Create and manage JSON structures, import mappings and export mappings in MDL, plus the domain-model shapes they map onto.
$ npx skills add mendixlabs/mxcli --skill json-structures-and-mappings -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install mendixlabs/mxcli json-structures-and-mappings --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/mendixlabs/mxcli.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/mendix/json-structures-and-mappings .claude/skills/json-structures-and-mappings && rm -rf skills-srcUse ~/.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/
Install the "json-structures-and-mappings" agent skill from https://github.com/mendixlabs/mxcli/tree/main/.claude/skills/mendix/json-structures-and-mappings into .claude/skills/json-structures-and-mappings/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "json-structures-and-mappings", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/mendixlabs/mxcli/tree/main/.claude/skills/mendix/json-structures-and-mappingsType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add mendixlabs/mxcli --skill json-structures-and-mappings -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install mendixlabs/mxcli json-structures-and-mappings --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/mendixlabs/mxcli.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.claude/skills/mendix/json-structures-and-mappings .agents/skills/json-structures-and-mappings && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "json-structures-and-mappings" agent skill from https://github.com/mendixlabs/mxcli/tree/main/.claude/skills/mendix/json-structures-and-mappings into .agents/skills/json-structures-and-mappings/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "json-structures-and-mappings", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add mendixlabs/mxcli --skill json-structures-and-mappings -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install mendixlabs/mxcli json-structures-and-mappings --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/mendixlabs/mxcli.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.claude/skills/mendix/json-structures-and-mappings .cursor/skills/json-structures-and-mappings && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "json-structures-and-mappings" agent skill from https://github.com/mendixlabs/mxcli/tree/main/.claude/skills/mendix/json-structures-and-mappings into .cursor/skills/json-structures-and-mappings/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "json-structures-and-mappings", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/mendixlabs/mxcli.git --path .claude/skills/mendix/json-structures-and-mappings--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add mendixlabs/mxcli --skill json-structures-and-mappings -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install mendixlabs/mxcli json-structures-and-mappings --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/mendixlabs/mxcli.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.claude/skills/mendix/json-structures-and-mappings .gemini/skills/json-structures-and-mappings && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "json-structures-and-mappings" agent skill from https://github.com/mendixlabs/mxcli/tree/main/.claude/skills/mendix/json-structures-and-mappings into .gemini/skills/json-structures-and-mappings/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "json-structures-and-mappings", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install mendixlabs/mxcli json-structures-and-mappingsInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add mendixlabs/mxcli --skill json-structures-and-mappings -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/mendixlabs/mxcli.git skills-src && mkdir -p .github/skills && cp -r skills-src/.claude/skills/mendix/json-structures-and-mappings .github/skills/json-structures-and-mappings && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "json-structures-and-mappings" agent skill from https://github.com/mendixlabs/mxcli/tree/main/.claude/skills/mendix/json-structures-and-mappings into .github/skills/json-structures-and-mappings/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "json-structures-and-mappings", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add mendixlabs/mxcli --skill json-structures-and-mappings -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install mendixlabs/mxcli json-structures-and-mappings --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/mendixlabs/mxcli.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.claude/skills/mendix/json-structures-and-mappings .opencode/skills/json-structures-and-mappings && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "json-structures-and-mappings" agent skill from https://github.com/mendixlabs/mxcli/tree/main/.claude/skills/mendix/json-structures-and-mappings into .opencode/skills/json-structures-and-mappings/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "json-structures-and-mappings", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
json-structures-and-mappingsCreate and manage JSON structures, import mappings and export mappings in MDL, plus the domain-model shapes they map onto.
JSON Structures And Mappings is an agent skill from mendixlabs/mxcli. Create and manage JSON structures, import mappings and export mappings in MDL, plus the domain-model shapes they map onto. Use when turning a JSON payload into entities, mapping a REST or queue response, or exporting objects as JSON.
Its SKILL.md is about 5.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files (for example `reference/mapping-root-selection.md`, `reference/message-definitions.md` and `reference/rest-api-example.md`).
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.
2 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit a924d11. It shows what the files ask for, not the result of running them.
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.
No scripts in the folder and no shell commands in SKILL.md (its code samples are sql and mdl).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
JSON Structures And Mappings loads about 5.4k tokens when it runs. Until then it costs about 66 tokens; SKILL.md has 2,013 words of instructions outside code blocks.
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.
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.
The full file from mendixlabs/mxcli at commit a924d11, republished under its Apache-2.0 licence (© mendixlabs). 2,013 words, ~5,429 tokens.
.claude/skills/json-structures-and-mappings/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.This skill covers creating and managing JSON structures, import mappings, and export mappings in Mendix using MDL.
A JSON structure defines the schema of a JSON payload. It stores a JSON snippet and auto-derives an element tree with paths, types, and custom names.
An import mapping converts a JSON string into Mendix entity objects. It maps JSON fields to entity attributes.
Every JSON structure element stores both, and for any lowercase-initial key they differ:
| Example | Used for | |
|---|---|---|
| Path (raw JSON key) | (Object)|uuid | what the runtime resolves by |
| ExposedName (derived) | Uuid | what Studio Pro displays |
Mendix derives the exposed name by capitalising the initial, and for an array's
item object by suffixing Item — so total → Total, camelCase → CamelCase,
__Value (array) → __ValueItem (its item). Keys already starting with an
underscore are left alone: __returnedCount stays __returnedCount.
This is Mendix's own convention, not something mxcli does. A blank app's
Studio-Pro-authored FeedbackModule.JSON_AppInsightsResponse stores
ExposedName: "Uuid" against Path: "(Object)|uuid", and its IMM_PostResponse
binds JsonPath: "(Object)|uuid".
Consequences worth knowing:
Total = total and Total = Total produce the
same stored mapping. Write whichever you have.DESCRIBE emits the raw JSON key, so its output reproduces the script that
produced the mapping — Total = total comes back as Total = total, and an
array binding as = item rather than = ItemItem. It also emits
create or modify, so the output re-runs against the project it was read from.
(Until #915 it printed the exposed name and a bare create: the text differed
from the input, making every script-vs-describe diff noise, and re-running it
failed with "import mapping already exists". The stored mapping was correct
either way.)mxcli check and failed later in mxbuild (CE5015) or at runtime.Mendix inheritance is multi-table: all of a parent's attributes are members of the
child, so an entity created with extends can map them. Name an inherited
attribute exactly like one of the entity's own — mxcli resolves each to the entity
that declares it, which is the reference Studio Pro needs to show the field
mapped.
mdl 1;
create persistent entity Docs.DocumentBase (
DocName: String(200),
Confidential: Boolean
);
create persistent entity Docs.Contract extends Docs.DocumentBase (
ContractNumber: String(50)
);
create import mapping Docs.IMM_Contract
with json structure Docs.JSON_Contract
{
create Docs.Contract {
ContractNumber = contractNumber, -- own
DocName = docName, -- inherited
Confidential = confidential -- inherited
}
};Qualifying an inherited attribute against the entity being mapped instead of its declaring entity is Mendix CE1613 "The selected attribute ... no longer exists", and the field shows unmapped in Studio Pro.
An export mapping converts Mendix entity objects into a JSON string. It maps entity attributes to JSON fields.
Import and export mappings for the same JSON structure typically require different entity structures.
from Child to Parent). Arrays map directly to the item entity — no intermediate container entity needed.Items) plus an item entity (e.g., ItemsItem). The container links to the parent, the item links to the container.mdl 1;
create json structure Module.JSON_Pet
sample '{"id": 1, "name": "Fido", "status": "available"}';For multi-line JSON, use dollar-quoting:
mdl 1;
create json structure Module.JSON_Order
sample $${
"orderId": 100,
"customer": {"name": "Alice", "email": "alice@example.com"},
"items": [{"sku": "A1", "quantity": 2, "price": 9.99}]
}$$;Custom name mapping (rename JSON fields):
mdl 1;
create json structure Module.JSON_Pet
sample '{"id": 1, "name": "Fido"}'
CUSTOM NAME map ('id' as '_id');Name array items yourself — item of (ako/mxcli#272). An array's item is the
anonymous [...] entry, so it has no JSON key and the plain form cannot reach
it; left alone it gets a derived name like LinesItem:
mdl 1;
create json structure Module.JSON_Invoice
sample '{"lines": [{"sku": "A1"}], "tags": ["urgent"]}'
CUSTOM NAME map (
'lines' as 'OrderLines',
item of 'lines' as 'OrderLine',
item of 'tags' as 'Tag'
);This is worth doing rather than accepting the default: a mapping element clones the schema element's ExposedName, so the item's name is what every mapping over this structure carries, and it is one of the two names a member resolves by.
item of names a primitive array's wrapper too; that wrapper is the item.item of 'Root' as 'Entry'.MDL-JSON01), as is
item of on something that is not an array (MDL-JSON02).mdl 1;
list json structures;
list json structures in module;
describe json structure Module.JSON_Pet;
drop json structure Module.JSON_Pet;A mapping's source can also be a message definition — 74 of the 327 mappings in the demo corpus (22.6%), and the only non-JSON source MDL can create. It holds nothing external: it is a selection over the domain model.
mdl 1;
create message definition collection Sales.MD_Order {
definition OrderMessage for Sales.Order as 'Orders' {
OrderId,
Sales.Order_Customer/Sales.Customer { FirstName }
}
};A bare name is an attribute; Assoc/Module.Entity is an association. Name the
target entity — the stored cardinality follows the direction of traversal and
the association's type, so a Reference gives a single object one way and a list
the other, while a ReferenceSet is a list both ways.
Mendix 11.15 removed collections. Each definition is its own document, and a mapping names it in two parts. The collection form is refused on 11.15, and the document form below 11.15:
mdl 1;
create message definition Sales.OrderMessage for Sales.Order as 'Orders' {
OrderId,
Sales.Order_Customer/Sales.Customer { FirstName }
};
create import mapping Sales.IMM_Order with message definition Sales.OrderMessage
{
create Sales.Order { OrderId = OrderId }
};The full vocabulary, the ALTER statements, inherited attributes and what mxcli deliberately does not guess: reference/message-definitions.md.
For import mappings, associations point FROM the child entity TO the parent:
mdl 1;
create non-persistent entity Module.OrderResponse (
OrderId: integer
);
create non-persistent entity Module.CustomerInfo (
Name: string,
Email: string
);
create non-persistent entity Module.OrderItem (
Sku: string,
Quantity: integer,
Price: decimal
);
-- Child entity owns the FK (FROM child TO parent)
create association Module.CustomerInfo_OrderResponse
from Module.CustomerInfo
to Module.OrderResponse;
create association Module.OrderItem_OrderResponse
from Module.OrderItem
to Module.OrderResponse;mdl 1;
create import mapping Module.IMM_Pet
with json structure Module.JSON_Pet
{
create Module.PetResponse {
PetId = id,
Name = name,
status = status
}
};Arrays map directly to the item entity — no intermediate container needed:
mdl 1;
create import mapping Module.IMM_Order
with json structure Module.JSON_Order
{
create Module.OrderResponse {
OrderId = orderId,
create Module.CustomerInfo_OrderResponse/Module.CustomerInfo = customer {
Name = name,
Email = email
},
create Module.OrderItem_OrderResponse/Module.OrderItem = items {
Sku = sku,
Quantity = quantity,
Price = price
}
}
};Mendix stores two properties here, not one: how to get the object, and what
to do when a find comes up empty. Both are yours to choose.
| Syntax | Meaning |
|---|---|
create Module.Entity | Always create a new object (default) |
find Module.Entity or create | Find by KEY, create one if not found |
find Module.Entity or error | Find by KEY, fail the import if not found |
find Module.Entity or ignore | Find by KEY, skip the element if not found |
find or create Module.Entity | The older spelling of find … or create |
Append overridable to let the caller override the backup at import time:
find Module.PetResponse or create overridable.
mdl 1;
create import mapping Module.IMM_UpsertPet
with json structure Module.JSON_Pet
{
find Module.PetResponse or create {
PetId = id key,
Name = name,
status = status
}
};A bare find is refused. Which of the three you get is a real runtime
difference, and mxcli used to pick create for you whatever the document said —
so it now asks rather than guessing.
A find has two requirements, and mxcli check enforces both (ako/mxcli#253):
key, per searching element — nested ones
included. Without it there is nothing to search on: CE0250, reported as
MDL-MAP02. (key is only valid with find; on a create it means nothing.)MDL-MAP03. Persistability
comes from the generalization chain, not the entity's own flag — an entity
declared with plain create entity that extends a non-persistent parent is
still not searchable.Re-measuring these is easy to get wrong: mxbuild reports one at a time. A
keyless find over a non-persistent entity is CE0250 only, and CE0251 appears
only once a key exists.
A custom handler is exempt from both — the microflow is the find, so there is no key to declare and no query to run.
A microflow can resolve the object instead of Create/Find. Write it as by on
the element; the microflow's parameters are named with their sources:
| Source | Means |
|---|---|
parent | the enclosing mapped object |
parameter | the mapping's own input object |
parent(2) | an ancestor N levels up |
a/b/c | a value from the payload, addressed like any other member |
parameter needs the mapping to declare an input object, which is a clause on
the header — import mappings only:
mdl 1;
create import mapping Module.IMM_Embed
with json structure Module.JSON_Embed
parameter GenAICommons.ChunkCollection
{
create GenAICommons.ChunkCollection {
Name = id,
find Module.Chunk_ChunkCollection/GenAICommons.Chunk
by Module.MF_FindChunk ( Collection: parameter, Index: idx )
= embeddings {
Text = text
}
}
};Using parameter without declaring one is refused — the build reports it as
CE0279. The declared entity must match the microflow's parameter type, which the
build checks as CE0282.
Export mappings require entities that mirror the JSON structure. Arrays need an intermediate container entity:
mdl 1;
-- Root entity (matches top-level JSON object)
create non-persistent entity Module.ExRoot (
OrderId: integer
);
-- Nested object entity (1-1 relationship, use OWNER Both)
create non-persistent entity Module.ExCustomer (
Name: string,
Email: string
);
-- Array CONTAINER entity (no attributes, just links parent to items)
create non-persistent entity Module.ExItems;
-- Array ITEM entity (attributes for each array element)
create non-persistent entity Module.ExItemsItem (
Sku: string,
Quantity: integer,
Price: decimal
);
-- Associations: child FROM, parent TO
create association Module.ExCustomer_ExRoot
from Module.ExCustomer
to Module.ExRoot
owner both; -- 1-1 for nested objects
create association Module.ExItems_ExRoot
from Module.ExItems
to Module.ExRoot; -- 1-* for arrays
create association Module.ExItemsItem_ExItems
from Module.ExItemsItem
to Module.ExItems; -- 1-* for array itemsmdl 1;
create export mapping Module.EMM_Pet
with json structure Module.JSON_Pet
{
Module.PetResponse {
id = PetId,
name = Name,
status = status
}
};Arrays have TWO levels: container entity + item entity:
mdl 1;
create export mapping Module.EMM_Order
with json structure Module.JSON_Order
{
Module.ExRoot {
orderId = OrderId,
Module.ExCustomer_ExRoot/Module.ExCustomer as customer {
name = Name,
email = Email
},
Module.ExItems_ExRoot/Module.ExItems as items {
Module.ExItemsItem_ExItems/Module.ExItemsItem as ItemsItem {
sku = Sku,
quantity = Quantity,
price = Price
}
}
}
};create export mapping Module.EMM_Pet
with json structure Module.JSON_Pet
null values SendAsNil -- or LeaveOutElement (default)
{
...
};A mapping does not have to start at the top of the JSON. root a/b/c on the
source clause selects the element it starts at, and the path may pass through
arrays — the mapping is then rooted at the array's item, so it yields one
object per entry.
mdl 1;
create import mapping RootDemo.IMM_Choices
with json structure RootDemo.JSON_Completion root response/choices/message
{ create RootDemo.Message { Role = role, Content = content } };Worked examples, the array-crossing rule and what it does to a call's cardinality: reference/mapping-root-selection.md.
-- With result variable (non-persistent entities)
$PetResponse = import from mapping Module.IMM_Pet($JsonContent);
-- Without result variable (persistent entities, stores to DB)
import from mapping Module.IMM_Pet($JsonContent);Optional trailing clause, matching Studio Pro's All / First / Custom setting
on the activity. Omitting it means All; whether the variable is an object or
a list is inferred from the mapping's own root shape, as it always has.
describe leaves all off an object result (writing it there reads as "returns
a list") and prints it for a list result — the two spellings store the same
activity.
$Pets = import from mapping Module.IMM_Pets($Json) all; -- All (the default)
$Pet = import from mapping Module.IMM_Pets($Json) first; -- First: ONE object
$Page = import from mapping Module.IMM_Pets($Json) limit 10; -- Custom
$Page = import from mapping Module.IMM_Pets($Json) limit 10 offset 5;first is a separate word from limit 1 on purpose: limit 1 is a list of
one, first binds a single object, so the result variable's type differs.
Two things the range does not do:
all on one is Studio Pro's own default,
and the blank app ships one (FeedbackModule.SUB_Feedback_PostToAppInsights).
Only first narrows a list mapping to a single object.offset is not accepted everywhere. Mendix rejects it with
CE6100 ("This entity does not support offset") unless the mapping's root
is a list; limit alone is fine either way. Verified on mxbuild 11.6.6.first is not for an object-rooted mapping. It narrows a list; on a
mapping that already returns one object it builds clean (mx check: 0
errors) and the activity throws at runtime. mxcli check refuses it,
and offset on such a mapping, as MDL-MAP04 — drop the range.$JsonOutput = export to mapping Module.EMM_Pet($PetResponse);mdl 1;
create microflow Module.ProcessData ()
begin
declare $json string = $latestHttpResponse/content;
$PetResponse = import from mapping Module.IMM_Pet($json);
-- Process...
$Output = export to mapping Module.EMM_Pet($PetResponse);
log info node 'Integration' 'Result: ' + $Output;
end;list import mappings [in module];
list export mappings [in module];
describe import mapping Module.Name;
describe export mapping Module.Name;
drop import mapping Module.Name;
drop export mapping Module.Name;Export mappings work on non-persistent entity (NPE) structures that mirror the target JSON. When the source data is in persistent entities (PE) in the database, the typical workflow is:
mdl 1;
-- Example: build NPE tree from persistent Order data, then export
create microflow Module.ExportOrder ($Order: Module.Order)
returns string as $json
begin
-- Build the NPE tree matching the JSON structure
$Root = create Module.ExRoot (OrderId = $Order/OrderId);
retrieve $Customer from $Order/Module.Order_Customer;
$ExCust = create Module.ExCustomer (Name = $Customer/Name, Email = $Customer/Email);
-- Link customer to root...
-- Export
$json = export to mapping Module.EMM_Order($Root);
return $json;
end;View Entities (OQL-backed) can retrieve data directly into the export-ready structure, skipping the manual NPE assembly:
mdl 1;
create view entity Module.ExOrderView (
OrderId: integer,
CustomerName: string,
CustomerEmail: string
) as (
select o.OrderId as OrderId, c.Name as CustomerName, c.Email as CustomerEmail
from Module.Order as o
join o/Module.Order_Customer/Module.Customer as c
);This can reduce the microflow to a single retrieve + export step.
One worked example — structures, import of a single object and of a list, export
in both directions, and the microflow that ties them together — is in
reference/rest-api-example.md.
Every one of these documents takes a folder clause on create, straight after
the qualified name. Missing folders in the path are created:
mdl 1;
create json structure Sales.JSON_Order folder 'Private/JSON structures'
sample '{"id": 1, "total": 9.99}';
create import mapping Sales.IMM_Order folder 'Private/Import mappings'
with json structure Sales.JSON_Order
{
create Sales.Order { OrderId = id, Total = total }
};On create or modify the clause moves an existing document. Omitting it
leaves placement alone — it never returns a document to the module root — so
adding a folder to an existing script is safe and removing one is a no-op.
describe emits the clause, so a description replays into the same folder.
See organize-project for move and the full folder story.
| Mistake | Fix |
|---|---|
| Reusing import domain model for export | Export needs separate entities mirroring JSON structure |
| Association direction wrong | Always FROM child TO parent (child owns FK) |
Using owner default for 1-1 nested objects in export | Use owner both for 1-1 relationships |
| Missing array container entity in export | Arrays need Container + Item entities |
Using key with create handling | key only valid with find |
find without or create / or error / or ignore | Say what happens when the object is not found — the three differ at runtime |
find with no member marked key (MDL-MAP02) | Mark the identifying member — a search needs something to search on (CE0250) |
find over a non-persistent entity (MDL-MAP03) | Use create, or make the entity persistent — a search is a database query (CE0251) |
Param: parameter with no parameter Module.Entity on the header | Declare the mapping's input object, or the build reports CE0279 |
parameter on an EXPORT mapping | Export mappings have no input object — their parameter is the root object |
| Arrays in import with container entity | Import arrays map directly to item entity, no container |
© 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
SKILL.md and 3 other files in .claude/skills/mendix/json-structures-and-mappings of mendixlabs/mxcli.
Open the folder on GitHubat commit a924d11
JSON Structures And Mappings 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| JSON Structures And Mappings this skillmendixlabs/mxcli | 128 | — | ~5.4k | Automated safety check: Pass | Apache-2.0 | |
| Importasgeirtj/system_prompts_leaks | 69k | — | ~3.5k | Automated safety check: Pass | CC0-1.0 | |
| Import Exportlive-codes/livecodes | 1.5k | — | ~1.5k | Automated safety check: Pass | MIT | |
| Import ExportAHS12/thoth-blueprint | 626 | — | ~499 | Automated safety check: Pass | GPL-3.0 | |
| Hns Oss Docs Structure Mapmodu-ai/moai-adk | 1.2k | — | ~866 | Automated safety check: Notes | Apache-2.0 | |
| Import Memoryasgeirtj/system_prompts_leaks | 69k | — | ~2.7k | Automated safety check: Warn | CC0-1.0 |
asgeirtj/system_prompts_leaks
Handle explicit /import requests for read-only transcript recovery and a resume checkpoint, or continue work from other coding agents and unnamed artifacts.
live-codes/livecodes
Import code from GitHub gists/files/repos, GitLab, URLs, DOM, and local files.
AHS12/thoth-blueprint
Change SQL, SQLite worker, DBML, JSON, Mermaid, SVG, or database export/import flows while preserving diagram semantics and round trips.
modu-ai/moai-adk
docs-site structure map for the oss-docs harness structure-curator: exact paths and schemas for hugo.toml, per-locale content/<locale/meta.yaml, data/menu/main.yaml (4-locale name maps + icon…
asgeirtj/system_prompts_leaks
Import a memory export from another AI assistant into Claude's memory — conversationally, additively, and with the content treated as data.
nexu-io/open-design
Map an extracted Figma / source-code token bag onto the active OD design system, producing a deterministic mapping the generate stage can consume.
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…
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.
mendixlabs/mxcli
Author Mendix AI agent documents in MDL — Model, Knowledge Base, Consumed MCP Service and Agent, with variables, tools and multi-line prompts.
mendixlabs/mxcli
Run set-based INSERT, UPDATE and DELETE against Mendix entities through OQL statements, which the runtime supports and Studio Pro cannot author.
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.
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.
Create and manage JSON structures, import mappings and export mappings in MDL, plus the domain-model shapes they map onto. JSON Structures And Mappings is an agent skill from mendixlabs/mxcli. Create and manage JSON structures, import mappings and export mappings in MDL, plus the domain-model shapes they map onto.
JSON Structures And Mappings fits situations like: turning a JSON payload into entities; exporting objects as JSON.
Run `npx skills add mendixlabs/mxcli --skill json-structures-and-mappings -a claude-code`. Or copy the skill folder (.claude/skills/mendix/json-structures-and-mappings in mendixlabs/mxcli) into .claude/skills/json-structures-and-mappings in your project. Claude Code loads it when a task matches its description.
Run `npx skills add mendixlabs/mxcli --skill json-structures-and-mappings -a codex`. Or copy the skill folder (.claude/skills/mendix/json-structures-and-mappings in mendixlabs/mxcli) into .agents/skills/json-structures-and-mappings in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add mendixlabs/mxcli --skill json-structures-and-mappings -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/json-structures-and-mappings, .gemini/skills/json-structures-and-mappings, .github/skills/json-structures-and-mappings and .opencode/skills/json-structures-and-mappings in your project.
SKILL.md names no scripts, command-line tools or credentials: JSON Structures And Mappings is instructions for the agent only.
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.
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.
JSON Structures And Mappings 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.
About 5.4k tokens (SKILL.md is roughly 22k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with JSON Structures And Mappings: Import (asgeirtj/system_prompts_leaks, 69k stars), Import Export (live-codes/livecodes, 1.5k stars), Import Export (AHS12/thoth-blueprint, 626 stars) and Hns Oss Docs Structure Map (modu-ai/moai-adk, 1.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
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.