mps-quotations
Skill1.7k starsChanged 2 months agoApache-2.0View on GitHub
Use when writing or debugging MPS quotations and anti-quotations — "node literals" that create SNode trees inline in behavior, typesystem, intentions, generator, and other model code. Covers heavy quotations (`Quotation`, `<...>`), light quotations (`NodeBuilder`, constructor-style for bootstrapping), and the four anti-quotation varieties: child (`%(...)%`), list (`*(...)*`), reference (`^(...)^`), property (`$(...)$`). Reach for this skill whenever the task involves splicing runtime values into quoted node trees or choosing between heavy and light quotations.
Trending
Quiet since October.thin dataabout the whole repository
Who's talking about JetBrains/MPS
- mbeddr/mps-gradle-plugin“Null pointer exception on generate”GitHub · May 18, 2020 · 1 reactions
- nebojsa-vuksic/skill-atlas“Scan every repository of an organization or user”GitHub · Oct 1, 2026
- modelix/modelix.editor“Implement MPS shortcuts”GitHub · Feb 21, 2023
The biggest 3 of 3 mentions linking to the repository that our crawl found. Each line is their own headline.
In this repository83 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- actionsSkill
- bugfix-workflowSkill
- code-styleSkill
- commitsSkill
- debuggingSkill
- mps-aspect-accessoriesSkill
- mps-aspect-actionsSkill
- mps-aspect-behaviorSkill
- mps-aspect-constraintsSkill
- mps-aspect-dataflowSkill
- mps-aspect-editor-menus-and-keymapsSkill
- mps-aspect-editorSkill
- mps-aspect-generation-planSkill
- mps-aspect-generatorSkill
- mps-aspect-intentionsSkill
- mps-aspect-migrationsSkill
- mps-aspect-structure-conceptsSkill
- mps-aspect-textgenSkill
- mps-aspect-typesystemSkill
- mps-baselanguageSkill
- mps-build-languageSkill
- mps-consoleSkill
- mps-distribution-buildSkill
- mps-dsl-memorySkill
- mps-ide-pluginSkill
- mps-lang-core-xmlSkill
- mps-language-analysisSkill
- mps-language-aspects-overviewSkill
- mps-language-inheritanceSkill
- mps-language-modularitySkill
- mps-mcp-workflowSkill
- mps-model-manipulationSkill
- mps-node-editingSkill
- mps-project-managementSkill
- mps-run-configurationsSkill
- mps-testsSkill
- registrySkill
- skill-optimization-studySkill
- ssrSkill
- teamcity-cliSkill
- actionsSkill
- bugfix-workflowSkill
- code-styleSkill
- commitsSkill
- debuggingSkill
- mps-aspect-accessoriesSkill
- mps-aspect-actionsSkill
- mps-aspect-behaviorSkill
- mps-aspect-constraintsSkill
- mps-aspect-dataflowSkill
- mps-aspect-editor-menus-and-keymapsSkill
- mps-aspect-editorSkill
- mps-aspect-generation-planSkill
- mps-aspect-generatorSkill
- mps-aspect-intentionsSkill
- mps-aspect-migrationsSkill
- mps-aspect-structure-conceptsSkill
- mps-aspect-textgenSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 0 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 21
Use the concept identifier inside a quotation, not an alias.
- Very specific: line 22
All four anti-quotation kinds attach via the inherited smodelAttribute role on any BaseConcept.
- Very specific: line 25
Prefer heavy quotation (<...>) for readability.
- Very specific: line 32
Add jetbrains.mps.lang.quotation to the host model's used languages, plus the language whose concepts will be quoted.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
MPS Quotations and Anti-quotations
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.
A quotation is a node literal — a concise expression that evaluates to an SNode (or tree of SNodes) at runtime. Instead of building nodes manually via the smodel API, you write the desired structure in the target language syntax and let MPS wrap it. Anti-quotations ("antiquotations") are escape holes inside a quotation where a runtime expression is spliced in.
Required used language: jetbrains.mps.lang.quotation (UUID 3a13115c-633c-4c5c-bbcc-75c4219e9555)
Critical Directives
- Quotations do not call behavior constructors. Using
<Car()>produces anSNodeof conceptCarwithout running its constructor. Usenew node<Car>()(smodel API) when you need the constructor to run. - Use the concept identifier inside a quotation, not an alias. Write
<IntegerType>, not<int>. - All four anti-quotation kinds attach via the inherited
smodelAttributerole on anyBaseConcept. The anti-quotation node is a sibling attribute of the host node, not a replacement child. The runtime substitution happens during materialisation. Seereferences/antiquotations.md. ListAntiquotationconstraint: the list role must contain at least one placeholder child before you can activate a list antiquotation. The placeholder is replaced at runtime with zero-or-more nodes.PropertyAntiquotation.propertyIdandReferenceAntiquotation.linkIdare filled in automatically by MPS when you type$/^in a property/reference cell. Do not construct these encoded ids manually unless you have already verified the exactlanguage-uuid/concept-id/property-or-link-idform against the running MPS. Seereferences/property-and-reference-ids.md.- Prefer heavy quotation (
<...>) for readability; switch to light quotation (NodeBuilder) only for bootstrapping (the target language can't be aused language), for generators-of-generators, or when nesting depth makes embedded syntax unreadable. Seereferences/heavy-vs-light.md. - The deprecated
NodeBuilderInitLink.expression(cardinality 0..1) was removed in 2019.2. UseinitValuewith aNodeBuilderExpressioninstead. - Edit quotation-bearing models through MPS MCP tools (
mps_mcp_insert_root_node_from_json,mps_mcp_update_node). Do not hand-edit.mpsfiles. - Validate with
mps_mcp_check_root_node_problems; quotations frequently expose missing used-languages on the host model (the quoted concept's language must be a used language, not just a dependency).
Common-Path Workflow
- Add
jetbrains.mps.lang.quotationto the host model's used languages, plus the language whose concepts will be quoted. - In the editor, type
<in an expression position to insert aQuotation, then type the desired surface syntax of the quoted node. The quoted concept must be available as a used language; otherwise switch toNodeBuilder. - To inject runtime values, place the caret inside the appropriate cell and type:
%— child antiquotation (replaces the child node)*— list antiquotation (replaces a list-position node; requires a placeholder child first)^— reference antiquotation (replaces a reference target)$— property antiquotation (replaces a property value)
- For bootstrapping or deep nesting, use the Convert Quotation to NodeBuilder intention (or insert
NodeBuilderdirectly). - Validate with
mps_mcp_check_root_node_problems; rebuild the host language if needed.
When To Use Which Form
| Situation | Recommended form |
| Short, readable node literal in behavior / typesystem / intentions code | Heavy quotation |
| One or more children computed at runtime | Heavy quotation + child/list antiquotation |
| A property computed at runtime | Heavy quotation + property antiquotation |
| A reference target resolved at runtime | Heavy quotation + reference antiquotation |
| Bootstrapping (generating language infrastructure) or concept not importable | Light quotation (NodeBuilder) |
| More than 3 levels of nesting where embedded syntax is confusing | Light quotation (NodeBuilder) |
Related Skills
mps-aspect-behavior— behavior bodies frequently use quotations to build sub-trees; remember constructors do not fire when materialising a quotation.mps-aspect-typesystem—<TypeConcept>literals inside rule bodies are heavy quotations; the typesystem model typically importsjetbrains.mps.lang.quotationas a used language. The:==:/:<=:body shapes are inmps-aspect-typesystemjson-blueprints.md.mps-aspect-generator— template macros are a different mechanism for building target trees; quotations are used in non-template code (filters, mapping scripts, conditions) within the generator model.mps-aspect-migrations—<NewConcept>plus^(oldNode.target)^is the canonical shape inside migration rewrite scripts (references/antiquotation-reference.mdincludes the verbatim example).mps-aspect-intentions— thereplace_invokeOperation_with_compactInvokeexample shipping with the closures language uses<%(...)%>+*(...)*to rebuild an expression tree.mps-aspect-structure-concepts— when the quoted concept's link/property metadata is needed;propertyId/linkIdencode the persistent form of those declarations.mps-model-manipulation— the smodel operations and BaseLanguage expressions used inside antiquotationexpressionslots; for the spliced expression open onlyreferences/dot-expression-basics.mdin themps-model-manipulationskill root after loading that companion skill from the same origin.
Reference Index
- Open
references/heavy-vs-light.mdwhen deciding betweenQuotationandNodeBuilder— the surface trade-offs, the bootstrapping rationale, and the recommendation table for typical situations. - Open
references/heavy-quotation.mdwhen authoring a basicQuotation(<...>) — concept structure, thequotedNode/smodelAttribute/modelToCreateroles, JSON blueprint, and the verbatimMoneyTypeexample from the baseLanguage.money generator. - Open
references/antiquotations.mdfor the full antiquotation catalog — the four kinds at a glance, attachment mechanism viasmodelAttribute, syntax (%/*/^/$), theAbstractAntiquotationinterface, theAntiquotation(child) shape, and the closures-intention worked example combining child + list antiquotations. - Open
references/antiquotation-list.mdwhen working withListAntiquotation(*(...)*) — placeholder requirement, expression type (nlist<..>/Iterable), and how it cooperates with multi-cardinality list roles. - Open
references/antiquotation-property.mdwhen writing or debugging aPropertyAntiquotation($(...)$) — concept structure,propertyId/name_DebugInfo/stringValueMigratedproperties, and the full JSON printout from the quotation editor test. - Open
references/antiquotation-reference.mdwhen a runtime reference target must be spliced —ReferenceAntiquotation(^(...)^) shape,linkId/role_DebugInfoproperties, and the migration-script example creating aNewComponentRefwhose target is computed at runtime. - Open
references/property-and-reference-ids.mdfor the encoded id formats used byPropertyAntiquotation.propertyIdandReferenceAntiquotation.linkId—language-uuid/concept-id/property-or-link-id— and the rule "let MPS fill these in" when editing in the IDE. - Open
references/light-quotation.mdwhen usingNodeBuilder— the constructor-style notation,NodeBuilderNode/NodeBuilderInitLink/NodeBuilderInitProperty/NodeBuilderExpression(#) concept structure, deprecation note onNodeBuilderInitLink.expression, JSON blueprint, and the verbatim nested-NodeBuilder example fromjetbrains.mps.kotlin.smodel.behavior. - Open
references/model-and-node-id.mdwhen the quotation needs to land in a specific model or with a specific node id —ModelNodeInitializershape and JSON blueprint. - Open
references/concept-catalog.mdfor the quick lookup table — FQNs and aliases of everyjetbrains.mps.lang.quotation.structure.*concept, plus the key role names and cardinalities used in JSON blueprints. - Open
references/source-locations.mdfor paths inside the MPS repository — where to find structure/behavior/typesystem/editor of the quotation language, generation+editor test cases, and the source models behind every example used in this skill.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

