Official agent skill

Mps Aspect Typesystem

by JetBrains in JetBrains/MPS

A skill your agent uses when authoring or debugging MPS typesystem — inference rules (typeof :==: / :<=: / :=:), SubtypingRule, ComparisonRule, InequationReplacementRule, SubstituteTypeRule…

OfficialApache-2.0Auto-check passedDevelopment

Install Mps Aspect Typesystem

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

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

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

At a glance

A skill your agent uses when authoring or debugging MPS typesystem — inference rules (typeof :==: / :<=: / :=:), SubtypingRule, ComparisonRule, InequationReplacementRule, SubstituteTypeRule…

  • Works in 8 steps: Create a typesystem model… → Add used languages:… → Add InferenceRule roots for concepts… → …
  • Debugging MPS typesystem — inference rules (typeof :==: / :<=: / :=:)
  • SKILL.md covers Loading companion skills, Critical Directives, Common-Path Workflow and Related Skills, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Mps Aspect Typesystem is an agent skill from JetBrains/MPS, published by the product's own GitHub organization. Use when authoring or debugging MPS typesystem — inference rules (typeof :==: / :<=: / :=:), SubtypingRule, ComparisonRule, InequationReplacementRule, SubstituteTypeRule, WhenConcreteStatement blocks, NonTypesystemRule checking rules, TypesystemQuickFix, error/warning/info reports with messageTarget highlighting and quick-fix wiring (helginsIntention), and shared BaseLanguage helpers in the typesystem model. Reach for this skill whenever the task involves editing <lang/languageModels/typesystem.mps.

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

It sits in Development. It works with JetBrains IDEs. The repository describes itself as: JetBrains Meta programming System. The licence is Apache-2.0.

When your agent uses it

  • Debugging MPS typesystem — inference rules (typeof :==: / :<=: / :=:)
  • InequationReplacementRule
  • SubstituteTypeRule
  • WhenConcreteStatement blocks

Example prompts

  • “/mps-aspect-typesystem”

