ssr

Automate structural pattern matching and safe replacement in IntelliJ projects.

20.4k|6.0k|Updated Sep 30, 2011
One-click install
npx skills add https://github.com/JetBrains/intellij-community --skill ssr
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ssr
Source: https://github.com/JetBrains/intellij-community/tree/main/.agents/skills/ssr
Command: npx skills add https://github.com/JetBrains/intellij-community --skill ssr

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Structural Search and Replace enables developers to locate and refactor code patterns across large codebases efficiently, reducing manual edits and ensuring consistency.

Core Features & Use Cases

  • Create and customize search patterns for Java, Kotlin, and other languages.
  • Attach SSR patterns to inspections to warn or fix code during analysis.
  • Use precise constraints to constrain matches and apply deterministic replacements.

Quick Start

Open Structural Search and Replace, define a simple Java pattern, and apply the replacement across the codebase.

Frequently Asked Questions about ssr

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I refactor code patterns at scale across a large Java codebase?

Structural Search and Replace automates refactoring at scale by matching code patterns based on syntax structure rather than text, allowing you to apply deterministic replacements across an entire Java project safely.

What is structural pattern matching in IntelliJ and how does it work?

Structural pattern matching in IntelliJ locates code fragments by their syntax tree shape instead of exact text. You define a search pattern, add constraints to narrow matches, and specify a replacement pattern to modify the code.

Can I enforce coding patterns automatically using IntelliJ inspections?

Yes, you can attach Structural Search and Replace patterns to IntelliJ inspections. This warns developers or automatically fixes code during analysis, enforcing consistent coding patterns across the codebase.

Does structural search and replace work with languages other than Java?

Yes, Structural Search and Replace supports creating and customizing search patterns for Java, Kotlin, and other languages within IntelliJ, allowing you to apply constraints and replacements across different codebases.

How do I narrow structural search matches to specific code structures?

You use precise constraints within Structural Search and Replace to narrow matches. By defining conditions on variables and structural elements, you target specific code structures before applying deterministic replacements.