MPS: Skill for Claude Code

.agents/skills/mps-tests/SKILL.md

mps-tests is a skill for Claude Code, Codex from JetBrains/MPS. It costs 172 tokens per session (3,645 once invoked), scanned A, original, Apache-2.0.

A testing guide for JetBrains MPS, a tool for building custom programming languages and their editors. It explains how to write tests for language rules, editors, code generators, migrations, and ordinary Java or Kotlin runtime code.

In plain words
What is it for?
Use it when adding or changing MPS tests for type checking, constraints, scopes, data flow, editor actions, keyboard input, code completion, generated output, migration scripts, or runtime classes.
Why use it?
It removes the guesswork around MPS's specialised test models and the different test types used for language features.

Skill for Claude CodeCodex ✓ vendor

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

This is JetBrains/MPS's own configuration. It tells Claude Code and Codex how to work on MPS itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything MPS configures →

About the project

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.

JetBrains/MPS · 1,666 stars · on GitHub · jetbrains.com

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/JetBrains/MPS/master/.agents/skills/mps-tests/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/JetBrains/MPS

Made for: Claude Code, Codex.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/jetbrains/mps/mps-tests/github.svg)](https://agentmods.dev/skills/jetbrains/mps/mps-tests)
Your own site
<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.

agentmods 80×15 button for mps-tests

Your own site · 80×15
<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>
Per session 172 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,645 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 pass 7 Sept 2026
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.00172 $0.03645
Opus 5.5 $0.00069 $0.01458
Sonnet 5.5 $0.00034 $0.00729
Haiku 4.5 $0.00017 $0.00364

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

Security

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.

.agents/skills/mps-tests/SKILL.md · 78 lines

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, plus jetbrains.mps.baseLanguage, jetbrains.mps.baseLanguage.collections, jetbrains.mps.baseLanguage.closures (closures in editor-test helpers such as EditorTestUtil.runWithTwoStepDeletion), jetbrains.mps.lang.smodel, jetbrains.mps.lang.text as needed by assertion code.
  • The containing Solution must carry the tests facet. Languages and Generators don't compile the test classes, so the test root must live in this dedicated Solution. Create it via mps_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 via mps_mcp_update_module_facet(facetType="tests", enabled=true) and verify with mps_mcp_get_project_structure(startingPoint="…") (its facets array will include "tests").
  • The testMethods role declares NodesTestMethod, which is abstract — instantiate SimpleNodeTest (c:8585453e-6bfb-4d80-98de-b16074f1d86c/1225978065297). Inserting raw NodesTestMethod fails with "Abstract concept instance detected".
  • Inside snippets, TestNodeAnnotation labels are only resolvable via TestNodeReference from test-method bodies. For in-snippet references (e.g. setting RoutineCall.routine) use the target node's own name property (resolved through the language's scope) or a persistent r: 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 in references/link-and-concept-literals.md in the mps-model-manipulation skill 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_generation PLAN shows NO_GENERATORS: create and MAKE the generator first) or generation failed (IDE log), and an AssumptionViolatedException is 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 of mps-aspect-editor-menus-and-keymaps (editor tests) or mps-aspect-generator (generator tests).
  • Prefer invoke action -> <Name> over raw press <chord> for Enter/Tab/etc. in EditorTestCase — PressKeyStatement may bypass the named-action dispatcher used by the production editor (exception: press ENTER applies an open completion menu's item). Editor actions live in r: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 reach UndoManager, FileEditor or DataManager.getInstance() from a test — it fails in a test JVM (CI).
  • Generator output is tested with a GeneratorTest root (jetbrains.mps.lang.test.generator), which generates an input model and matches the result against an expected model. There is no GeneratorTestCase in jetbrains.mps.lang.test, and a NodesTestCase that drives generation is the wrong tool. Mark the input and expected models "Do not generate" (mps_mcp_update_model SET_DO_NOT_GENERATE) before the first make. See references/generator-test.md.
  • For an empty list role, target empty_<role> for the caret — not refNodeList_<role> (the latter is the populated wrapper cell).
  • Never edit test_gen/ or classes_gen/ — those are regenerated.

Read the full file on GitHub · 78 lines

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. 2d ago Changed · +2 lines d8b134e1b941
  2. 3d ago Changed · +2 lines · +16 tokens per session 840129791a4e
  3. 8d ago Changed 0c7020467e96
  4. 29d ago Changed · +1 lines 01051537bae6
  5. 1mo ago Changed 3a721419565f
  6. 1mo ago Changed · +4 lines 3d659bcecec9
  7. 2mo ago First seen · 69 lines · 156 tokens per session scan A 12b00e4bdf06

Subscribe to this mod's changes

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.

Related

mps-tests compared with skills from other repositories

mps-tests next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
mps-testsJetBrains/MPSSkill1.7kyesterdayApache-2.0A172Claude Code, Codex
lai-gen-evalseclipse-langium/langium-aiSkill314d agoMITA42Claude Code
langiumeclipse-langium/langium-aiSkill314d agoMITA33Claude Code
laieclipse-langium/langium-aiSkill314d agoMITA52Claude Code
lai-gen-descriptoreclipse-langium/langium-aiSkill314d agoMITA49Claude Code
lai-gen-mcpeclipse-langium/langium-aiSkill314d agoMITA43Claude Code
lai-gen-language-skilleclipse-langium/langium-aiSkill314d agoMITA33Claude Code