Workflow steps

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

  1. Create a typesystem model (mps_mcp_create_model with moduleName: "" and modelName: ".typesystem" — aspect ID typesystem, case-sensitive…
  2. Add used languages: jetbrains.mps.lang.typesystem, and any languages used in bodies (smodel, collections, closures, baseLanguage).
  3. Add InferenceRule roots for concepts whose types you compute (see references/inference-rules.md).
  4. Add SubtypingRule / ComparisonRule / InequationReplacementRule / SubstituteTypeRule roots for the type lattice (see…
  5. Add NonTypesystemRule roots for checks that are not about types (see references/non-typesystem-checking.md).
  6. Add TypesystemQuickFix roots for any fix you want to attach to reports; wire them via a helginsIntention/TypesystemIntention child of the…
  7. Write bodies with BaseLanguage + smodel. Use when concrete (references/when-concrete.md) when you need resolved types before checking. For…
  8. Validate: mps_mcp_check_root_node_problems plus compile the language and test on sample models. A helginsIntention-wired quick fix now…

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 Aspect Typesystem loads about 2.5k tokens when it runs, and up to ~14k if it reads all its reference files. Until then it costs about 138 tokens; SKILL.md has 1,027 words of instructions outside code blocks.

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

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). 1,027 words, ~2,489 tokens.

Download SKILL.mdSave it as .claude/skills/mps-aspect-typesystem/SKILL.md (or your agent's skills folder). This skill also uses 14 other files; get the full folder from GitHub.
name
mps-aspect-typesystem
description
Use when authoring or debugging MPS typesystem — inference rules (`typeof :==: / :<=: / :>=:`), `SubtypingRule`, `ComparisonRule`, `InequationReplacementRule`, `SubstituteTypeRule`, `WhenConcreteStatement` blocks, `NonTypesystemRule` checking rules, `TypesystemQuickFix`, error/warning/info reports with `messageTarget` highlighting and quick-fix wiring (`helginsIntention`), and shared BaseLanguage helpers in the typesystem model. Reach for this skill whenever the task involves editing `<lang>/languageModels/typesystem.mps`.
type
reference

MPS Typesystem and Checking Aspect

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.

The typesystem aspect gives nodes types and reports semantic errors. It combines two related sub-aspects:

  • Typesystem rules — compute types and constraints on them (InferenceRule, SubtypingRule, InequationReplacementRule, ComparisonRule, SubstituteTypeRule).
  • Non-typesystem checking rules — produce errors/warnings/messages without contributing to type inference (NonTypesystemRule, a.k.a. "checking rule").

Lives in <lang>/languageModels/typesystem.mps, language jetbrains.mps.lang.typesystem. Rule bodies are BaseLanguage + smodel + collections + closures.

Critical Directives

  • One InferenceRule (or other root rule) per concept whose type/check you compute. Multiple rules collectively constrain a node — keep each rule focused.
  • The infer prefix makes an inequation soft (the solver tries to satisfy it, will not immediately error). Without infer, violating the inequation reports an error. Choose deliberately.
  • In equation/inequation JSON, both leftExpression and rightExpression are TypeClause slots — always wrap the real Expression in a NormalTypeClause (normalType child holds the actual Expression). Do not put the Expression directly under leftExpression/rightExpression.
  • TextGen-style dispatch caveat does not apply here; typesystem rules are inherited via concept hierarchy, but the overrides property on a rule suppresses inherited rules from superconcepts.
  • TextGen / typesystem error messages: wrap smodel expressions that render types with <...> presentation: error "Expected " + <expectedType> + " but got " + <actualType> -> node;. Avoid raw toString.
  • when concrete (typeof(expr) as v) { ... } defers a block until the type is fully resolved — use it before deciding whether to report an error or assign a result type.
  • Quick fixes (TypesystemQuickFix) are roots, not executed automatically — the user triggers them via the UI. Wire them into a report through the helginsIntention slot (TypesystemIntention wrapper with quickFix ref + actualArguments). See references/quick-fixes.md.
  • Reusable helper code (utility classes, shared algorithms) can live as a plain BaseLanguage ClassConcept root directly in the typesystem model. No separate utility module is required.
  • For MPS-typed return types (sequence<node<X>>, list<node<X>>) the Java parser gives back List<SNode> — fix per references/variable-declarations.md in the mps-model-manipulation skill root after loading that companion skill from the same origin.
  • Edit typesystem models through MPS MCP tools (mps_mcp_insert_root_node_from_json, mps_mcp_update_node, mps_mcp_parse_java_and_insert). Do not hand-edit .mps files.
  • After edits run mps_mcp_check_root_node_problems, compile the language, and test on sample models.

Common-Path Workflow

  1. Create a typesystem model (mps_mcp_create_model with moduleName: "<lang>" and modelName: "<lang>.typesystem" — aspect ID typesystem, case-sensitive, no @ suffix; see aspect-model-stereotypes.md) if absent.
  2. Add used languages: jetbrains.mps.lang.typesystem, and any languages used in bodies (smodel, collections, closures, baseLanguage).
  3. Add InferenceRule roots for concepts whose types you compute (see references/inference-rules.md).
  4. Add SubtypingRule / ComparisonRule / InequationReplacementRule / SubstituteTypeRule roots for the type lattice (see references/lattice-rules.md).
  5. Add NonTypesystemRule roots for checks that are not about types (see references/non-typesystem-checking.md).
  6. Add TypesystemQuickFix roots for any fix you want to attach to reports; wire them via a helginsIntention/TypesystemIntention child of the warning/error/info statement (see references/quick-fixes.md).
  7. Write bodies with BaseLanguage + smodel. Use when concrete (references/when-concrete.md) when you need resolved types before checking. For helper code, place a ClassConcept root directly in the typesystem model and call it from rules.
  8. Validate: mps_mcp_check_root_node_problems plus compile the language and test on sample models. A helginsIntention-wired quick fix now surfaces in the check report's quickFixes array and can be applied with mps_mcp_apply_intention(nodeReference = <problem node>, intentionId = <fix id>); an auto-applicable fix runs under autoApplyQuickFixes=true.
Show full SKILL.md (415 more words)Show less
  • mps-aspect-behavior — behavior methods called from rule bodies via node.method(); common host for getType / isAssignableFrom-style helpers callable from typesystem.
  • mps-aspect-constraints — non-type validation often lives in constraints; consider whether a check belongs there before adding a NonTypesystemRule.
  • mps-aspect-intentions — distinct from TypesystemQuickFix (intentions are user-invoked from caret; quick fixes attach to a report).
  • mps-model-manipulation — full BaseLanguage / smodel / collections reference used inside rule bodies (StatementList, DotExpression, smodel operations, the List<SNode> → sequence<node<X>> return-type fix); for an inference or checking rule 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-quotations — <type> literals in rule bodies are heavy quotations; %(expr)% splices use the Antiquotation family. The typesystem model usually uses jetbrains.mps.lang.quotation as a used language.
  • mps-aspect-structure-concepts — when introducing the type concept(s) the rules target.

Reference Index

Start here — most common case: one InferenceRule that types a concept → read only references/inference-rules.md, plus references/json-blueprints.md when inserting it through MCP; a checking rule that reports an error → only references/non-typesystem-checking.md; a type that stays undefined → only references/common-failures.md.

  • Open references/inference-rules.md when writing or debugging an InferenceRule — the operator vocabulary (:==:, :<=:, :>=:, soft infer, strong :<<=: / :>>=:), free type variables (var elementType;), join(A | B), %(...)% anti-quotations in <...> literals, and the four worked examples (StringLiteral, ParenthesizedExpression, TernaryOperator, ForEachStatement).
  • Open references/when-concrete.md when a rule must wait for a resolved concrete type before deciding — WhenConcreteStatement shape, nested when concrete blocks, operation type(op, leftType, rightType), and the bound-variable plumbing (WhenConcreteVariableDeclaration / WhenConcreteVariableReference).
  • Open references/lattice-rules.md for the type-lattice rules — SubtypingRule (single supertype or nlist<> of supertypes), InequationReplacementRule (a.k.a. "replacement rule", structural subtyping with isApplicableClause, isWeak, equationInfo.getNodeWithError()), ComparisonRule (boolean body, weak), and SubstituteTypeRule (attributedNode, return-or-null pattern).
  • Open references/non-typesystem-checking.md when adding a NonTypesystemRule ("checking rule") — error / warning / info "msg" -> node;, isStrongSubtype(typeof(x) :<< t) for strict-subtype tests, and the CheckExcessTypeCasts example.
  • Open references/quick-fixes.md when authoring a TypesystemQuickFix and wiring it into a report — QuickFixArgument declarations, executeBlock / descriptionBlock, the three sample fixes (RemoveExcessTypeCast, RemoveMisplacedDash, HideCardinalityOne), and the full JSON for the helginsIntention / TypesystemIntention / TypesystemIntentionArgument plumbing.
  • Open references/messages-and-helpers.md when crafting messages — the <...> type-rendering convention, messageTarget to highlight just a property/reference/child cell, PropertyMessageTarget shape, and shared BaseLanguage helper roots (ElementSummary pattern).
  • Open references/json-blueprints.md when inserting nodes via MCP — body-level skeletons for each equation/inequation kind, ReportErrorStatement / WarningStatement / InfoStatement with optional helginsIntention / messageTarget, anti-quotation handling inside quotations, minimal rule-root skeletons, and the full validated concept reference with FQNs and concept refs.
  • Open references/common-failures.md when a type is undefined, subtyping isn't applied, error messages render badly, return types fight the Java parser, rules cycle, quick fixes aren't offered, when concrete bodies never run, or SubstituteTypeRule seems ignored.

© 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 14 other files (references) in .agents/skills/mps-aspect-typesystem of JetBrains/MPS.

  • SKILL.md
  • references/aspect-model-stereotypes.md
  • references/common-failures.md
  • references/inference-rules.md
  • references/json-blueprints.md
  • references/json-blueprints/body-level-wrapper.md
  • references/json-blueprints/concept-refs.md
  • references/json-blueprints/minimal-inference-rule.md
  • references/json-blueprints/operator-mapping-and-examples.md
  • references/json-blueprints/validated-root-concept-references.md
  • references/lattice-rules.md
  • references/messages-and-helpers.md
  • references/non-typesystem-checking.md
  • references/quick-fixes.md
  • references/when-concrete.md

Open the folder on GitHubat commit a92f944

Compare with similar skills

Mps Aspect Typesystem 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 Aspect Typesystem compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Mps Aspect Typesystem this skillJetBrains/MPS1.7k—~2.5kAutomated safety check: PassApache-2.0
Doc SyncJetBrains/ideavim10k2 repos~2.6kAutomated safety check: PassMIT
ChangelogJetBrains/ideavim10k1 repos~2.7kAutomated safety check: PassMIT
Youtrack CommunityJetBrains/intellij-community21k—~3.2kAutomated safety check: NotesCustom licence
Roo Conflict Resolutionzgsm-ai/costrict4.4k—~2.3kAutomated safety check: PassApache-2.0
Extensions API MigrationJetBrains/ideavim10k—~1.7kAutomated safety check: PassMIT

Similar skills

  • Doc Sync

    JetBrains/ideavim

    Official

    Keeps IdeaVim documentation in sync with code changes. An agent skill from JetBrains/ideavim.

    10k GitHub starsUsed in 2 repos~2.6k tokens
    DevelopmentAuto-check passed
  • Changelog

    JetBrains/ideavim

    Official

    Maintains the IdeaVim changelog (CHANGES.md). An agent skill from JetBrains/ideavim.

    10k GitHub starsUsed in 1 repo~2.7k tokens
    DevelopmentAuto-check passed
  • Youtrack Community

    JetBrains/intellij-community

    Official

    YouTrack CLI for a community checkout; the monorepo uses youtrack.

    21k GitHub stars~3.2k tokensUpdated yesterday
    DevelopmentAuto-check: notes
  • Roo Conflict Resolution

    zgsm-ai/costrict

    Provides comprehensive guidelines for resolving merge conflicts intelligently using git history and commit context.

    4.4k GitHub stars~2.3k tokensUpdated 8 days ago
    DevelopmentAuto-check passed
  • Extensions API Migration

    JetBrains/ideavim

    Official

    Migrates IdeaVim extensions from the old VimExtensionFacade API to the new @VimPlugin annotation-based API.

    10k GitHub stars~1.7k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Architecture Canvas

    yulonghe97/draw-architecture

    Turn any system architecture into an interactive, pannable/zoomable canvas diagram (dark by default with a light switcher, JetBrains Mono, plane-coloured bands, click-to-isolate focus, PNG export) —…

    146 GitHub stars~1.3k tokensUpdated 1 mo ago
    DevelopmentAuto-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

Works with

Categories

Questions about Mps Aspect Typesystem

What does Mps Aspect Typesystem do?

A skill your agent uses when authoring or debugging MPS typesystem — inference rules (typeof :==: / :<=: / :=:), SubtypingRule, ComparisonRule, InequationReplacementRule, SubstituteTypeRule…. Mps Aspect Typesystem is an agent skill from JetBrains/MPS, published by the product's own GitHub organization. Use when authoring or debugging MPS typesystem — inference rules (typeof :==: / :<=: / :=:), SubtypingRule, ComparisonRule, InequationReplacementRule, SubstituteTypeRule, WhenConcreteStatement blocks, NonTypesystemRule checking rules, TypesystemQuickFix, error/warning/info reports with messageTarget highlighting and quick-fix wiring (helginsIntention), and shared BaseLanguage helpers in the typesystem model.

When should I use Mps Aspect Typesystem?

Mps Aspect Typesystem fits situations like: debugging MPS typesystem — inference rules (typeof :==: / :<=: / :=:); inequationReplacementRule; substituteTypeRule; whenConcreteStatement blocks.

How do I install Mps Aspect Typesystem in Claude Code?

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

How do I install Mps Aspect Typesystem in Codex?

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

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

What does Mps Aspect Typesystem need to run?

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

Does Mps Aspect Typesystem 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 Aspect Typesystem 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 Aspect Typesystem use?

Mps Aspect Typesystem 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 Aspect Typesystem use?

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

What are the alternatives to Mps Aspect Typesystem?

Skills that share tags, products or a category with Mps Aspect Typesystem: Doc Sync (JetBrains/ideavim, 10k stars), Changelog (JetBrains/ideavim, 10k stars), Youtrack Community (JetBrains/intellij-community, 21k stars) and Roo Conflict Resolution (zgsm-ai/costrict, 4.4k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Mps Aspect Typesystem?

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.