Help us improve
Share bugs, ideas, or general feedback.
From code
Fixes IntelliJ auto-formatter issues in Java code generators using string concatenation with @formatter:off guards and one-output-line-per-source-line convention. For writing, reviewing, or generating such code.
npx claudepluginhub motlin/claude-code-plugins --plugin codeHow this skill is triggered — by the user, by Claude, or both
Slash command
/code:code-generationThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Java code generators that build source code via string concatenation must use `// @formatter:off` / `// @formatter:on` guards. Without these, IntelliJ's auto-formatter breaks concatenation chains across multiple lines, destroying the correspondence between Java source lines and generated output lines.
Configures clang-format code formatting: creates .clang-format from templates, analyzes code styles to generate configs, troubleshoots issues, integrates with git and editors.
Explains Java code in plain language: purpose, step-by-step logic, features like streams and annotations, design patterns, and gotchas. Activates on 'explain this code' or similar queries.
Develops custom Checkstyle checks, filters, and plugin integrations for project-specific Java code standards.
Share bugs, ideas, or general feedback.
Java code generators that build source code via string concatenation must use // @formatter:off / // @formatter:on guards. Without these, IntelliJ's auto-formatter breaks concatenation chains across multiple lines, destroying the correspondence between Java source lines and generated output lines.
Each line of generated output (terminated by \n) must occupy a single Java source line. A new line in the Java source should only occur where there is a \n in the template string.
setterBody = ""
+ " domainObject.get"
+ propNameUpper
+ "().clear();\n"
+ " return;\n";
// @formatter:off
setterBody = ""
+ " domainObject.get" + propNameUpper + "().clear();\n"
+ " return;\n";
// @formatter:on
Search for string concatenation blocks that contain \n literals but are NOT wrapped in // @formatter:off. Common patterns:
+ chains where each + is on its own line and template variables are separated from their surrounding string literals.collect() lambdas producing single-line templates that got broken across multiple linesreturn ( "" + ... ) instead of direct return "" + ...\n that lacks @formatter:off guards// @formatter:off before the block\n-terminated segment is on one Java source line// @formatter:on after the block.collect() lambdas that produce single-line templates (one \n), collapse the entire template string onto one line\n-terminated segment gets its own line with + continuation@formatter:off blocks in the fileMatch the existing convention in each file. The typical pattern uses tabs with + aligned:
// @formatter:off
// language=JAVA
return ""
+ "package " + packageName + ";\n"
+ "\n"
+ "public class " + className + "\n"
+ "{\n"
+ "}\n";
// @formatter:on
For .collect() lambdas with single-line output, keep it all on one line:
// @formatter:off
String fields = properties
.collect((p) -> " public final " + this.getType(p) + " " + p.getName() + ";\n")
.makeString("");
// @formatter:on
When the string block contains valid Java source, add // language=JAVA after // @formatter:off to enable IntelliJ language injection for syntax highlighting inside the strings.