openrewrite-analyze-recipes

openrewrite-analyze-recipes is a command for coding agents from motlin/claude-code-plugins. It costs 13 tokens per session (756 once invoked), scanned A, original, Apache-2.0.

A command for previewing OpenRewrite recipes, which are automated code-change rules, and ranking them by how many files they would change. It can optionally preview one selected recipe separately.

In plain words
What is it for?
Use it to read active recipes from a Maven POM, run a dry run, count violations, rank rules, and save the proposed patch.
Why use it?
It shows which automated rules have the largest effect before you apply any changes, helping you choose what to address first.

Command

Part of the java plugin — 7 skills, 3 commands, 1 agent shipped together

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 commands/motlin/claude-code-plugins/openrewrite-analyze-recipes
Clone the repo
git clone --depth 1 https://github.com/motlin/claude-code-plugins

Or install java, the plugin that ships this one along with the rest of its 7 skills, 3 commands, 1 agent.

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 openrewrite-analyze-recipes

README.md
[![agentmods](https://agentmods.dev/badge/commands/motlin/claude-code-plugins/openrewrite-analyze-recipes.svg)](https://agentmods.dev/commands/motlin/claude-code-plugins/openrewrite-analyze-recipes)
Your own site
<a href="https://agentmods.dev/commands/motlin/claude-code-plugins/openrewrite-analyze-recipes"><img src="https://agentmods.dev/badge/commands/motlin/claude-code-plugins/openrewrite-analyze-recipes.svg" alt="Measured on agentmods" height="20"></a>
Per session 13 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 756 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.00013 $0.00756
Opus 5 $0.00006 $0.00378
Sonnet 5 $0.00003 $0.00151
Haiku 4.5 $0.00001 $0.00076

Measured yesterday against content hash 20646badd597, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

openrewrite-analyze-recipes 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 yesterday.

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.

plugins/java/commands/openrewrite-analyze-recipes.md · 86 lines

How it starts

The opening of the file, as written. The whole thing — 86 lines — stays where its author put it; the contents beside it link to each section on GitHub.

OpenRewrite Analyze Recipes

Dry-run all configured OpenRewrite recipes, rank them by number of violations, and present the ranked list. Optionally run a selected recipe in isolation.

Parse active recipes from the POM

Find the rewrite-maven-plugin configuration in pom.xml and extract the list of <recipe> elements inside <activeRecipes>. Save this list for later; you'll need the fully-qualified recipe names.

Also extract the <activeStyles> entries if any exist.

Run the dry run

mvn rewrite:dryRun 2>&1 | tee .llm/rewrite-dryrun.log | tail -20

This may take several minutes. The dry run produces:

  • Console output with [WARNING] lines listing which recipes would change which files
  • A patch file at ./target/rewrite/rewrite.patch

Save the patch

cp ./target/rewrite/rewrite.patch .llm/rewrite-dryrun.patch

Count violations per recipe

The Maven log contains indented [WARNING] lines with recipe names. Extract and 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

Compute summary statistics

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 ' ')"

Present the ranked list

Show the user:

  • The summary statistics
  • The full ranked table from .llm/rewrite-violations-per-rule.txt formatted as a markdown table with columns Count and Recipe
  • Mark composite recipes (recipes that contain other recipes) with "(composite)" if you can identify them from the log's tree structure

Ask which recipe to run

Use AskUserQuestion to ask which recipe to run. Offer the top 3 leaf (non-composite) recipes as options, using their fully-qualified names. The user may also type any recipe name.

Read the full file on GitHub · 86 lines

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. yesterday First seen · 86 lines · 13 tokens per session scan A 20646badd597

Subscribe to this mod's changes

openrewrite-analyze-recipes is a command published in the GitHub repository motlin/claude-code-plugins (15 stars, last pushed today), licensed Apache-2.0. It adds 13 tokens to every session and 756 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-09-04.