/java:openrewrite-analyze-recipesfrom java
Dry-runs OpenRewrite recipes, counts violations per recipe, and optionally runs one selected recipe. Use when analyzing OpenRewrite rule violations or comparing recipe impact.
Ships in java. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Dry-run all configured OpenRewrite recipes, rank them by violation count, and optionally run one selected recipe in isolation. Follow the java:maven-cli skill whenever invoking Maven, and never use offline mode.
rewrite-maven-plugin configuration in pom.xml. Record the fully-qualified <recipe> names inside <activeRecipes> and any <activeStyles>. If the plugin configuration sits inside a <profile>, add --activate-profiles <that-profile> to every direct Maven call.mise.toml, .mise.toml, or .mise/ config exists, run mise trust first and prefix every command with mise exec --. Without the right JDK, the build fails with release version NN not supported.rewrite-dry-run and rewrite <RECIPE> recipes, prefer them; they already activate the right profile and recipe dependencies. Otherwise use mvn rewrite:dryRun and mvn rewrite:run -Drewrite.activeRecipes=<recipe>.Capture the full log in .llm/, not just the terminal tail. It takes minutes.
mvn rewrite:dryRun 2>&1 | tee .llm/rewrite-dryrun.log | tail -20
cp ./target/rewrite/rewrite.patch .llm/rewrite-dryrun.patch
The dry run fails with Applying recipes would make changes when violations exist. That is the violation report, not an error.
If it fails with MismatchedInputException, RocksdbMavenPomCache, or Failed to parse or resolve the Maven POM, that is OpenRewrite's RocksDB pom-cache serialization bug (a Jackson @ref mismatch, usually after an OpenRewrite version bump). Rerun with -Drewrite.pomCacheEnabled=false. Clearing ~/.rewrite-cache alone does not fix it; the bug recurs on the regenerated cache. Once the flag is needed, carry it into every later run.
Each changed file is preceded in the log by indented [WARNING] lines forming the tree of recipes that touched it. Count them:
grep '\[WARNING\]' .llm/rewrite-dryrun.log \
| grep -E '^\S+\s+\[WARNING\]\s{4,}' \
| sed 's/.*\[WARNING\] *//' \
| sort | uniq -c | sort -rn \
> .llm/rewrite-violations-per-rule.txt
This counts every recipe line in every file's tree, so a composite is counted once per file alongside each child, and a parameterized child appears with its inline options. That raw count is the ranking.
From each file's tree, take the most specific named leaf recipe in each branch. Prefer a named wrapper (e.g. io.liftwizard.UpdateCopyrightYear) over the raw parameterized child it contains (org.openrewrite.text.FindAndReplace: {find=...}), because a recipe shown with inline : {options} cannot be activated by name. Mark composites "(composite)" only when the tree context distinguishes them reliably.
echo "Total files changed: $(grep 'These recipes would make changes' .llm/rewrite-dryrun.log | wc -l | tr -d ' ')"
echo "Patch size: $(wc -l < .llm/rewrite-dryrun.patch) lines"
echo "Total rule violations: $(awk '{s+=$1}END{print s}' .llm/rewrite-violations-per-rule.txt)"
echo "Unique rules triggered: $(wc -l < .llm/rewrite-violations-per-rule.txt | tr -d ' ')"
Show these statistics and the full ranked list as a markdown table with columns Count and Recipe, composites marked.
Use AskUserQuestion to ask which recipe to run, if any, offering the top 3 leaf (non-composite) recipes by fully-qualified name.
Check git status --porcelain first. If there are uncommitted changes, warn the user and ask whether to proceed; do not stash or discard them.
-Drewrite.activeRecipes overrides the POM's <activeRecipes>, so only the selected recipe runs. Keep any mise, just, profile, and pom-cache flags found earlier.
mvn rewrite:run -Drewrite.activeRecipes=<selected.recipe.name> 2>&1 | tail -20
Show git diff --stat and git diff for a few representative files. Do not commit; leave the changes unstaged for review.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub motlin/claude-code-plugins --plugin java6 skills in this plugin
/liquibase-lock-resolverDiagnose Liquibase change-log lock failures in Maven tests and remove only stale H2 database files from build output directories before rerunning the affected tests. Use when failures contain "Could not acquire change log lock", "Currently locked by", or `liquibase.exception.LockException`./maven-cliMaven CLI invocation patterns. Use whenever running `mvn` commands in Java/Maven projects. Covers when `-am` is required, why `-o` (offline) mode hides bugs in multi-worktree setups, and how to verify compile/test cleanly without trusting stale `~/.m2` artifacts./openrewriteOpenRewrite recipe authoring and testing.Other plugins' skills for the same job