Official agent skill

Mps Baselanguage

by JetBrains in JetBrains/MPS

Author and edit MPS jetbrains.mps.baseLanguage (Java) nodes — choose between the Java parser and JSON AST blueprints, map Java syntax to baseLanguage concepts/roles, harvest persistent member…

OfficialApache-2.0Auto-check passed

Install Mps Baselanguage

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

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

GitHub CLI
$ gh skill install JetBrains/MPS mps-baselanguage --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-baselanguage .claude/skills/mps-baselanguage && 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-baselanguage
GitHub stars
1.7k
Token cost
~2.2k tokens
SKILL.md length
974 words
Files
12 (incl. references)
Skills in repo
40
Repo updated
First seen
Licence
Apache-2.0

At a glance

Author and edit MPS jetbrains.mps.baseLanguage (Java) nodes — choose between the Java parser and JSON AST blueprints, map Java syntax to baseLanguage concepts/roles, harvest persistent member…

  • Works in 8 steps: Scope: call… → Resolve dependencies: confirm the… → Skeleton first: for any non-trivial… → …
  • Writing class/method bodies
  • SKILL.md covers Loading companion skills, Critical Directives, Choose Your Path and Common Workflow, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Mps Baselanguage is an agent skill from JetBrains/MPS, published by the product's own GitHub organization. Author and edit MPS jetbrains.mps.baseLanguage (Java) nodes — choose between the Java parser and JSON AST blueprints, map Java syntax to baseLanguage concepts/roles, harvest persistent member references, and validate. Use when writing class/method bodies, fields, expressions, statements, or any Java/BaseLanguage code inside MPS models, especially when BaseLanguage extensions (smodel, closures, collections) are involved.

Its SKILL.md is about 2.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 13 other files, including reference files (for example `references/concept-mapping.md`, `references/critical-rules.md` and `references/json-ast-workflow.md`).

It works with JetBrains IDEs, Java and Model Context Protocol. The repository describes itself as: JetBrains Meta programming System. The licence is Apache-2.0.

When your agent uses it

  • Writing class/method bodies
  • Any Java/BaseLanguage code inside MPS models
  • Especially when BaseLanguage extensions (smodel
  • Collections) are involved

Example prompts

  • “/mps-baselanguage”

