ssr

ssr is a skill for Claude Code, Codex from JetBrains/MPS. It costs 25 tokens per session (970 once invoked), scanned A, original, Apache-2.0.

A guide for IntelliJ’s Structural Search and Replace, a tool for finding code patterns and optionally replacing them. It explains how to create or edit these search rules in the project’s .idea files.

In plain words
What is it for?
Use it to create or modify IntelliJ inspections and code-pattern searches, such as detecting specific Java expressions and suggesting replacements.
Why use it?
It provides the file locations, search method, and XML format needed to change structural search inspections without relying on IDE search.

Skill for Claude CodeCodex

About the project

JetBrains MPS is a development environment for creating domain-specific languages, which are programming languages designed for a particular field or task. It provides editors with features such as completion, semantic checks, and type checking, and can generate code in languages including Java and XML.

JetBrains/MPS · 1,658 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/jetbrains/mps/ssr
Any agent
npx skills add JetBrains/MPS --skill ssr
Clone the repo
git clone --depth 1 https://github.com/JetBrains/MPS

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ssr

README.md
[![agentmods](https://agentmods.dev/badge/skills/jetbrains/mps/ssr.svg)](https://agentmods.dev/skills/jetbrains/mps/ssr)
Your own site
<a href="https://agentmods.dev/skills/jetbrains/mps/ssr"><img src="https://agentmods.dev/badge/skills/jetbrains/mps/ssr.svg" alt="Measured on agentmods" height="20"></a>
Per session 25 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 970 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00025 $0.00970
Opus 5 $0.00013 $0.00485
Sonnet 5 $0.00005 $0.00194
Haiku 4.5 $0.00003 $0.00097

Measured 4d ago against content hash a4d05c554608, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

ssr scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/ssr/SKILL.md · 61 lines

What it actually says

Structural Search and Replace

  • You must use terminal search (ls, cat and grep) to read directory .idea. Do not use IDE search.

  • The contents of structural search inspections is located in .idea/inspectionProfiles/idea_default.xml

  • Here is an example of a Structural Search and Replace inspection:


<replaceConfiguration name="Use Strings.areSameInstance instead of =="
                      description="Comparing Strings by references usually indicate a mistake, if you really need to do this (for performance reeasons or to implement &quot;Sentinel&quot; pattern), use Strings.areSameInstance method to make the intention explicit and get rid of warning."
                      suppressId="StringEqualitySSR"
                      problemDescriptor="Use !Strings.areSameInstance instead of '!=' if you really need to compare strings by reference"
                      text="$s1$ == $s2$" recursive="false" caseInsensitive="false" type="JAVA" pattern_context="default"
                      search_injected="false" reformatAccordingToStyle="false" shortenFQN="true"
                      replacement="com.intellij.openapi.util.text.Strings.areSameInstance($s1$, $s2$)">
  <constraint name="__context__" within="" contains=""/>
  <constraint name="s1" nameOfExprType="java\.lang\.String" within="" contains=""/>
  <constraint name="s2" nameOfExprType="java\.lang\.String" within="" contains=""/>
</replaceConfiguration>

This node should be located under <inspection_tool class="SSBasedInspection" tag.

  • Here is an example of a Structural Search inspection:

<searchConfiguration name="Raw coroutine scope creation" uuid="e11e9d2f-7cc2-3359-a78a-24f67cbe0850"
                     description="Coroutine scope should be created:&#10;&lt;ul&gt;&#10;&lt;li&gt;by a coroutine builder (&lt;code&gt;launch&lt;/code&gt;, &lt;code&gt;async&lt;/code&gt;, &lt;code&gt;runBlockingCancellable&lt;/code&gt;);&lt;/li&gt;&#10;&lt;li&gt;by a scoping function (&lt;code&gt;withContext&lt;/code&gt;, &lt;code&gt;coroutineScope&lt;/code&gt;, &lt;code&gt;supervisorScope&lt;/code&gt;);&lt;/li&gt;&#10;&lt;li&gt;by injecting it into a service constructor;&lt;/li&gt;&#10;&lt;li&gt;by explicitly creating a child scope (&lt;code&gt;childScope&lt;/code&gt;, &lt;code&gt;namedChildScope&lt;/code&gt;)&lt;/li&gt;&#10;&lt;/ul&gt; "
                     suppressId="RAW_SCOPE_CREATION"
                     problemDescriptor="Raw scope might not be linked to any parent unintentionally (if passed context does not have any &lt;code&gt;Job&lt;/code&gt;, or if passed &lt;code&gt;Job&lt;/code&gt; does not have any parent). Use &lt;code&gt;namedChildScope()&lt;/code&gt; on some existing scope instead. If no parent is actually intended, use &lt;code&gt;GlobalScope.namedScope()&lt;/code&gt;."
                     text="CoroutineScope($args$)" recursive="true" caseInsensitive="true" type="Kotlin" pattern_context="default"
                     search_injected="false">
  <constraint name="__context__" within="" contains=""/>
  <constraint name="args" within="" contains=""/>
</searchConfiguration>

This node should be located under <inspection_tool class="SSBasedInspection" tag.

  • To configure the scope of inspection, you need to make changes similar to this pattern, where class is UUID of the created replace configuration.

<inspection_tool class="e5d3c6f8-12ab-4cc9-8e51-8a8f1bd1c3e2" enabled="true" level="WARNING" enabled_by_default="false">
  <scope name="IDE Testing Framework" level="WARNING" enabled="true"/>
  <scope name="Tests" level="WARNING" enabled="true"/>
  <scope name="test-framework" level="WARNING" enabled="true"/>
</inspection_tool>
  • You must run InspectionProfileConsistencyTest after changing xml files
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 61 lines · 25 tokens per session scan A a4d05c554608

Subscribe to this mod's changes

ssr is a skill published in the GitHub repository JetBrains/MPS (1,658 stars, last pushed today), licensed Apache-2.0. It adds 25 tokens to every session and 970 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

langium

A comprehensive skill to understanding how Langium-based projects work — from grammar definition through code generation, runtime parsing, linking, validation, and LSP integration.

eclipse-langium/langium-ai · 33 tokens

lai-gen-evals

Expand and refine the evaluation suite for a Langium DSL project. Generates comprehensive eval files that cover syntactic correctness, semantic validity, user intent matching, edge cases, and language understanding.

eclipse-langium/langium-ai · 42 tokens

lai

Guide for using the langium-ai (LAI) CLI to generate language descriptors, synthesize system prompts, run evaluations, and iteratively refine AI-powered tooling in Langium projects. Use when working with lai commands, descriptors, or evaluation files.

eclipse-langium/langium-ai · 52 tokens

lai-gen-descriptor

Generate or refine a language descriptor for a Langium DSL project. Bootstraps a new descriptor via lai gen descriptor if none exists, then guides refinement of paths, services, examples, documentation, and structure.

eclipse-langium/langium-ai · 49 tokens

lai-gen-mcp

Generate a Model Context Protocol (MCP) server that exposes a Langium DSL's parser and validator as an MCP tool, allowing any MCP-compatible client to validate DSL code and receive diagnostics.

eclipse-langium/langium-ai · 43 tokens

lai-gen-language-skill

Skill for generating a skill for understanding a specific Langium-based DSL. Used in cooperation with the lai & langium skills for understanding.

eclipse-langium/langium-ai · 33 tokens