write-oql-queries

write-oql-queries is a skill for Claude Code from mendixlabs/mxcli. It costs 44 tokens per session (6,813 once invoked), scanned A, original, Apache-2.0.

A guide to writing OQL queries for Mendix view entities, which present calculated or combined data for reports and analytics.

In plain words
What is it for?
Use it to create view entities, reports, analytics queries, joins, aggregates, and calculated data fields.
Why use it?
It helps avoid query syntax errors when joining data, grouping results, calculating fields, or filtering counts.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Good fit Use it to create view entities, reports, analytics queries, joins, aggregates, and calculated data fields.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mendixlabs/mxcli/write-oql-queries
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.

Any agent
npx skills add mendixlabs/mxcli --skill write-oql-queries
Clone the repo
git clone --depth 1 https://github.com/mendixlabs/mxcli

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for write-oql-queries

README.md
[![agentmods](https://agentmods.dev/badge/skills/mendixlabs/mxcli/write-oql-queries/github.svg)](https://agentmods.dev/skills/mendixlabs/mxcli/write-oql-queries)
Your own site
<a href="https://agentmods.dev/skills/mendixlabs/mxcli/write-oql-queries"><img src="https://agentmods.dev/badge/skills/mendixlabs/mxcli/write-oql-queries/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for write-oql-queries

Your own site · 80×15
<a href="https://agentmods.dev/skills/mendixlabs/mxcli/write-oql-queries"><img src="https://agentmods.dev/badge/skills/mendixlabs/mxcli/write-oql-queries.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 44 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 6,813 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 4 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Privilege Escalation · line 489
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • medium MCP Rug Pull · line 502
    Docker image references without a specific tag (:latest is implicit) or digest (@sha256:...) can be silently replaced by a malicious image.
    Fix: Pin the image: image:tag or image@sha256:abc123
  • medium MCP Rug Pull · line 506
    Docker image references without a specific tag (:latest is implicit) or digest (@sha256:...) can be silently replaced by a malicious image.
    Fix: Pin the image: image:tag or image@sha256:abc123
  • medium MCP Rug Pull · line 514
    Docker image references without a specific tag (:latest is implicit) or digest (@sha256:...) can be silently replaced by a malicious image.
    Fix: Pin the image: image:tag or image@sha256:abc123
How audits are shown
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.1 $0.00044 $0.06813
Opus 5.5 $0.00018 $0.02725
Sonnet 5.5 $0.00009 $0.01363
Haiku 4.5 $0.00004 $0.00681

Measured 8d ago against content hash 5c55fbea60e6, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

write-oql-queries 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 8d ago.

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/write-oql-queries/SKILL.md · 696 lines

How it starts

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

Find it fast

sed -n '<from>,<to>p' SKILL.md one section rather than reading the file; ./mxcli syntax <topic> answers how do I write this for a fraction of either.

lines section
27-32 Reference files
33-35 Purpose
36-42 When to Use This Skill
43-378 Critical OQL Syntax Rules
379-515 Step-by-Step Process
516-611 Common Mistakes to Avoid
612-643 Testing OQL Queries
644-662 Integration with MDL Linter
663-670 References
671-695 Summary Checklist

Skill: Write OQL Queries for Mendix VIEW Entities

Reference files

  • reference/patterns.md — the recurring OQL shapes (aggregation, joins across associations, date bucketing, ranking, filtered counts) and a full worked query, to adapt rather than derive.

Purpose

Generate correct OQL (Object Query Language) queries for Mendix VIEW entities. This skill helps you create VIEW entities with proper OQL syntax that will execute successfully in Mendix runtime.

When to Use This Skill

  • User asks to create a VIEW entity
  • User requests help with OQL queries
  • User wants to create analytics, reports, or aggregated data views
  • User needs to join entities or create calculated fields
  • You encounter OQL syntax errors when creating VIEW entities

Critical OQL Syntax Rules

0. VIEW Entity Best Practices (CRITICAL)

RULE 1: All SELECT columns MUST have explicit AS aliases

Every column in the SELECT clause must have an alias that matches the entity attribute name:

-- ❌ WRONG - Missing aliases
create view entity Finance.CashFlowProjection (
  ProjectionDate: datetime,
  ProjectedIncome: decimal,
  ProjectedExpense: decimal
) as (
  select
    fl.ForecastDate,              -- Missing AS alias
    fl.ProjectedIncome,           -- Missing AS alias
    fl.ProjectedExpense           -- Missing AS alias
  from Finance.ForecastLine as fl
);

Read the full file on GitHub · 696 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 8d ago Changed · +19 lines 5c55fbea60e6
  2. 15d ago Changed · +32 lines 4a41611a6143
  3. 18d ago Changed · +5 lines fdfb79df68dd
  4. 1mo ago Changed · +5 lines e4cf6cda6bc8
  5. 1mo ago Changed · +69 lines 8a6cc967ebfd
  6. 1mo ago First seen · 566 lines · 44 tokens per session scan A ee3b1a8d571c

Subscribe to this mod's changes

write-oql-queries is a skill published in the GitHub repository mendixlabs/mxcli (131 stars, last pushed yesterday), licensed Apache-2.0. It adds 44 tokens to every session and 6,813 once invoked, about $0.0002 per session on Opus 5.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-09-03.

Related

Other skills, from other repositories

hatch3r-migration

Plans and executes migrations for databases, frameworks, and dependencies. Covers breaking change analysis, phased rollout, and rollback procedures.

hatch3r/hatch3r · 31 tokens

nosql-database-design

Designs a NoSQL data model by leading with access pattern analysis. Covers DynamoDB single-table design (PK/SK/GSI) and MongoDB embedding vs referencing, consistency models, and capacity planning. Invoked when the user asks to design a DynamoDB schema, MongoDB data model, or NoSQL data model.

soulcodex/agentic · 71 tokens

relational-database-design

Designs or reviews a relational database schema for a given domain. Covers table structure, normalization, indexes, constraints, and migration strategy. Invoked when the user asks to design a schema, review a database structure, or optimize a data model.

soulcodex/agentic · 55 tokens

sql-query-optimization

Diagnoses and optimises slow SQL queries using EXPLAIN ANALYZE. Covers identifying bottlenecks (sequential scans, bad estimates, heap fetches), index strategy, query rewrites, and verification. Invoked when the user asks to optimize a query, fix a slow database query, or improve database performance.

soulcodex/agentic · 70 tokens

sql-database

Safe schema-aware SQL querying against CSV/Parquet/JSON files, SQLite databases, and live Postgres. Use when querying structured data, profiling a schema, or building data pipelines.

jnotsknab/mux-swarm · 41 tokens

airtable

Airtable REST API via curl. Records CRUD, filters, upserts.

StarryCod/cogitum · 19 tokens