Official agent skill

Mps Aspect Textgen

by JetBrains in JetBrains/MPS

A skill your agent uses when authoring or debugging MPS TextGen — concept-to-plain-text serialisation for languages whose final output is text (source files, config, scripts, DDL, XML, markdown).

OfficialApache-2.0Auto-check passedDevelopment

Install Mps Aspect Textgen

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

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

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

At a glance

A skill your agent uses when authoring or debugging MPS TextGen — concept-to-plain-text serialisation for languages whose final output is text (source files, config, scripts, DDL, XML, markdown).

  • Works in 6 steps: Create a textGen model… → For each concept to serialise, insert a… → Fill the textGenBlock body — a… → …
  • Debugging MPS TextGen — concept-to-plain-text serialisation for languages whose final output is text (source files
  • SKILL.md covers Loading companion skills, Critical Directives, Common-Path Workflow and TextGen vs. Generator, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Mps Aspect Textgen is an agent skill from JetBrains/MPS, published by the product's own GitHub organization. Use when authoring or debugging MPS TextGen — concept-to-plain-text serialisation for languages whose final output is text (source files, config, scripts, DDL, XML, markdown). Covers ConceptTextGenDeclaration roots, append / indent buffer / with indent statements, text layout areas, context objects (e.g. imports sets), attributes, the base text gen component (LanguageTextGenDeclaration), binary write, found error, and the indentation-buffer model. Reach for this skill whenever the task involves editing…

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

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

When your agent uses it

  • Debugging MPS TextGen — concept-to-plain-text serialisation for languages whose final output is text (source files

Example prompts

  • “/mps-aspect-textgen”

Workflow steps

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

  1. Create a textGen model (mps_mcp_create_model with moduleName: "" and modelName: ".textGen"; aspect ID is textGen — case-sensitive, no @…
  2. For each concept to serialise, insert a ConceptTextGenDeclaration root via mps_mcp_insert_root_node_from_json. The file-generating concept…
  3. Fill the textGenBlock body — a StatementList of appends, indent buffer, with indent { ... }, and standard BaseLanguage control flow. See…
  4. Push formatting heuristics ("should this go on a new line?") into the behavior aspect and call them back from textgen…
  5. For large-file languages (imports area, headers, shared state), declare a TextUnitLayout, a UnitContextDeclaration in the base…
  6. Validate with mps_mcp_check_root_node_problems, rebuild the language module, regenerate any consumer, and inspect the produced text.

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

    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 Textgen loads about 2.7k tokens when it runs, and up to ~15k if it reads all its reference files. Until then it costs about 144 tokens; SKILL.md has 1,120 words of instructions outside code blocks.

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

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,120 words, ~2,670 tokens.

Download SKILL.mdSave it as .claude/skills/mps-aspect-textgen/SKILL.md (or your agent's skills folder). This skill also uses 17 other files; get the full folder from GitHub.
name
mps-aspect-textgen
description
Use when authoring or debugging MPS TextGen — concept-to-plain-text serialisation for languages whose final output is text (source files, config, scripts, DDL, XML, markdown). Covers `ConceptTextGenDeclaration` roots, `append` / `indent buffer` / `with indent` statements, text layout areas, context objects (e.g. imports sets), attributes, the base text gen component (`LanguageTextGenDeclaration`), binary `write`, `found error`, and the indentation-buffer model. Reach for this skill whenever the task involves editing `<lang>/languageModels/textGen.mps`.
type
reference

MPS TextGen 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.

TextGen turns a model (usually the output of generation) into plain text files. It is how BaseLanguage becomes .java on disk, and how any text-targeting language serialises its models. Lives in <lang>/languageModels/textGen.mps, language jetbrains.mps.lang.textGen. Rule bodies are BaseLanguage + smodel + textgen-specific statements (append, indent buffer, with indent).

Prerequisite for any insert: the textGen model must exist (mps_mcp_create_model with moduleName: "<lang>" and modelName: "<lang>.textGen" — aspect ID textGen, case-sensitive, no @ suffix; see aspect-model-stereotypes.md) and must import jetbrains.mps.lang.textGen, jetbrains.mps.baseLanguage, and jetbrains.mps.lang.smodel as used languages before the first mps_mcp_insert_root_node_from_json. Missing any of these three causes node inserts to fail with unresolved-concept errors. See step 1 of the Common-Path Workflow.

Critical Directives

  • One ConceptTextGenDeclaration root per concept you want to serialise. Only the file-generating root concept needs extension / filename / encoding; structural concepts inside the file need only textGenBlock.
  • extension is a function body returning a string, not a literal property. It must return a string.
  • TextGen dispatch is concept-exact, not polymorphic. An extending concept that wants the parent's serialisation must declare its own ConceptTextGenDeclaration (even an empty one) — or its output will be silently missing. See references/dispatch-and-base-component.md.
  • The indentation buffer is a per-output-file depth counter. with indent / increase depth / decrease depth and the withIndent flag on NodeAppendPart only mutate the counter — whitespace is emitted only when indent buffer is called. Always pair append \n ; with indent buffer ; on the next line that should be indented. See references/indentation-model.md.
  • Prefer with indent { ... } over paired increase depth ; … ; decrease depth ; — the block form cannot leak depth on an early return or exception. Use the paired form only when the scope is not a block.
  • Use TextGen only when the final artifact is text. If your pipeline ends in a model-to-model transformation targeting another MPS language (e.g. BaseLanguage), you don't need TextGen — that language's own TextGen handles the final step.
  • BinaryWriteOperation (write) cannot be mixed with text appends in the same ConceptTextGenDeclaration. A rule emits either text or bytes, not both.
  • The older $ref{node.reference<target>} syntax is deprecated. Use a NodeAppendPart over a resolved node (or over .name).
  • Edit textGen models through MPS MCP tools (mps_mcp_insert_root_node_from_json, mps_mcp_update_node). Do not hand-edit .mps files.
  • After edits run mps_mcp_check_root_node_problems and rebuild the language; regenerate consumers.

Common-Path Workflow

  1. Create a textGen model (mps_mcp_create_model with moduleName: "<lang>" and modelName: "<lang>.textGen"; aspect ID is textGen — case-sensitive, no @ suffix) if absent, then before any insert add the three required used languages: jetbrains.mps.lang.textGen (for ConceptTextGenDeclaration, AppendOperation, parts, NodeParameter, etc.), jetbrains.mps.baseLanguage (for StatementList, DotExpression, control flow, returns), and jetbrains.mps.lang.smodel (for SPropertyAccess, SLinkAccess, SLinkListAccess used to read node data). Also add the structure language whose concepts you serialise (referenced by conceptDeclaration and inside smodel accesses), and jetbrains.mps.baseLanguage.collections if you use maps/lists. Skipping any of the three core languages causes mps_mcp_insert_root_node_from_json to fail with unresolved-concept errors — don't add them piecemeal after a failure.
  2. For each concept to serialise, insert a ConceptTextGenDeclaration root via mps_mcp_insert_root_node_from_json. The file-generating concept also needs extension, optionally encoding / filename / filePath / layout / contextObjects.
  3. Fill the textGenBlock body — a StatementList of appends, indent buffer, with indent { ... }, and standard BaseLanguage control flow. See references/statements-and-appends.md for the part vocabulary and references/json-blueprints.md for AST shapes.
  4. Push formatting heuristics ("should this go on a new line?") into the behavior aspect and call them back from textgen (node.hasNewLineAfter() pattern). See references/delegating-to-behavior.md.
  5. For large-file languages (imports area, headers, shared state), declare a TextUnitLayout, a UnitContextDeclaration in the base LanguageTextGenDeclaration, and per-concept UnitContextObjects. See references/layout-and-context-objects.md.
  6. Validate with mps_mcp_check_root_node_problems, rebuild the language module, regenerate any consumer, and inspect the produced text.
Show full SKILL.md (436 more words)Show less

TextGen vs. Generator

AspectRole
GeneratorModel → Model (typed AST transformation)
TextGenModel → Text (final serialisation)

A custom language usually has both: a generator rewrites into BaseLanguage + runtime API, and BaseLanguage's TextGen emits .java. Write your own TextGen only if you target text directly (as jetbrains.mps.core.xml does).

  • mps-aspect-generator — model-to-model step that usually precedes TextGen; emits the AST you serialise.
  • mps-aspect-behavior — host for layout-heuristic helper methods called from textgen bodies.
  • mps-collections-and-closures — collection operations and closures used inside textgen bodies (.where, foreach, .join).
  • mps-model-manipulation — BaseLanguage + smodel used inside textgen bodies (StatementList, DotExpression, SLinkAccess, SLinkListAccess, StaticMethodCall); for a textGenBlock 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 — anti-quotations may appear inside Quotations used as ${...} expression values.
  • mps-aspect-structure-concepts — when introducing the concepts a textgen will serialise.

Reference Index

Start here — most common case: one ConceptTextGenDeclaration emitting text for one concept → read only references/concept-textgen-root.md and, for the body vocabulary, references/statements-and-appends.md; wrong indentation → only references/indentation-model.md; no output at all → only references/common-failures.md.

  • Open references/concept-textgen-root.md when adding or editing a ConceptTextGenDeclaration — slot purposes (extension, encoding, filename, filePath, layout, contextObjects, textGenBlock), the editor shorthand, and what each child holds.
  • Open references/statements-and-appends.md when writing the body — AppendOperation and its part vocabulary (ConstantStringAppendPart, NodeAppendPart, CollectionAppendPart, NewLineAppendPart), the $list{... with sep} form, BinaryWriteOperation (write), FoundErrorOperation (found error), control flow, and the smodel/behavior accessors usable inside a body.
  • Open references/indentation-model.md when indentation is wrong — the depth-counter mental model, rules of thumb (always pair \n with indent buffer, prefer with indent { ... }, use withIndent flag for one-shot dispatch), and worked examples from IfStatement_TextGen, BlockStatement_TextGen, and ClassConcept_TextGen.
  • Open references/layout-and-context-objects.md when emitting multi-region files (headers, imports, body) or threading per-generation state — TextUnitLayout with append to AREA { ... }, LanguageTextGenDeclaration, UnitContextDeclaration types, and per-concept UnitContextObject bindings (the imports-set pattern). Also covers attribute dispatch order (reverse containment) and ${attributed node}.
  • Open references/dispatch-and-base-component.md for concept-exact dispatch — why an extending concept needs its own (possibly empty) ConceptTextGenDeclaration, and how the base LanguageTextGenDeclaration exposes reusable OperationDeclarations / UtilityMethodDeclarations / UnitContextDeclarations; inheriting between language base components via extends.
  • Open references/delegating-to-behavior.md when textgen bodies grow tangled with formatting heuristics — the xml pattern of moving hasNewLineAfter / isMultiline / onNewLine into behavior and calling them from textgen, plus utility classes (XmlCharEscape) for escaping/formatting.
  • Open references/json-blueprints.md when inserting nodes via MCP — full validated AST shapes for each statement/part (AppendOperation with literal/expression/list parts, WithIndentOperation, IncreaseDepthOperation/DecreaseDepthOperation, NodeAppendPart with withIndent), the minimal file-generating-concept skeleton, layout/context skeletons, and the full validated concept reference (FQNs, concept refs, child roles).
  • Open references/common-failures.md when output is missing, indentation is broken, file extension is wrong, special characters appear unescaped, subclasses emit nothing, imports leak inline, attributes are ignored, or write and append collide.

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

  • SKILL.md
  • references/aspect-model-stereotypes.md
  • references/common-failures.md
  • references/concept-textgen-root.md
  • references/delegating-to-behavior.md
  • references/dispatch-and-base-component.md
  • references/indentation-model.md
  • references/json-blueprints.md
  • references/json-blueprints/append-constant-and-expression.md
  • references/json-blueprints/append-list-dispatch.md
  • references/json-blueprints/append-three-parts.md
  • references/json-blueprints/increase-decrease-depth.md
  • references/json-blueprints/minimal-file-generating-concept.md
  • references/json-blueprints/validated-concept-reference.md
  • references/json-blueprints/with-indent.md
  • references/json-blueprints/withindent-flag.md
  • references/layout-and-context-objects.md
  • references/statements-and-appends.md

Open the folder on GitHubat commit 3e9cfcd

Compare with similar skills

Mps Aspect Textgen 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 Textgen compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Mps Aspect Textgen this skillJetBrains/MPS1.7k—~2.7kAutomated safety check: PassApache-2.0
Idea MCPdtprj/dongting208—~698Automated safety check: PassApache-2.0
Java DebugAmplicode/spring-skills126—~2.7kAutomated safety check: PassNone
Claude Docs Consultantcentminmod/my-claude-code-setup2.7k—~959Automated safety check: PassMIT
Spock AdbWahdanZ/SpockAdb116—~3.3kAutomated safety check: PassApache-2.0
Amplicode InstallAmplicode/spring-skills126—~2.6kAutomated safety check: PassNone

Similar skills

  • Idea MCP

    dtprj/dongting

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

    208 GitHub stars~698 tokensUpdated yesterday
    DevelopmentAuto-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
  • Claude Docs Consultant

    centminmod/my-claude-code-setup

    Consult official Claude Code documentation from code.claude.com using selective fetching.

    2.7k GitHub stars~959 tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • Spock Adb

    WahdanZ/SpockAdb

    Debug Android apps on a connected device or emulator through the Spock ADB MCP server (tools named android).

    116 GitHub stars~3.3k tokensUpdated 4 days ago
    MobileAuto-check passed
  • 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
  • Spring Data Jpa

    Amplicode/spring-skills

    Rules and guidelines for working with Spring Data JPA in the project.

    126 GitHub stars~838 tokensUpdated 1 mo ago
    Agent WorkflowsAuto-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 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~5.1k 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, type queries, validation, MPS MCP tool usage, and the index of companion skills.

    1.7k GitHub stars~6.6k 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

Categories

Questions about Mps Aspect Textgen

What does Mps Aspect Textgen do?

A skill your agent uses when authoring or debugging MPS TextGen — concept-to-plain-text serialisation for languages whose final output is text (source files, config, scripts, DDL, XML, markdown). Mps Aspect Textgen is an agent skill from JetBrains/MPS, published by the product's own GitHub organization. Use when authoring or debugging MPS TextGen — concept-to-plain-text serialisation for languages whose final output is text (source files, config, scripts, DDL, XML, markdown).

When should I use Mps Aspect Textgen?

Mps Aspect Textgen fits situations like: debugging MPS TextGen — concept-to-plain-text serialisation for languages whose final output is text (source files.

How do I install Mps Aspect Textgen in Claude Code?

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

How do I install Mps Aspect Textgen in Codex?

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

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

What does Mps Aspect Textgen need to run?

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

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

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

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

What are the alternatives to Mps Aspect Textgen?

Skills that share tags, products or a category with Mps Aspect Textgen: Idea MCP (dtprj/dongting, 208 stars), Java Debug (Amplicode/spring-skills, 126 stars), Claude Docs Consultant (centminmod/my-claude-code-setup, 2.7k stars) and Spock Adb (WahdanZ/SpockAdb, 116 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Mps Aspect Textgen?

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.