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.
npx agentmods add skills/jetbrains/mps/mps-testsnpx skills add JetBrains/MPS --skill mps-testsgit 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.svg" alt="Measured on agentmods" height="20"></a>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 | $0.00156 | $0.02565 |
| Opus 5 | $0.00078 | $0.01282 |
| Sonnet 5 | $0.00031 | $0.00513 |
| Haiku 4.5 | $0.00016 | $0.00257 |
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 4d 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 — 69 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Writing Tests in MPS Models
MPS ships a dedicated test language — jetbrains.mps.lang.test — for testing language artefacts (typesystem, scopes, constraints, dataflow, editor, generator, migrations). 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 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.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. - Prefer
invoke action <ActionId>over rawpress <chord>for Enter/Tab/etc. inEditorTestCase—PressKeyStatementmay bypass the named-action dispatcher used by the production editor. Editor actions live inr:9832fb5f-2578-4b58-8014-a5de79da988e(jetbrains.mps.ide.editor.actions). - 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
10 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/btestcase.md 1.3 KB
- references/common-failures.md 3.7 KB
- references/concept-identifiers.md 4.7 KB
- references/editor-test-case.md 7.4 KB
- references/generator-and-migration-tests.md 2.5 KB
- references/nodes-test-case.md 4.6 KB
- references/running-tests.md 1.6 KB
- references/scopes-test.md 3.2 KB
- references/test-model-setup.md 2.9 KB
- references/test-types.md 1.0 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.
- 4d 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,658 stars, last pushed today), licensed Apache-2.0. It adds 156 tokens to every session and 2,565 once invoked, about $0.0008 per session on Opus 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.
Other skills, from other repositories
langium
A comprehensive skill to understanding how Langium-based projects work — from grammar definition through code generation, runtime parsing, linking, validation, and LSP integration.
lai-gen-evals
Expand and refine the evaluation suite for a Langium DSL project. Generates comprehensive eval files that cover syntactic correctness, semantic validity, user intent matching, edge cases, and language understanding.
lai
Guide for using the langium-ai (LAI) CLI to generate language descriptors, synthesize system prompts, run evaluations, and iteratively refine AI-powered tooling in Langium projects. Use when working with lai commands, descriptors, or evaluation files.
lai-gen-descriptor
Generate or refine a language descriptor for a Langium DSL project. Bootstraps a new descriptor via lai gen descriptor if none exists, then guides refinement of paths, services, examples, documentation, and structure.
lai-gen-mcp
Generate a Model Context Protocol (MCP) server that exposes a Langium DSL's parser and validator as an MCP tool, allowing any MCP-compatible client to validate DSL code and receive diagnostics.
lai-gen-language-skill
Skill for generating a skill for understanding a specific Langium-based DSL. Used in cooperation with the lai & langium skills for understanding.