Agent skill

Odata Data Sharing

by mendixlabs in mendixlabs/mxcli

Share data between Mendix apps over OData — published services, view entities as an abstraction layer, consumed clients and external entities.

Apache-2.0Auto-check passed

Install Odata Data Sharing

skills CLI
$ npx skills add mendixlabs/mxcli --skill odata-data-sharing -a claude-code

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

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

At a glance

Share data between Mendix apps over OData — published services, view entities as an abstraction layer, consumed clients and external entities.

  • Works in 5 steps: Stable API contract -- the view's shape… → Flattened data -- joins across multiple… → Computed fields -- add calculated… → …
  • Exposing data from one app to another
  • SKILL.md covers Reference files, When to Use This Skill, MetadataUrl Formats and Refreshing the Cached Contract, plus 7 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Odata Data Sharing is an agent skill from mendixlabs/mxcli. Share data between Mendix apps over OData — published services, view entities as an abstraction layer, consumed clients and external entities. Use when exposing data from one app to another, consuming another app's OData service, or refreshing a cached contract.

Its SKILL.md is about 3.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files (for example `reference/errors-and-auth.md` and `reference/walkthroughs.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.

When your agent uses it

  • Exposing data from one app to another
  • Consuming another apps OData service
  • Refreshing a cached contract

Example prompts

  • “/odata-data-sharing”

Workflow steps

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

  1. Stable API contract -- the view's shape stays the same even when the underlying tables change
  2. Flattened data -- joins across multiple tables into a single flat resource (e.g., Customer + BillingAddress + DeliveryAddress into one…
  3. Computed fields -- add calculated columns like FullAddress or ActivePrice using OQL expressions
  4. Filtered datasets -- restrict what's visible (e.g., only active products, cheap products)
  5. Aggregations -- expose pre-aggregated metrics (e.g., orders per day, sum of line items)

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

Odata Data Sharing loads about 3.3k tokens when it runs. Until then it costs about 70 tokens; SKILL.md has 1,044 words of instructions outside code blocks.

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

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). 1,044 words, ~3,286 tokens.

Download SKILL.mdSave it as .claude/skills/odata-data-sharing/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
odata-data-sharing
description
Share data between Mendix apps over OData — published services, view entities as an abstraction layer, consumed clients and external entities. Use when exposing data from one app to another, consuming another app's OData service, or refreshing a cached contract.

OData Data Sharing Between Mendix Apps

This skill covers how to use OData services to share data between Mendix applications, with emphasis on using view entities as an abstraction layer to decouple the API contract from the internal domain model.

Reference files

SKILL.md covers the architecture, the contract rules, and the conventions. The long build-outs are next door:

  • reference/walkthroughs.md — four complete builds, start to finish: a read-only API behind view entities, a non-persistable published entity, a read-write API with microflow handlers, publishing a microflow as an OData action, and the GraphQL variant.
  • reference/errors-and-auth.md — which HTTP status each capability can actually return, the authentication methods and what Basic auth costs, and the configuration microflow for custom headers.

When to Use This Skill

  • User asks to expose data from one Mendix app to another
  • User wants to set up inter-app communication via OData
  • User needs to create an API layer that abstracts internal entities
  • User asks about external entities, consumed/published OData services
  • User wants to decouple modules or apps for independent deployment
  • User asks about the view entity pattern for OData services
  • User asks about local metadata files or offline OData development

MetadataUrl Formats

CREATE CONSUMED ODATA SERVICE supports three formats for the MetadataUrl parameter:

FormatExampleStored In Model
HTTP(S) URLhttps://api.example.com/odata/v4/$metadataUnchanged
Absolute file:// URIfile:///Users/team/contracts/service.xmlUnchanged
Relative path./metadata/service.xml or metadata/service.xmlNormalized to absolute file://

Path Normalization:

  • Relative paths (with or without ./) are automatically converted to absolute file:// URLs in the Mendix model
  • This ensures Studio Pro can properly detect local file vs HTTP metadata sources (radio button in UI)
  • Example: ./metadata/service.xml → file:///absolute/path/to/project/metadata/service.xml

Path Resolution (before normalization):

  • With project loaded (-p flag or REPL): relative paths are resolved against the .mpr file's directory
  • Without project: relative paths are resolved against the current working directory

Refreshing the Cached Contract

mxcli caches the $metadata document in the client so the model rebuilds without the service running. That cache is a snapshot, and a consumed service that gains entity sets makes it stale — the file on disk has five, the client still answers three.

CREATE OR MODIFY CONSUMED ODATA SERVICE re-reads the contract every time it runs, so refreshing is a re-run of the statement you already have:

mdl
mdl 1;
-- after refreshing ./contracts/live-now-metadata.xml from the running backend
CREATE OR MODIFY CONSUMED ODATA SERVICE F1Now.NowApi (
  ODataVersion: OData4,
  MetadataUrl: './contracts/live-now-metadata.xml',
  Timeout: 300,
  ServiceUrl: F1Now.ApiLocation
);

Read the verb it prints — it tells you which happened:

OutputMeaning
Modified OData client: … + Refreshed $metadata: 5 entity types, 0 actionsThe contract changed and the client now carries the new one
Unchanged OData client: …The contract is identical, so nothing was written
Warning: could not refresh $metadata: …The contract could not be read; the previously cached one is kept, so re-run once it is reachable

Then re-import: CREATE OR MODIFY EXTERNAL ENTITIES FROM F1Now.NowApi maps the new entity sets. Do not DROP CONSUMED ODATA SERVICE and recreate it to force a refresh — that invalidates the client ID the existing external entities point at.

Note that ALTER CONSUMED ODATA SERVICE … SET ( MetadataUrl: … ) does not re-fetch. Use CREATE OR MODIFY when the contract is what changed.

describe prints a client and an external entity as create or modify …, and re-running that output changes nothing: the rewrite keeps what it cannot print (the client's icon, UseQuerySegment, the catalog and proxy settings; each attribute's OData mapping). An external entity's attribute types are the service's, not the script's: declaring another (OrderId: String(20) for an Edm.Int64 property) is CE6616 in mx check. Under mdl 1 that statement is refused with nothing written; without the header it still writes, with warning MDL-V1-REMOTETYPE.

Use Cases for Local Metadata:

  • Offline development — no network access required
  • Testing and CI/CD — reproducible builds with metadata snapshots
  • Version control — commit metadata files alongside code
  • Pre-production — test against upcoming API changes before deployment
  • Firewall-friendly — works in locked-down corporate environments
Show full SKILL.md (431 more words)Show less

ServiceUrl Must Be a Constant

IMPORTANT: The ServiceUrl parameter must always be a constant reference (prefixed with @). Direct URLs are not allowed.

Correct:

sql
mdl 1;
CREATE CONSTANT ProductClient.ProductDataApiLocation
  ( Type: String, DefaultValue: 'http://localhost:8080/odata/productdataapi/v1/' );

CREATE CONSUMED ODATA SERVICE ProductClient.ProductDataApiClient (
  ODataVersion: OData4,
  MetadataUrl: 'https://api.example.com/$metadata',
  ServiceUrl: ProductClient.ProductDataApiLocation  -- ✅ Constant reference
);

Incorrect:

sql
mdl 1;
CREATE CONSUMED ODATA SERVICE ProductClient.ProductDataApiClient (
  ODataVersion: OData4,
  MetadataUrl: 'https://api.example.com/$metadata',
  ServiceUrl: 'https://api.example.com/odata'  -- ❌ Direct URL not allowed
);

This enforces Mendix best practice of externalizing configuration values for different environments.

Architecture Overview

OData data sharing follows a producer/consumer pattern with three layers:

┌─────────────────────────────────────────────┐
│  PRODUCER APP                               │
│                                             │
│  persistent entities  ──▶  view entities    │
│  (Shop.Customer,          (Api.CustomerVE)  │
│   Shop.Address)                             │
│                          ▼                  │
│                    odata service             │
│                   (Api.CustomerApi)          │
└──────────────────────┬──────────────────────┘
                       │ HTTP/OData4
┌──────────────────────▼──────────────────────┐
│  CONSUMER APP                               │
│                                             │
│                    odata client             │
│                  (Client.CustomerApiClient)  │
│                          ▼                  │
│                  external entities           │
│                 (Client.CustomersEE)         │
│                          ▼                  │
│                  pages & microflows          │
└─────────────────────────────────────────────┘
Why View Entities?

Publishing persistent entities directly exposes your internal schema. When you change a column name, add a table, or restructure associations, every consumer app breaks. View entities solve this:

  1. Stable API contract -- the view's shape stays the same even when the underlying tables change
  2. Flattened data -- joins across multiple tables into a single flat resource (e.g., Customer + BillingAddress + DeliveryAddress into one CustomerAddressVE)
  3. Computed fields -- add calculated columns like FullAddress or ActivePrice using OQL expressions
  4. Filtered datasets -- restrict what's visible (e.g., only active products, cheap products)
  5. Aggregations -- expose pre-aggregated metrics (e.g., orders per day, sum of line items)

API Versioning

When your API contract changes, create a new version rather than breaking existing consumers:

sql
-- v1: Original API (keep running for existing consumers)
create published odata service ProductApi.ProductDataApi (
  path: 'odata/productdataapi/v1/',
  version: '1.0.0',
  ...
);

-- v2: New version with additional fields
create published odata service ProductApi.ProductDataApi_v2 (
  path: 'odata/productdataapi/v2/',
  version: '2.0.0',
  ODataVersion: OData4,
  ServiceName: 'ProductDataApi',
  Summary: 'Product API v2 - includes weight and tags',
  ...
)
authentication basic
{
  publish entity ProductApi.ProductWithPriceAndTagsVE as 'Product' (
    ReadMode: ReadFromDatabase,
    InsertMode: microflow ProductApi.InsertProductV2,
    UpdateMode: microflow ProductApi.UpdateProductV2,
    DeleteMode: microflow ProductApi.DeleteProductV2
  )
  expose (...);
};

Folder Organization

Use the Folder property to organize OData documents within modules.

MetadataUrl accepts three formats:

  1. HTTP(S) URL — fetches from remote service (production)
  2. file:///absolute/path — reads from local absolute path
  3. ./path or path/file.xml — reads from local relative path (resolved against .mpr directory)
sql
-- Format 1: HTTP(S) URL
create consumed odata service ProductClient.ProductDataApiClient folder 'Integration/ProductAPI' (
  ODataVersion: OData4,
  MetadataUrl: 'https://api.example.com/odata/v4/$metadata'
);

-- Format 2: Absolute file:// URI
create consumed odata service ProductClient.ProductDataApiClient folder 'Integration/ProductAPI' (
  ODataVersion: OData4,
  MetadataUrl: 'file:///Users/team/contracts/productdataapi.xml'
);

-- Format 3a: Relative path with ./
create consumed odata service ProductClient.ProductDataApiClient folder 'Integration/ProductAPI' (
  ODataVersion: OData4,
  MetadataUrl: './metadata/productdataapi.xml'
);

-- Format 3b: Relative path without ./
create consumed odata service ProductClient.ProductDataApiClient folder 'Integration/ProductAPI' (
  ODataVersion: OData4,
  MetadataUrl: 'metadata/productdataapi.xml'
);

create published odata service ProductApi.ProductDataApi (
  path: 'odata/productdataapi/v1/',
  version: '1.0.0',
  ODataVersion: OData4,
  folder: 'Integration/APIs'
)
authentication basic
{ ... };

Folders are created automatically if they don't exist. Use / for nested folders.

Module Organization Conventions

Follow this naming convention for clean separation:

ModulePurposeContains
ShopCore domainPersistent entities, business logic
ShopApi or ShopViewsAPI layer (producer)View entities, OData service, CUD microflows
ShopClient or ShopViewsClientAPI consumerOData client, external entities, client constants

This keeps the API contract separate from the domain logic, and the consumer separate from the producer.

Checklist

Before publishing:

  • View entities expose only the fields consumers need (no internal IDs unless needed for writes)
  • View entity has at least one key field for OData identity
  • Module role created and granted on view entities (READ, optionally WRITE)
  • OData service has AUTHENTICATION set (Basic, Session, or Microflow)
  • GRANT ACCESS ON PUBLISHED ODATA SERVICE to the API module role
  • CUD microflows (if writable) accept ($ViewEntity, $HttpRequest) parameters
  • CUD microflows granted EXECUTE to the API module role

Before consuming:

  • Location constant created for environment-specific URLs
  • OData client MetadataUrl points to either:
    • HTTP(S) URL: https://api.example.com/$metadata
    • Local file (absolute): file:///path/to/metadata.xml
    • Local file (relative): ./metadata/service.xml (resolved against .mpr directory)
  • OData client uses ServiceUrl: Module.Constant for runtime endpoint
  • External entities match the published exposed names and types
  • Module role created and granted on external entities (READ, optionally CREATE/WRITE/DELETE)

Exploration Commands

Use these commands to inspect existing OData setup in a project:

sql
-- List all published and consumed services
list published odata services;
list consumed odata services;

-- Inspect a specific service
describe published odata service ShopViews.ShopViewsApi;
describe consumed odata service ShopViewsClient.ShopViewsApiClient;

-- See external entities and view entities
list entities in ShopViewsClient;
list external entities;
list external actions;

-- Browse available assets from cached $metadata contract
list contract entities from ShopViewsClient.ShopViewsApiClient;
list contract actions from ShopViewsClient.ShopViewsApiClient;
describe contract entity ShopViewsClient.ShopViewsApiClient.Product;
describe contract entity ShopViewsClient.ShopViewsApiClient.Product format mdl;

-- Check security setup
list access on odata service ShopViews.ShopViewsApi;
list module roles in ShopViews;

© 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

SKILL.md and 2 other files in .claude/skills/mendix/odata-data-sharing of mendixlabs/mxcli.

  • SKILL.md
  • reference/errors-and-auth.md
  • reference/walkthroughs.md

Open the folder on GitHubat commit a924d11

Compare with similar skills

Odata Data Sharing 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.

Odata Data Sharing compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Odata Data Sharing this skillmendixlabs/mxcli128—~3.3kAutomated safety check: PassApache-2.0
Deslop Shared Libsgarrytan/gstack136k—~3.3kAutomated safety check: NotesMIT
Skill Sharedavila7/claude-code-templates32k10 repos~729Automated safety check: PassMIT
Tabler Shared Lib Helperstabler/tabler42k—~1.2kAutomated safety check: PassMIT
Share Buttonsthedaviddias/Front-End-Checklist74k—~565Automated safety check: PassMIT
Shared SchemasInsForge/InsForge13k—~628Automated safety check: PassApache-2.0

Similar skills

  • Deslop Shared Libs

    garrytan/gstack

    Find worthwhile shared-code extractions in recent work. An agent skill from garrytan/gstack.

    136k GitHub stars~3.3k tokensUpdated yesterday
    Writing & ContentAuto-check: notes
  • Skill Share

    davila7/claude-code-templates

    A skill that creates new Claude skills and automatically shares them on Slack using Rube for seamless team collaboration and skill discovery.

    32k GitHub starsUsed in 10 repos~729 tokens
    Agent WorkflowsAuto-check passed
  • Moves logic out of Astro frontmatter into tested helper modules under shared/lib, with rules for naming, typing, deterministic demo data and sibling test files.

    42k GitHub stars~1.2k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Share Buttons

    thedaviddias/Front-End-Checklist

    A skill your agent uses when applies to blog posts, news articles, tutorials, and other long-form content.

    74k GitHub stars~565 tokensUpdated yesterday
    Writing & ContentAuto-check passed
  • Shared Schemas

    InsForge/InsForge

    A skill your agent uses when contributing to InsForge's shared schema package.

    13k GitHub stars~628 tokensUpdated yesterday
    Frontend & DesignAuto-check passed
  • Share Skills

    spinabot/brigade

    Explains how a skill folder should be laid out and bundled as a tar archive for sharing, with a checklist covering name, description and eligibility keys.

    11k GitHub stars~759 tokensUpdated 4 days ago
    Agent WorkflowsAuto-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 Odata Data Sharing

What does Odata Data Sharing do?

Share data between Mendix apps over OData — published services, view entities as an abstraction layer, consumed clients and external entities. Odata Data Sharing is an agent skill from mendixlabs/mxcli. Share data between Mendix apps over OData — published services, view entities as an abstraction layer, consumed clients and external entities.

When should I use Odata Data Sharing?

Odata Data Sharing fits situations like: exposing data from one app to another; consuming another apps OData service; refreshing a cached contract.

How do I install Odata Data Sharing in Claude Code?

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

How do I install Odata Data Sharing in Codex?

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

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

What does Odata Data Sharing need to run?

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

Does Odata Data Sharing 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 Odata Data Sharing 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 Odata Data Sharing use?

Odata Data Sharing 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 Odata Data Sharing use?

About 3.3k tokens (SKILL.md is roughly 13k 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 Odata Data Sharing?

Skills that share tags, products or a category with Odata Data Sharing: Deslop Shared Libs (garrytan/gstack, 136k stars), Skill Share (davila7/claude-code-templates, 32k stars), Tabler Shared Lib Helpers (tabler/tabler, 42k stars) and Share Buttons (thedaviddias/Front-End-Checklist, 74k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Odata Data Sharing?

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.