Official agent skill

Mps Tests

by JetBrains in JetBrains/MPS

A skill your agent uses when writing or modifying tests inside MPS @tests models — NodesTestCase (typesystem, constraints, scopes, dataflow, generator output), EditorTestCase (intentions, actions…

OfficialApache-2.0Auto-check passedMobile

Install Mps Tests

skills CLI
$ npx skills add JetBrains/MPS --skill mps-tests -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install JetBrains/MPS mps-tests --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/JetBrains/MPS.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/mps-tests .claude/skills/mps-tests && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
mps-tests
GitHub stars
1.7k
Token cost
~3k tokens
SKILL.md length
1,258 words
Files
12 (incl. references)
Skills in repo
41
Repo updated
First seen
Licence
Apache-2.0

At a glance

A skill your agent uses when writing or modifying tests inside MPS @tests models — NodesTestCase (typesystem, constraints, scopes, dataflow, generator output), EditorTestCase (intentions, actions…

  • Works in 6 steps: Decide the test type. Typesystem / scope… → Find or create the test model. Prefer… → Add the test root with… → …
  • Modifying tests inside MPS @tests models — NodesTestCase (typesystem
  • SKILL.md covers Loading companion skills, Critical Directives, Common-Path Workflow and Where Test Models Live, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Mps Tests is an agent skill from JetBrains/MPS, published by the product's own GitHub organization. Use when writing or modifying tests inside MPS @tests models — NodesTestCase (typesystem, constraints, scopes, dataflow, generator output), EditorTestCase (intentions, actions, keystrokes, side-transforms, completion), MigrationTestCase (migration scripts), BTestCase (plain JUnit on hand-written Java/Kotlin runtime), inline annotations such as has error / has type / ScopesTest, label-based node<label cross-references, caret markers, and running tests via MCP / in MPS. Reach for this skill whenever the task…

Its SKILL.md is about 3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 12 other files, including reference files (for example `references/aspect-model-stereotypes.md`, `references/btestcase.md` and `references/common-failures.md`).

It sits in Mobile, covering Unit testing, Database migrations and Android development. It works with Kotlin, Model Context Protocol, JetBrains IDEs and JUnit. The repository describes itself as: JetBrains Meta programming System. The licence is Apache-2.0.

When your agent uses it

  • Modifying tests inside MPS @tests models — NodesTestCase (typesystem
  • Generator output)
  • EditorTestCase (intentions
  • Side-transforms

Example prompts

  • “/mps-tests”

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Decide the test type. Typesystem / scope / constraint → NodesTestCase. Intention / action / keystroke → EditorTestCase. Migration →…
  2. Find or create the test model. Prefer extending an existing @tests model in the language's adjacent test Solution; only create a new one…
  3. Add the test root with mps_mcp_create_root_node using the concept ref from references/concept-identifiers.md, then populate nodes / code /…
  4. Mark assertions using the appropriate annotation concept (see references/nodes-test-case.md and references/editor-test-case.md). For…
  5. Validate with mps_mcp_check_root_node_problems on the new root.
  6. Run. Register a JUnit Tests config via mps_mcp_create_run_configuration — modelReference for the @tests model, or one test root in…

What it can do on your machine

Read from SKILL.md and the folder at commit 3e9cfcd. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • jetbrains.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Mps Tests loads about 3k tokens when it runs, and up to ~16k if it reads all its reference files. Until then it costs about 160 tokens; SKILL.md has 1,258 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~160
When it runs · the whole SKILL.md, loaded when a task matches
~3k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~16k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from JetBrains/MPS at commit 3e9cfcd, republished under its Apache-2.0 licence (© JetBrains). 1,258 words, ~2,978 tokens.

Download SKILL.mdSave it as .claude/skills/mps-tests/SKILL.md (or your agent's skills folder). This skill also uses 11 other files; get the full folder from GitHub.
name
mps-tests
description
Use when writing or modifying tests inside MPS `@tests` models — `NodesTestCase` (typesystem, constraints, scopes, dataflow, generator output), `EditorTestCase` (intentions, actions, keystrokes, side-transforms, completion), `MigrationTestCase` (migration scripts), `BTestCase` (plain JUnit on hand-written Java/Kotlin runtime), inline annotations such as `has error` / `has type` / `ScopesTest`, label-based `node<label>` cross-references, caret markers, and running tests via MCP / in MPS. Reach for this skill whenever the task involves authoring or fixing tests in a `tests`-stereotype model, or interpreting failures from one.
type
reference

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, 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 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.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 EditorTestCase — PressKeyStatement 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.

Common-Path Workflow

When asked to "write tests" for an MPS language feature:

  1. Decide the test type. Typesystem / scope / constraint → NodesTestCase. Intention / action / keystroke → EditorTestCase. Migration → MigrationTestCase. Runtime helper → BTestCase. Generator output equivalence → NodesTestCase + assertNodesMatch. See references/test-types.md.
  2. Find or create the test model. Prefer extending an existing @tests model in the language's adjacent test Solution; only create a new one if no suitable Solution exists.
  3. Add the test root with mps_mcp_create_root_node using the concept ref from references/concept-identifiers.md, then populate nodes / code / etc. with mps_mcp_update_node. Use mps_mcp_parse_java_and_insert to drop a Java/BaseLanguage snippet into a TestNode.
  4. Mark assertions using the appropriate annotation concept (see references/nodes-test-case.md and references/editor-test-case.md). For prototypes, open the model in MPS and use the Alt+Enter intentions ("Add Node Operations Test Annotation", "Add Test Node Label", "Mark Caret Position") — they create the right annotations without hand-building blueprints.
  5. Validate with mps_mcp_check_root_node_problems on the new root.
  6. Run. Register a JUnit Tests config via mps_mcp_create_run_configuration — modelReference for the @tests model, or one test root in nodeReference when iterating on a single test — and launch it with execute_run_configuration, or ask the user to run it in MPS.

Where Test Models Live

WhereWhen
Test aspect of the language (testAspect model under <lang>/)Quick, language-local checks; cannot run in a fresh MPS instance from outside the language.
Dedicated test Solution with @tests modelRecommended for anything serious. Runs out-of-process; can be wired into the build/CI.

If the only goal is plain JUnit on hand-written Java/Kotlin (no MPS-specific assertions), prefer a regular module test source root rather than a @tests model — see mps-distribution-build for how BTestCase-based MPS test modules are packaged.

Show full SKILL.md (524 more words)Show less
  • mps-collections-and-closures — the collections / closures reference for assertion bodies.
  • mps-model-manipulation — the smodel reference for assertion bodies; for an assertion body open only references/dot-expression-basics.md in the mps-model-manipulation skill root after loading that companion skill from the same origin.
  • mps-node-editing — MCP recipes for inserting children and harvesting persistent refs (used heavily by the ScopesTest staged-construction recipe).
  • mps-aspect-typesystem — when the system-under-test is the typesystem; has error/type annotations here verify those rules.
  • mps-aspect-constraints — when validating can-be / scope / validator rules from the constraints aspect.
  • mps-aspect-migrations — for migration scripts being exercised by MigrationTestCase.
  • mps-aspect-intentions and mps-aspect-editor-menus-and-keymaps — when an EditorTestCase exercises intentions, side transforms, or keymapped actions.
  • mps-build-language and mps-distribution-build — when wiring a @tests Solution into the build pipeline (test-only BuildProject).
  • mps-quotations — for tests that use quotation snippets.

Reference Index

  • Open references/test-model-setup.md when bootstrapping a new @tests model — required stereotype, used languages, Solution kind, optional TestInfo root, and the choice between the language's testAspect and a dedicated test Solution. Includes the canonical example test Solutions in this repo.
  • Open references/test-types.md for the test-type cheat sheet (concept refs and what each tests). Use to decide which root concept to instantiate.
  • Open references/nodes-test-case.md when authoring or modifying a NodesTestCase — section layout (nodes, test methods, utility methods, accessMode), inline assertion annotations (has error, has type, has typesystem error, has expected type, has type in), labelled-node assertions inside test methods, and the namespace separation between labels and scope-resolved references.
  • Open references/scopes-test.md when writing declarative scope assertions (ScopesTest + ScopesExpectedNode) — where to attach the annotation, the exact-set semantics, the JSON blueprint, the stage-construction recipe for resolving expected refs, and why declarative scope tests beat imperative ones.
  • Open references/editor-test-case.md when writing an EditorTestCase — root layout (before / result / code), the AnonymousCellAnnotation caret marker (which properties before sets and which the result check compares; a result caret needs selectionStart/selectionEnd too), the cell-ID convention for auto-generated editors (property_<name>, refNodeList_<role>, empty_<role>, refNode_<role>, constant/collection cells), the editor-driving statements (type "...", press, invoke action, invoke intention, invoke quick-fix), the editor expressions usable inside code (EditorComponentExpression → getEditorComponent(), IsIntentionApplicableExpression → isIntentionApplicable(), ProjectExpression → getProject(), ModelExpression → model of the edited node), and the side-transform / completion testing pattern.
  • Open references/generator-and-migration-tests.md when validating generator output (NodesTestCase + assertNodesMatch) or testing a migration script (MigrationTestCase — inputNodes, outputNodes, migration refs, options including StableIdOption). Lists the four-child structure of MigrationTestCase and the "Generate Output from Input" intention.
  • Open references/btestcase.md when writing plain JUnit-style tests against hand-written Java/Kotlin — the BTestCase annotation, TestMethod / BeforeTest / AfterTest, and the available assertion concepts.
  • Open references/running-tests.md when launching tests — inside MPS (right-click → Run tests), from the command line via the Ant pipeline, or from an agent via mps_mcp_create_run_configuration + execute_run_configuration. Covers in-process vs separate-MPS-instance, and mps_mcp_check_root_node_problems as a fast pre-run gate.
  • Open references/common-failures.md when a test won't run, runs but doesn't fail when expected, fails for the wrong reason, or generates a misleading outputNodes. Includes an EditorTestCase symptom → fix table for caret and selection mismatches (CellReference.java:57/58/61, typed text replacing a non-empty before selection), the abstract-concept gotcha, label-vs-name confusion, press VK_ENTER vs invoke action Insert, replace_node_child ref invalidation, and ScopesExpectedNode.ref not being scope-resolved.
  • Open references/concept-identifiers.md for the validated FQN+concept-ref table covering jetbrains.mps.lang.test (every concept used by the skill — NodesTestCase, SimpleNodeTest, TestNode, TestNodeAnnotation, AnonymousCellAnnotation, the annotation/check operations, the editor-driving statements, ScopesTest/ScopesExpectedNode, etc.) and jetbrains.mps.baseLanguage.unitTest.

© JetBrains, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 11 other files (references) in .agents/skills/mps-tests of JetBrains/MPS.

  • SKILL.md
  • references/aspect-model-stereotypes.md
  • references/btestcase.md
  • references/common-failures.md
  • references/concept-identifiers.md
  • references/editor-test-case.md
  • references/generator-and-migration-tests.md
  • references/nodes-test-case.md
  • references/running-tests.md
  • references/scopes-test.md
  • references/test-model-setup.md
  • references/test-types.md

Open the folder on GitHubat commit 3e9cfcd

Compare with similar skills

Mps Tests next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Mps Tests compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Mps Tests this skillJetBrains/MPS1.7k—~3kAutomated safety check: PassApache-2.0
Kotlin Tooling Java To KotlinJetBrains/skills3663 repos~1.4kAutomated safety check: PassApache-2.0
Jvm Helpershepherdjerred/monorepo112—~1.9kAutomated safety check: PassGPL-3.0
Code StyleJetBrains/intellij-community21k—~795Automated safety check: PassCustom licence
Harmonica DevKenjiOhtsuka/harmonica131—~742Automated safety check: PassMIT
Kotlin Tooling Kotlin ToolchainKotlin/kotlin-agent-skills1.1k—~2.4kAutomated safety check: PassApache-2.0

Similar skills

  • Official

    A skill your agent uses when converting Java source files to idiomatic Kotlin, when user mentions "java to kotlin", "j2k", "convert java", "migrate java to kotlin", or when working with .java files…

    366 GitHub starsUsed in 3 repos~1.4k tokens
    MobileAuto-check passed
  • Jvm Helper

    shepherdjerred/monorepo

    Current Java, Kotlin, Gradle, Maven, JUnit, JVM diagnostics, packaging, and performance guidance.

    112 GitHub stars~1.9k tokensUpdated today
    MobileAuto-check passed
  • Code Style

    JetBrains/intellij-community

    Official

    Apply IntelliJ Kotlin and Java code style when writing or reviewing.

    21k GitHub stars~795 tokensUpdated today
    MobileAuto-check passed
  • Harmonica Dev

    KenjiOhtsuka/harmonica

    A skill your agent uses when working on the Harmonica Kotlin DB migration tool — planning, phase work, PRs, or anything touching this repo.

    131 GitHub stars~742 tokensUpdated 17 days ago
    MobileAuto-check passed
  • Kotlin Tooling Kotlin Toolchain

    Kotlin/kotlin-agent-skills

    Load when building, running, testing, packaging, linting, or configuring a Kotlin/Java project with the Kotlin Toolchain (JetBrains' unified CLI, formerly Amper), when scaffolding a new or…

    1.1k GitHub stars~2.4k tokensUpdated today
    MobileAuto-check passed
  • Migrate Intellij Util

    flutter/flutter-intellij

    Optimize memory usage, consistency, and performance by migrating standard Java/Kotlin classes to IntelliJ's specialized com.intellij.util implementations.

    2k GitHub stars~600 tokensUpdated today
    MobileAuto-check passed

More from JetBrains/MPS

All 41 skills in this repo
  • Official

    Analyze an MPS language by name — discover concepts, properties, references, children, aspects (editor/constraints/behavior), metadata, and answer type questions (is A a subtype of B, common…

    1.7k GitHub stars~1.8k tokensUpdated today
    Auto-check passed
  • Mps Node Editing

    JetBrains/MPS

    Official

    Add, update, or delete MPS nodes using JSON blueprints — covers the unified blueprint format, staged construction for large subtrees, validation, and reference repair.

    1.7k GitHub stars~5.1k tokensUpdated today
    Auto-check passed
  • Official

    Open an MPS project in a running or freshly started MPS instance when MCP tools fail because no project is open (welcome screen), close an open project with mpsmcpcloseproject, or create a new empty…

    1.7k GitHub stars~2.2k tokensUpdated today
    Auto-check passed
  • Mps MCP Workflow

    JetBrains/MPS

    Official

    Complete JetBrains MPS workflow guide for DSL projects — models, languages, generators, node JSON blueprints, type queries, validation, MPS MCP tool usage, and the index of companion skills.

    1.7k GitHub stars~6.6k tokensUpdated today
    Auto-check passed
  • Bugfix Workflow

    JetBrains/MPS

    Official

    Structured MPS bugfix workflow driven by a YouTrack issue ID — preflight tool checks, version/branch derivation, parallel-agent problem analysis, solution design, branch creation, implementation…

    1.7k GitHub stars~4.4k tokensUpdated today
    Auto-check passed
  • Official

    Define concepts, interface concepts, enumerations, and constrained data types in an MPS language's structure aspect.

    1.7k GitHub stars~2.8k tokensUpdated today
    Auto-check passed

Questions about Mps Tests

What does Mps Tests do?

A skill your agent uses when writing or modifying tests inside MPS @tests models — NodesTestCase (typesystem, constraints, scopes, dataflow, generator output), EditorTestCase (intentions, actions…. Mps Tests is an agent skill from JetBrains/MPS, published by the product's own GitHub organization. Use when writing or modifying tests inside MPS @tests models — NodesTestCase (typesystem, constraints, scopes, dataflow, generator output), EditorTestCase (intentions, actions, keystrokes, side-transforms, completion), MigrationTestCase (migration scripts), BTestCase (plain JUnit on hand-written Java/Kotlin runtime), inline annotations such as has error / has type / ScopesTest, label-based node<label cross-references, caret markers, and running tests via MCP / in MPS.

When should I use Mps Tests?

Mps Tests fits situations like: modifying tests inside MPS @tests models — NodesTestCase (typesystem; generator output); editorTestCase (intentions; side-transforms.

How do I install Mps Tests in Claude Code?

Run `npx skills add JetBrains/MPS --skill mps-tests -a claude-code`. Or copy the skill folder (.agents/skills/mps-tests in JetBrains/MPS) into .claude/skills/mps-tests in your project. Claude Code loads it when a task matches its description.

How do I install Mps Tests in Codex?

Run `npx skills add JetBrains/MPS --skill mps-tests -a codex`. Or copy the skill folder (.agents/skills/mps-tests in JetBrains/MPS) into .agents/skills/mps-tests in your project. Codex loads it when a task matches its description.

Can I use Mps Tests in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add JetBrains/MPS --skill mps-tests -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/mps-tests, .gemini/skills/mps-tests, .github/skills/mps-tests and .opencode/skills/mps-tests in your project.

What does Mps Tests need to run?

SKILL.md names no scripts, command-line tools or credentials: Mps Tests is instructions for the agent only.

Does Mps Tests access the network?

SKILL.md names 1 domain. As links in the text: jetbrains.com. This is read from the text; nothing was executed.

Is Mps Tests safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Mps Tests use?

Mps Tests is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Mps Tests use?

About 3k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 13k tokens, read only when the agent opens those files.

What are the alternatives to Mps Tests?

Skills that share tags, products or a category with Mps Tests: Kotlin Tooling Java To Kotlin (JetBrains/skills, 366 stars), Jvm Helper (shepherdjerred/monorepo, 112 stars), Code Style (JetBrains/intellij-community, 21k stars) and Harmonica Dev (KenjiOhtsuka/harmonica, 131 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Mps Tests?

JetBrains (a GitHub organization, an official publisher) maintains it in JetBrains/MPS, which has 1,661 GitHub stars. The repository holds 41 skills in this directory. The repository was last updated on October 8, 2026.

Source: JetBrains/MPS on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.