Workflow steps

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

  1. Scope: call mps_mcp_get_current_editor_root_node to know where you are inserting (method body, field initializer, root, …).
  2. Resolve dependencies: confirm the containing model imports the right languages (jetbrains.mps.baseLanguage plus any extensions). Models…
  3. Skeleton first: for any non-trivial root, insert a placeholder skeleton (mps_mcp_create_root_node + mps_mcp_update_root_node_from_json or…
  4. Harvest references: for own members, run mps_mcp_print_node on the skeleton to read persistent refs of constructors, methods, and fields…
  5. Apply bodies: edit one subtree at a time with mps_mcp_update_node, or bulk-rewrite via mps_mcp_update_root_node_from_json.
  6. Auto-resolution: for unambiguous local refs (a parameter, a local variable, a unique method name), pass the plain name as target — MPS…
  7. Validate in three gates
  8. Repair: if a few refs are broken after insert, run mps_mcp_alter_nodes FIX_REFERENCES rather than re-harvesting all of them.

What it can do on your machine

Read from SKILL.md and the folder at commit a92f944. 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

    No URLs in SKILL.md.

    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 Baselanguage loads about 2.2k tokens when it runs, and up to ~11k if it reads all its reference files. Until then it costs about 111 tokens; SKILL.md has 974 words of instructions outside code blocks.

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

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 a92f944, republished under its Apache-2.0 licence (© JetBrains). 974 words, ~2,238 tokens.

Download SKILL.mdSave it as .claude/skills/mps-baselanguage/SKILL.md (or your agent's skills folder). This skill also uses 11 other files; get the full folder from GitHub.
name
mps-baselanguage
description
Author and edit MPS `jetbrains.mps.baseLanguage` (Java) nodes — choose between the Java parser and JSON AST blueprints, map Java syntax to baseLanguage concepts/roles, harvest persistent member references, and validate. Use when writing class/method bodies, fields, expressions, statements, or any Java/BaseLanguage code inside MPS models, especially when BaseLanguage extensions (smodel, closures, collections) are involved.
type
reference

MPS BaseLanguage (Java) Authoring

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.

jetbrains.mps.baseLanguage is MPS's Java-equivalent language. You edit it as an AST, not as text. Two authoring paths exist: the Java parser (mps_mcp_parse_java_and_insert) for plain Java, and JSON AST blueprints (mps_mcp_insert_root_node_from_json / mps_mcp_update_root_node_from_json / mps_mcp_update_node) for everything else — especially code that uses BaseLanguage extensions (jetbrains.mps.lang.smodel, jetbrains.mps.baseLanguage.closures, jetbrains.mps.baseLanguage.collections) or needs stable persistent member references.

Critical Directives

  • Node equality: always use :eq: and :ne: (concepts NPEEqualsExpression / NPENotEqualsExpression). Never == or .equals() between SNode references.
  • Constructor return type: ConstructorDeclaration.returnType MUST be a VoidType node. Leaving it empty fails validation.
  • ClassCreator wiring: ClassCreator.baseMethodDeclaration points at the constructor declaration, not the class. InstanceMethodCallOperation.baseMethodDeclaration points at the method declaration.
  • new … is a GenericNewExpression plus a creator: the GenericNewExpression is the Expression; its creator child is ClassCreator, ArrayCreator, ArrayCreatorWithInitializer, AnonymousClassCreator, a collections creator, or smodel SNodeCreator (new node<C>()). Creators are AbstractCreators, not Expressions, so none of them can stand alone in ReturnStatement.expression, an argument, or an initializer.
  • Inherited methods: use the declaring class ref for baseMethodDeclaration, not the subclass that calls the method. E.g. addActionListener is declared on AbstractButton, so use the AbstractButton class ref.
  • Expressions in statement lists: any Expression must be wrapped in ExpressionStatement to be valid inside a StatementList.
  • Variable declarations: in method bodies wrap LocalVariableDeclaration in LocalVariableDeclarationStatement. In ForStatement.variable use LocalVariableDeclaration directly, no wrapper.
  • Prefer primitives: use string (StringType) over String (ClassifierType) where possible; same for int, boolean, etc.
  • Compatibility: BaseLanguage core is Java 7 (including generics). When building AST directly (JSON blueprints), there is no lambda/record syntax — use the jetbrains.mps.baseLanguage.closures extension for closures. The Java parser (mps_mcp_parse_java_and_insert) additionally accepts the Java 8+ syntax MPS recognizes — most notably lambdas, which it maps to closures ClosureLiterals (auto-imported when postProcess.importUsedLanguages is on); a lambda only type-checks against a matching functional-type target. Constructs the parser does not recognize (e.g. records) still fail to parse. See references/parse-java-tips.md.
  • Surgical edits: when a single child changes prefer mps_mcp_update_node over rewriting the whole root — full-root rewrites churn persistent IDs and break incoming refs.

Choose Your Path

Pick the right authoring tool before you start:

  • mps_mcp_parse_java_and_insert — use for plain Java skeletons or bodies (classes, methods, statements, expressions), including the current MPS Console input (insert.mode: "console" to replace the console command, or mode: "child"/"replace" with a parentRef/targetRef inside the current console command for nested edits). Fastest path when no BaseLanguage extension is required.
  • JSON AST blueprints — use when the parser is unavailable, when the code uses BaseLanguage extensions (smodel, closures, collections), or when stable persistent references to members are required for downstream consumers.
  • Mixed — use the parser for the skeleton with placeholders (e.g. IntegerConstant, StringLiteral, IntegerType, StringType), then JSON-edit the placeholders to swap in extension-specific subtrees.
Show full SKILL.md (437 more words)Show less

Common Workflow

  1. Scope: call mps_mcp_get_current_editor_root_node to know where you are inserting (method body, field initializer, root, …).
  2. Resolve dependencies: confirm the containing model imports the right languages (jetbrains.mps.baseLanguage plus any extensions). Models for referenced nodes must also be imported.
  3. Skeleton first: for any non-trivial root, insert a placeholder skeleton (mps_mcp_create_root_node + mps_mcp_update_root_node_from_json or the parser) before filling member bodies.
  4. Harvest references: for own members, run mps_mcp_print_node on the skeleton to read persistent refs of constructors, methods, and fields. For JDK / library stubs, derive refs from the class ref using the URL-encoded signature formula (see references).
  5. Apply bodies: edit one subtree at a time with mps_mcp_update_node, or bulk-rewrite via mps_mcp_update_root_node_from_json.
  6. Auto-resolution: for unambiguous local refs (a parameter, a local variable, a unique method name), pass the plain name as target — MPS resolves it after insertion. For overloaded or stub members, use a persistent ref.
  7. Validate in three gates:
    • dryRun: true on insert tools — catches structural / assignability errors before mutation
    • mps_mcp_check_root_node_problems — semantic checking
    • mps_mcp_alter_nodes MAKE — generation + compilation
  8. Repair: if a few refs are broken after insert, run mps_mcp_alter_nodes FIX_REFERENCES rather than re-harvesting all of them.
  • mps-node-editing — general node mutation tools (mps_mcp_update_node, etc.). Load first if you have not seen them.
  • mps-aspect-structure-concepts — defines what concepts exist and what roles they expose. Read when authoring a brand-new language whose concepts extend BaseLanguage.
  • mps-quotations — light/quoted SNode literals embedded in BaseLanguage code (e.g. inside behavior or generator bodies).
  • mps-model-manipulation — smodel + collections + closures patterns layered on top of BaseLanguage; load when manipulating MPS nodes from BaseLanguage.
  • mps-aspect-behavior, mps-aspect-typesystem, mps-aspect-constraints — each owns a language whose function bodies are BaseLanguage; reach for those skills when the surrounding aspect matters.

Reference Index

  • Open references/concept-mapping.md when you need the Java-syntax → MPS-concept lookup table and the key role names (statements, expressions, types, declarations).
  • Open references/json-patterns.md when you need ready-to-paste JSON blueprints for common constructs (local variable, node-equality, instance-method call, anonymous class, array creation (sized or with initializer), super-constructor call, empty class template).
  • Open references/critical-rules.md when something fails validation and you want the rulebook on ExpressionStatement, ClassCreator, anonymous classes, mandatory bodies, FieldReferenceOperation, etc.
  • Open references/parse-java-tips.md when using mps_mcp_parse_java_and_insert and you need binary-expression priority handling, placeholder strategy, or post-insert verification steps.
  • Open references/stub-references.md when you need to point a baseMethodDeclaration at a JDK or library member — covers ref derivation, URL encoding, inherited-method handling, and the GET_ASSIGNABLE_REFERENCES fallback.
  • Open references/json-ast-workflow.md when authoring a non-trivial BaseLanguage root via JSON AST — covers staged skeleton → harvest → patch → validate, plus the ClassCreator vs InstanceMethodCallOperation ref distinction.
  • Open references/troubleshooting.md when you hit dryRun errors, broken-ref symptoms in generated Java (new (), ???()), stale-ref errors, or "model checks pass but MAKE fails".

© 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-baselanguage of JetBrains/MPS.

  • SKILL.md
  • references/concept-mapping.md
  • references/critical-rules.md
  • references/json-ast-workflow.md
  • references/json-patterns.md
  • references/parse-java-tips.md
  • references/parse-java-tips/direct-ast-editing-and-validation.md
  • references/parse-java-tips/editing-strategy-and-after-insertion.md
  • references/parse-java-tips/parameters-rules.md
  • references/parse-java-tips/parameters-schema.md
  • references/stub-references.md
  • references/troubleshooting.md

Open the folder on GitHubat commit a92f944

Compare with similar skills

Mps Baselanguage 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 Baselanguage compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Mps Baselanguage this skillJetBrains/MPS1.7k—~2.2kAutomated safety check: PassApache-2.0
Amplicode InstallAmplicode/spring-skills126—~2.6kAutomated safety check: PassNone
Idea MCPdtprj/dongting208—~698Automated safety check: PassApache-2.0
Dto CreatorAmplicode/spring-skills126—~7.5kAutomated safety check: PassNone
Java DebugAmplicode/spring-skills126—~2.7kAutomated safety check: PassNone
Workflow AI Codingw8123/EnterpriseAgentFramework8361 repos~3.7kAutomated safety check: PassMIT

Similar skills

  • Amplicode Install

    Amplicode/spring-skills

    Installs the Amplicode IntelliJ plugin into IntelliJ IDEA (Ultimate/Community) and GigaIDE on the user's machine.

    126 GitHub stars~2.6k tokensUpdated 1 mo ago
    Agent WorkflowsAuto-check passed
  • Idea MCP

    dtprj/dongting

    IntelliJ IDEA MCP for Java code analysis, testing, refactoring, and project navigation.

    208 GitHub stars~698 tokensUpdated 3 days ago
    DevelopmentAuto-check passed
  • Dto Creator

    Amplicode/spring-skills

    Creates a DTO (Data Transfer Object) class for an entity. An agent skill from Amplicode/spring-skills.

    126 GitHub stars~7.5k tokensUpdated 1 mo ago
    Agent WorkflowsAuto-check passed
  • Java Debug

    Amplicode/spring-skills

    Safety rules, workflows, and tool reference for debugging applications via IntelliJ debugger: breakpoints, debug sessions, stepping, evaluating expressions, inspecting runtime state.

    126 GitHub stars~2.7k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • Workflow AI Coding

    w8123/EnterpriseAgentFramework

    Edit, validate, debug, publish, and inspect ReachAI Workflow drafts through the Workflow AI Coding REST API.

    836 GitHub starsUsed in 1 repo~3.7k tokens
    AI & LLM EngineeringAuto-check passed
  • Agent AI Coding

    w8123/EnterpriseAgentFramework

    Create, inspect, and safely update project-scoped ReachAI Agents; edit and publish Supervisor config drafts; discover published bindable Skills; and attach or detach exact Skill versions through the…

    836 GitHub starsUsed in 1 repo~1.4k tokens
    AI & LLM EngineeringAuto-check passed

More from JetBrains/MPS

All 40 skills in this repo
  • Official

    Analyze an MPS language by name — discover concepts, properties, references, children, aspects (editor/constraints/behavior), and metadata.

    1.7k GitHub stars~1.4k tokensUpdated yesterday
    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~4.7k tokensUpdated yesterday
    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 yesterday
    Auto-check passed
  • Mps MCP Workflow

    JetBrains/MPS

    Official

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

    1.7k GitHub stars~5.8k tokensUpdated yesterday
    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 yesterday
    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 yesterday
    Auto-check passed

Questions about Mps Baselanguage

What does Mps Baselanguage do?

Author and edit MPS jetbrains.mps.baseLanguage (Java) nodes — choose between the Java parser and JSON AST blueprints, map Java syntax to baseLanguage concepts/roles, harvest persistent member…. Mps Baselanguage is an agent skill from JetBrains/MPS, published by the product's own GitHub organization.baseLanguage (Java) nodes — choose between the Java parser and JSON AST blueprints, map Java syntax to baseLanguage concepts/roles, harvest persistent member references, and validate.

When should I use Mps Baselanguage?

Mps Baselanguage fits situations like: writing class/method bodies; any Java/BaseLanguage code inside MPS models; especially when BaseLanguage extensions (smodel; collections) are involved.

How do I install Mps Baselanguage in Claude Code?

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

How do I install Mps Baselanguage in Codex?

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

Can I use Mps Baselanguage 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-baselanguage -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-baselanguage, .gemini/skills/mps-baselanguage, .github/skills/mps-baselanguage and .opencode/skills/mps-baselanguage in your project.

What does Mps Baselanguage need to run?

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

Does Mps Baselanguage access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Mps Baselanguage 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 Baselanguage use?

Mps Baselanguage 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 Baselanguage use?

About 2.2k tokens (SKILL.md is roughly 9k 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 9.1k tokens, read only when the agent opens those files.

What are the alternatives to Mps Baselanguage?

Skills that share tags, products or a category with Mps Baselanguage: Amplicode Install (Amplicode/spring-skills, 126 stars), Idea MCP (dtprj/dongting, 208 stars), Dto Creator (Amplicode/spring-skills, 126 stars) and Java Debug (Amplicode/spring-skills, 126 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Mps Baselanguage?

JetBrains (a GitHub organization, an official publisher) maintains it in JetBrains/MPS, which has 1,660 GitHub stars. The repository holds 40 skills in this directory. The repository was last updated on October 7, 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.