| name | mx-search |
| description | Fast structured search across a local Mendix project. Read-only. Wraps mxcli's search and SQL-like select to answer questions like "find every microflow that references entity Customer", "which pages bind to entity X", "what microflows have empty error handlers". Auto-invoke when the user asks a model-spanning question that grep on .mpr (binary) cannot answer. Also invocable as /mx-search <query>. |
mx-search
Read-only structured query against a local Mendix project. Replaces "open Studio Pro and click around" with "ask a question in plain English, get a precise answer."
North star
The .mpr is queryable; treat it like a database.
mxcli exposes search (text-style) and select (SQL-like over project metadata tables). Together they answer 80% of "where in this project is X used / defined / referenced" questions in seconds.
When to invoke
Auto-invoke when:
- A question requires walking the project model (not just one file).
- Neo asks "find every X that does Y" / "which Z references W" / "what microflows match pattern P."
- A user is debugging across modules and grep-on-binary won't work.
Do not invoke for:
- Single-file questions that grep on a
.json or .txt answers fine.
- Pure documentation / wiki questions.
What it does
-
Verify environment. mxcli --version, cwd has *.mpr, project openable.
-
Translate the question into mxcli queries. Common patterns:
| Question | mxcli query |
|---|
| "What references entity X?" | mxcli refs <Module.Entity> (better) or mxcli search <Entity> |
| "Which microflows return Decimal?" | mxcli select "microflow.return_type = 'Decimal'" |
| "Which microflows have empty error handlers?" | mxcli select against the error-handler table |
| "What pages bind to entity X?" | mxcli select "page.data_source.entity = '<Module.Entity>'" |
| "Which Java actions are unused?" | mxcli refs <JavaAction> filtered to zero-result actions |
| "Where is constant C used?" | mxcli refs <Module.Constant> |
| "Which security roles grant access to entity X?" | mxcli select against the access rules table |
-
Run the query. Show the actual command that ran (so Neo can repeat it manually).
-
Synthesize the answer.
## /mx-search "<question>"
**Translated to:** `mxcli <command>`
**Results (N):**
- <Module.Item> -- <kind> -- <one-line context>
**Refinements you might want:**
- <suggested narrowing query if N is large>
- <suggested broadening if N is zero>
- Stop. Read-only. No writes.
Hard rules
- Show the actual mxcli command that ran. Reproducibility. Neo should be able to copy-paste it.
- If a query returns zero results, suggest plausible refinements (case, module qualifier, alternate naming) before declaring nothing exists.
- If a query times out or errors, fall back to a simpler search and mark the result as "partial -- mxcli timed out at X."
- Read-only, period. No writes, even if a result obviously suggests one.
- Never invent select-statement table or column names. Refuse the query and ask Neo to clarify if you don't know the schema; mxcli has a
select --schema discovery command -- use it.
Cross-reference
- Discovery:
~/.claude/skills/mx-discover/SKILL.md (broader inventory).
- Impact:
~/.claude/skills/mx-impact/SKILL.md (specifically about dependencies of one item).
- Doctor:
~/.claude/skills/mx-doctor/SKILL.md (project-wide health).