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.
npx agentmods add skills/motlin/claude-code-plugins/openrewritenpx skills add motlin/claude-code-plugins --skill openrewritegit clone --depth 1 https://github.com/motlin/claude-code-pluginsWrote 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.
[](https://agentmods.dev/skills/motlin/claude-code-plugins/openrewrite)<a href="https://agentmods.dev/skills/motlin/claude-code-plugins/openrewrite"><img src="https://agentmods.dev/badge/skills/motlin/claude-code-plugins/openrewrite.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00032 | $0.01267 |
| Opus 5 | $0.00016 | $0.00633 |
| Sonnet 5 | $0.00006 | $0.00253 |
| Haiku 4.5 | $0.00003 | $0.00127 |
Grade A, and why
openrewrite 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.
How it starts
The opening of the file, as written. The whole thing — 223 lines — stays where its author put it; the contents beside it link to each section on GitHub.
OpenRewrite Recipe Development
This skill provides guidelines for developing OpenRewrite recipes and maintaining their tests, with a focus on import ordering issues.
Fixing Import Ordering Test Failures
🔧 OpenRewrite recipe tests often fail due to import order differences, not actual transformation issues.
Problem
OpenRewrite recipe tests fail with diffs showing only import order differences:
-import java.util.List;
-import org.assertj.core.api.Assertions;
+import org.assertj.core.api.Assertions;
+import java.util.List;
Root Cause
OpenRewrite manages imports automatically based on:
- Existing imports in the file
- JavaTemplate configuration
- Import optimization rules
- The order may differ from test expectations
Solution Approach
1. Fix the Recipe (if imports are missing)
Ensure your JavaTemplate is properly configured:
JavaTemplate template = JavaTemplate
.builder("Your.template.code()")
.imports(
"org.assertj.core.api.Assertions",
"org.eclipse.collections.impl.utility.Iterate"
)
.contextSensitive() // Important for proper context handling
.javaParser(JavaParser.fromJavaVersion()
.classpath("assertj-core", "eclipse-collections", "eclipse-collections-api")
)
.build();
Don't forget to call:
maybeAddImport("org.assertj.core.api.Assertions");
maybeAddImport("org.eclipse.collections.impl.utility.Iterate");
maybeRemoveImport("old.package.OldClass");
2. Fix the Test Expectations
Accept the actual import order that OpenRewrite produces:
❌ Instead of forcing a specific order:
// DON'T expect a specific order you want
"import java.util.List;\n" +
"import org.assertj.core.api.Assertions;\n"
✅ Use the actual order OpenRewrite produces:
// DO accept the order OpenRewrite generates
"import org.assertj.core.api.Assertions;\n" +
"import org.eclipse.collections.impl.utility.Iterate;\n" +
"\n" +
"import java.util.List;\n"
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.
- yesterday First seen · 223 lines · 32 tokens per session scan A 13f0dcff0bdd
openrewrite is a skill published in the GitHub repository motlin/claude-code-plugins (15 stars, last pushed today), licensed Apache-2.0. It adds 32 tokens to every session and 1,267 once invoked, about $0.0002 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.
Other skills, from other repositories
rust-testing
Rust testing patterns including unit tests, integration tests, async testing, property-based testing, mocking, and coverage. Follows TDD methodology.
golang-testing
Go testing best practices including table-driven tests, test helpers, benchmarking, race detection, coverage analysis, and integration testing patterns. Use when writing or improving Go tests.
temporal-python-testing
Test Temporal workflows with pytest, time-skipping, and mocking strategies. Covers unit testing, integration testing, replay testing, and local development setup. Use when implementing Temporal workflow tests or debugging test failures.
gen-test
Generate idiomatic tests for Go packages and handlers in the Meshery project.
review-usability
Check whether the common Python code an LLM would plausibly write still works on this branch, testing real cases in ./playground against CPython. Use to find behaviour that diverges from CPython or trips up ordinary idiomatic code.
migrate-xunit-to-xunit-v3
Migrate .NET test projects from xUnit.net v2 to xunit.v3 and fix v3 breaks. Use for package/CPM conversion, OutputType=Exe, preserving the VSTest or MTP runner (including projects currently using YTest.MTP.XUnit2), incompatible TFMs, async void tests, string-to-Type attributes, custom Fact/Theory/BeforeAfterTest…