JetBrains MPS is a development environment for creating domain-specific languages, which are programming languages designed for a particular field or task. It provides editors with features such as completion, semantic checks, and type checking, and can generate code in languages including Java and XML.
Borrowing it
Nothing to install: this file belongs to JetBrains/MPS. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/JetBrains/MPS/master/.agents/skills/mps-tests/SKILL.mdgit clone --depth 1 https://github.com/JetBrains/MPSWrote 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.
[](https://agentmods.dev/skills/jetbrains/mps/mps-tests)<a href="https://agentmods.dev/skills/jetbrains/mps/mps-tests"><img src="https://agentmods.dev/badge/skills/jetbrains/mps/mps-tests/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.
<a href="https://agentmods.dev/skills/jetbrains/mps/mps-tests"><img src="https://agentmods.dev/badge/skills/jetbrains/mps/mps-tests.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00172 | $0.03645 |
| Opus 5.5 | $0.00069 | $0.01458 |
| Sonnet 5.5 | $0.00034 | $0.00729 |
| Haiku 4.5 | $0.00017 | $0.00364 |
Grade A, and why
mps-tests 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 2d 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.
How it starts
The opening of the file, as written. The whole thing — 78 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Writing Tests in MPS Models
Loading companion skills
Companion names in this skill are lazy dependencies: load only those relevant to the current task. If this skill came from an MCP server, use the host's skill loader to resolve the companion's unique discovered entry URI on the same host-assigned originating server. If the host has no server-backed skill loader, stop and report that limitation; do not silently fall back to a filesystem copy. If this skill came from a filesystem catalog, load the named sibling from that same catalog at <skills-root>/<skill-name>/SKILL.md, even if remote skill loaders are also available. Do not invent a tool name or server endpoint.
MPS ships a dedicated test language — jetbrains.mps.lang.test — for testing language artefacts (typesystem, scopes, constraints, dataflow, editor, migrations), and jetbrains.mps.lang.test.generator for generator tests. Plain JUnit-style tests against runtime classes use jetbrains.mps.baseLanguage.unitTest (the BTestCase concept).
A test is a root node living in a model whose stereotype is tests (pass moduleName: "<hosting solution>" and modelName: "<name>@tests" to mps_mcp_create_model; the on-disk file ends in @tests.mps). See aspect-model-stereotypes.md for all model identifiers. The test model lives in a Solution module carrying the tests facet, not in the language module itself, so it can depend on the language under test plus arbitrary runtime libraries.
This skill is the reference for what to put in a test model and what each test type means. For the mechanics of creating/modifying nodes via MCP, see mps-model-manipulation and the mps_mcp_* tool docs. Documentation: https://www.jetbrains.com/help/mps/testing-languages.html. Source: plugins/mps-testing/languages/lang.test/.
Critical Directives
- The test model must carry stereotype
tests(file name…@tests.mps). Without it, roots compile but are not discovered as JUnit tests. - Used languages on a test model:
jetbrains.mps.lang.test,jetbrains.mps.baseLanguage.unitTest, the language(s) under test, plusjetbrains.mps.baseLanguage,jetbrains.mps.baseLanguage.collections,jetbrains.mps.baseLanguage.closures(closures in editor-test helpers such asEditorTestUtil.runWithTwoStepDeletion),jetbrains.mps.lang.smodel,jetbrains.mps.lang.textas needed by assertion code. - The containing Solution must carry the
testsfacet. Languages and Generators don't compile the test classes, so the test root must live in this dedicated Solution. Create it viamps_mcp_create_module(type="solution", …, facets="[\"tests\"]"); the response is self-describing —{"data":{"kind":"Solution","facets":["java","tests"],"loadExtensions":"NotAvailable",…}}confirms the kind without a follow-up call. For an existing Solution, attach the facet viamps_mcp_update_module_facet(facetType="tests", enabled=true)and verify withmps_mcp_get_project_structure(startingPoint="…")(itsfacetsarray will include"tests"). - The
testMethodsrole declaresNodesTestMethod, which is abstract — instantiateSimpleNodeTest(c:8585453e-6bfb-4d80-98de-b16074f1d86c/1225978065297). Inserting rawNodesTestMethodfails with"Abstract concept instance detected". - Inside snippets,
TestNodeAnnotationlabels are only resolvable viaTestNodeReferencefrom test-method bodies. For in-snippet references (e.g. settingRoutineCall.routine) use the target node's ownnameproperty (resolved through the language's scope) or a persistentr:node ref, never the label name. - A test that checks a stored node (a sample in another model, as stored, not a copy inside the test) reaches it with
node-ptr/<name>/.resolve(project.getRepository())after importing that node's model into the test model, never with a search for its name: the literal follows renames and shows in Find Usages. Blueprint inreferences/link-and-concept-literals.mdin themps-model-manipulationskill root after loading that companion skill from the same origin. - A test written first must fail first, for the reason the change addresses. Run it before the change and read the failure. In an editor test, a bad caret, cell id or missing import is a test bug, so fix it and run again. In a generator test, the red is a mismatch naming what the change addresses (for a rule not yet written in a made generator, the unchanged input root);
Node: null vs <root>means no generator ran (mps_mcp_generationPLANshowsNO_GENERATORS: create and MAKE the generator first) or generation failed (IDE log), and anAssumptionViolatedExceptionis a setup bug. A test that already passes either tests nothing or shows the behaviour already exists, so strengthen the test or drop the change. Whether to write a test first at all is decided by the first Critical Directive ofmps-aspect-editor-menus-and-keymaps(editor tests) ormps-aspect-generator(generator tests). - Prefer
invoke action -> <Name>over rawpress <chord>for Enter/Tab/etc. inEditorTestCase—PressKeyStatementmay bypass the named-action dispatcher used by the production editor (exception:press ENTERapplies an open completion menu's item). Editor actions live inr:9832fb5f-2578-4b58-8014-a5de79da988e(jetbrains.mps.ide.editor.actions). Undo, Redo, Copy, Cut and Paste are platform actions:invoke action by id: $Undo($Redo,$Copy,$Cut,$Paste). Never reachUndoManager,FileEditororDataManager.getInstance()from a test — it fails in a test JVM (CI). - Generator output is tested with a
GeneratorTestroot (jetbrains.mps.lang.test.generator), which generates an input model and matches the result against an expected model. There is noGeneratorTestCaseinjetbrains.mps.lang.test, and aNodesTestCasethat drives generation is the wrong tool. Mark the input and expected models "Do not generate" (mps_mcp_update_modelSET_DO_NOT_GENERATE) before the first make. Seereferences/generator-test.md. - For an empty list role, target
empty_<role>for the caret — notrefNodeList_<role>(the latter is the populated wrapper cell). - Never edit
test_gen/orclasses_gen/— those are regenerated.
What ships with it
22 files 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.
- references/aspect-model-stereotypes.md 8.6 KB
- references/btestcase.md 1.3 KB
- references/common-failures.md 8.8 KB
- references/concept-identifiers.md 8.0 KB
- references/editor-test-case.md 1.4 KB
- references/editor-test-case/cell-ids.md 2.4 KB
- references/editor-test-case/editor-expressions.md 6.8 KB
- references/editor-test-case/menus-deletion-completion.md 6.4 KB
- references/editor-test-case/root-and-caret.md 6.8 KB
- references/editor-test-case/statements-and-actions.md 8.6 KB
- references/generator-and-migration-tests.md 2.1 KB
- references/generator-test.md 2.3 KB
- references/generator-test/blueprints.md 7.0 KB
- references/generator-test/expected-output.md 6.6 KB
- references/generator-test/layout.md 4.0 KB
- references/generator-test/matching-and-plans.md 5.6 KB
- references/generator-test/running-and-failures.md 7.5 KB
- references/nodes-test-case.md 12 KB
- references/running-tests.md 1.8 KB
- references/scopes-test.md 3.2 KB
- references/test-model-setup.md 3.1 KB
- references/test-types.md 1.2 KB
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.
- 2d ago Changed · +2 lines d8b134e1b941
- 3d ago Changed · +2 lines · +16 tokens per session 840129791a4e
- 8d ago Changed 0c7020467e96
- 29d ago Changed · +1 lines 01051537bae6
- 1mo ago Changed 3a721419565f
- 1mo ago Changed · +4 lines 3d659bcecec9
- 2mo ago First seen · 69 lines · 156 tokens per session scan A 12b00e4bdf06
mps-tests is a skill published in the GitHub repository JetBrains/MPS (1,666 stars, last pushed yesterday), licensed Apache-2.0. It adds 172 tokens to every session and 3,645 once invoked, about $0.0007 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-08-30.
mps-tests compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| mps-testsJetBrains/MPS | Skill | 1.7k | yesterday | Apache-2.0 | A | 172 | Claude Code, Codex |
| lai-gen-evalseclipse-langium/langium-ai | Skill | 31 | 4d ago | MIT | A | 42 | Claude Code |
| langiumeclipse-langium/langium-ai | Skill | 31 | 4d ago | MIT | A | 33 | Claude Code |
| laieclipse-langium/langium-ai | Skill | 31 | 4d ago | MIT | A | 52 | Claude Code |
| lai-gen-descriptoreclipse-langium/langium-ai | Skill | 31 | 4d ago | MIT | A | 49 | Claude Code |
| lai-gen-mcpeclipse-langium/langium-ai | Skill | 31 | 4d ago | MIT | A | 43 | Claude Code |
| lai-gen-language-skilleclipse-langium/langium-ai | Skill | 31 | 4d ago | MIT | A | 33 | Claude Code |