From axoniq-migration
Apply the Axon Framework 4 → 5 OpenRewrite bulk-migration recipe (maven or gradle, free or commercial variant). Use when the user says "run openrewrite", "apply axon migration recipe", "axon4to5-openrewrite", "migrate to axon 5", or "migrate to axoniq 5". Detects build tool, picks the recipe by --framework, runs, offers to commit. Idempotent — safe to re-run.
How this skill is triggered — by the user, by Claude, or both
Slash command
/axoniq-migration:axon4to5-openrewrite --framework {axon|axoniq} [--commit {true|false}]--framework {axon|axoniq} [--commit {true|false}]sonnetThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Run the Axon 4→5 OpenRewrite recipe in the user's project. Nothing else. Report success/failure and offer the standard commit.
Run the Axon 4→5 OpenRewrite recipe in the user's project. Nothing else. Report success/failure and offer the standard commit.
Done when: scripts/migrate.sh <framework> exits 0 and the project has changes vs its prior state.
Compilation is NOT a success criterion. The OpenRewrite recipe cannot perform the full Axon 4 → 5 migration on its own — there will be missing parts that require manual follow-up (custom code paths, removed APIs without 1:1 replacements, ambiguous mappings). A non-compiling project after the recipe is the expected baseline for the next step, not a failure of this skill.
framework ∈ {axon, axoniq} — extract from --framework <value> in user's message. Default = axoniq if absent.commit ∈ {true, false, absent} — extract from --commit <value> in user's message. Controls post-run commit behaviour (see Commit below). Absent = ask interactively.pom.xml or build.gradle[.kts] lives).references/recipe-version (single source — edit there to bump).framework. Reject anything other than axon / axoniq with one line, stop.pom.xml OR build.gradle[.kts]. If not, stop with one line.<skill-dir>/scripts/migrate.sh <framework>
assets/init.gradle is referenced by absolute path; never copied in.Single canonical message (do NOT customize per run):
COMMIT_MESSAGE_TEMPLATE:
chore(af5): apply Axon 4 → 5 OpenRewrite migration (--framework <FRAMEWORK>)
Substitute <FRAMEWORK> with the actual value (axon or axoniq). Use the result verbatim.
--commit true → git add -A && git commit -m "<message>". No prompt.--commit false → leave changes staged and unstaged as the recipe left them. No commit, no prompt.NEVER commit on failure. NEVER customize the message per run.
Match the error output, then apply:
Could not find artifact org.axonframework:axon-migration:... — the recipe artifact didn't resolve from any configured repository (Maven Central, Sonatype snapshots, mavenLocal). Surface the error to the user verbatim along with the version from references/recipe-version and the repositories the build tried. Do NOT instruct the user to install it themselves — they may not have source access. Ask: [retry] / [abort].Unsupported class file major version / class file version — build wrapper too old for the current JDK. Go to Wrapper bump below; that's the preferred recovery. Fallback only if wrapper bump fails or user declines: ask user to set JAVA_HOME to a JDK matching the wrapper.Triggered ONLY by the "Unsupported class file major version" routing rule. NEVER preemptively.
Procedure:
gradle/wrapper/gradle-wrapper.properties.mvn/wrapper/maven-wrapper.properties
If absent, skip wrapper bump — fall back to the JAVA_HOME workaround.WebFetch (https://services.gradle.org/versions/current for Gradle, https://maven.apache.org/download.cgi for Maven) or WebSearch if WebFetch is unavailable. Cache the result for the rest of this run.distributionUrl. If the current version is already ≥ the latest stable, the JDK error has a different cause — surface output and ask the user.distributionUrl to point at the latest stable. Trust your knowledge of the Gradle/Maven wrapper format.migrate.sh <framework>.User messaging:
🔧 Build wrapper too old for JDK <DETECTED>. Bumping <Gradle|Maven> wrapper to <LATEST> and retrying…Use these verbatim. Substitute <FRAMEWORK> and <BUILD> (maven or gradle).
🔧 Running Axon 4→5 OpenRewrite recipe (<BUILD>, --framework <FRAMEWORK>)…✅ Migration recipe applied. Review the diff before committing.✅ Migration recipe applied and committed.❌ Migration failed (exit <CODE>). See output above. <next-action>❌ Recipe artifact org.axonframework:axon-migration:<VERSION> did not resolve from any configured repository. Verify network access and the repositories your build is configured to use.❌ Build wrapper too old for JDK <DETECTED>. Attempting wrapper bump… (then see Wrapper bump section)MUST:
MUST NOT:
mvn compile / mvn verify / ./gradlew build / any other compilation check to "validate" the result. Compilation is out of scope; see Goal.init.gradle into the user's project.npx claudepluginhub axoniq/agent-skills --plugin axoniq-migrationCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.