Reformats source code using the project's IntelliJ IDEA code-style settings. Supports single files, line ranges, and git-changed files. Invoke after editing to maintain consistent formatting.
How this skill is triggered — by the user, by Claude, or both
Slash command
/amplicode-spring-skills:codefmtThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
This project runs inside a live IntelliJ IDEA instance reachable through the
This project runs inside a live IntelliJ IDEA instance reachable through the
MCP Steroid tools. The IDE's own formatter (ReformatCodeProcessor) applies
the project's configured code style — the same result a developer gets from
Code → Reformat Code. Driving it through the IDE (rather than an external
CLI formatter) means the style always matches what the team sees, and the IDE's
VFS/PSI/index caches stay consistent after the edit.
ToolSearch("steroid list projects execute code") then use
steroid_list_projects and steroid_execute_code.steroid_list_projects and take the
project_name (the opaque key, e.g. spring-petclinic-ipvczgii), not the
human-readable name. Every steroid_execute_code call needs this key.modal: "smart_non_modal" (the default). It
commits documents and refreshes the VFS around your script, which is exactly
what formatting needs.| The user wants to format… | Use |
|---|---|
| One file named by path or class name | Single file |
| A specific block / line range in a file | Code block |
| Every uncommitted / changed file | All uncommitted files → run the bundled script |
| Several named files at once | A group of named files |
Always report back what actually changed — run git diff --stat <paths> after
formatting. It's normal and correct for a reformat to produce no diff when
the file already conforms to the code style; say so plainly rather than implying
work was done.
Script: scripts/format-single-file.kts.
To run it: read the script, edit the name / pathSuffix placeholders at
the top to point at the target file, then pass the body as the code argument
to steroid_execute_code. Drop the OptimizeImportsProcessor line for non-JVM
files.
Script: scripts/format-code-block.kts.
To run it: read the script, edit the name / startLine / endLine
placeholders, then pass the body as the code argument to
steroid_execute_code. If the user pasted a snippet rather than a line range,
build the TextRange from indexOf(snippet) instead — see the header comment
in the script.
This is a bundled, validated script:
scripts/format-uncommitted.kts.
To run it: read the script file and pass its body as the code argument to
steroid_execute_code (project_name = the routing key, modal: "smart_non_modal"). It's self-contained — no arguments needed. Afterward, run
git status --porcelain / git diff --stat to show the user the result.
Adjust the FORMATTABLE extension set at the top of the script if the user
wants a narrower or wider net (e.g. only java).
Script: scripts/format-file-group.kts.
To run it: read the script, edit the requested list to the target files,
then pass the body as the code argument to steroid_execute_code.
npx claudepluginhub amplicode/spring-skills --plugin spring-toolsConfigures clang-format code formatting: creates .clang-format from templates, analyzes code styles to generate configs, troubleshoots issues, integrates with git and editors.
Formats and validates code files using Prettier. Detects config, reports non-conforming files, applies formatting, and sets up pre-commit hooks.
Reviews code against project-specific coding guidelines and refactors to improve maintainability, best practices, and test reliability.