mps-tests

mps-tests is a skill for Claude Code, Codex from JetBrains/MPS. It costs 156 tokens per session (2,565 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

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.

agentmods
npx agentmods add skills/jetbrains/mps/mps-tests
Any agent
npx skills add JetBrains/MPS --skill mps-tests
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.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.svg" alt="Measured on agentmods" height="20"></a>
Per session 156 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,565 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00156 $0.02565
Opus 5 $0.00078 $0.01282
Sonnet 5 $0.00031 $0.00513
Haiku 4.5 $0.00016 $0.00257

Measured 4d ago against content hash 12b00e4bdf06, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 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.

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

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 languagejetbrains.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, plus jetbrains.mps.baseLanguage, jetbrains.mps.baseLanguage.collections, 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.
  • Prefer invoke action <ActionId> over raw press <chord> for Enter/Tab/etc. in EditorTestCasePressKeyStatement may bypass the named-action dispatcher used by the production editor. Editor actions live in r:9832fb5f-2578-4b58-8014-a5de79da988e(jetbrains.mps.ide.editor.actions).
  • 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 · 69 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. 4d 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,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.

Related

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.

eclipse-langium/langium-ai · 33 tokens

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.

eclipse-langium/langium-ai · 42 tokens

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.

eclipse-langium/langium-ai · 52 tokens

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.

eclipse-langium/langium-ai · 49 tokens

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.

eclipse-langium/langium-ai · 43 tokens

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.

eclipse-langium/langium-ai · 33 tokens