/kanon-java-airails:java-conventionsfrom kanon-java-airails
Generic, composable Java 25 code conventions — modern syntax, code style, naming, visibility, structure, methods, streams, exceptions, and documentation rules that apply across all Java contexts (single-file scripts, CLI apps, MicroProfile/Jakarta EE servers, libraries). Technology-neutral within the Java world; meant to be composed with context-specific skills (e.g. `java-cli-script`, `java-cli-app`, `microprofile-server`, `bce`). Use when writing, generating, or reviewing Java code anywhere the composed skill does not already specify style. Triggers on "Java conventions", "Java style", "Java code style", "modern Java", "Java 25", "idiomatic Java", or any request to write or review Java code where context-specific skills do not already cover style.
Ships in kanon-java-airails. 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.
bce.java-cli-script, java-cli-app, microprofile-server, zb, etc.--enable-previewvar, records, sealed types, pattern matching, text blocks, switch expressionsvar for local variable declarations where the type is obvious from the right-hand sideimport module java.net.http;) over individual type importsjava.base — it is automatically availablecase X -> ...) over old case X: statements with breakinstanceof — if (o instanceof String s) over cast-and-assignswitch for type-based dispatch<> for generic type inferencevoid main() / void main(String... args) over public static void main(String[] args); instance main, not staticjava.util, java.nio.file, java.net.http, or java.timePath over String, URI over String, Duration over long millis, Instant/LocalDate over Date/longprivate methods (including private static helpers) — prefer package-private (default) so same-package unit tests can exercise them directly, including edge cases, without round-tripping through the public APIprivate fields — prefer package-private so same-package tests can read or seed state without reflection or extra accessorsprivate for genuinely sensitive state (credentials, security tokens, invariants that must never be observed externally); the burden of justification is on private, not on package-privatefinal on fields — exception: static final for constants like LOGGERfinal on local variables or parametersstatic methods over classes with private constructorsstatic over default methods@Produces) instead of instantiating an interface inlineof, from, etc.) in records over passing null to constructors*Impl, *Service, *Manager, *CreatorControlResource for JAX-RS classes, Factory for actual GoF factories, Builder for classes with method chainingget prefix; use the record-style convention — configuration() not getConfiguration()String::strip over s -> s.strip(), this::isSkillFile over p -> p.endsWith("SKILL.md")).filter() calls with multiple &&/|| conditions into chained .filter() callsboolean isEligible() instead of inlining age >= 18 && status.equals("active") && !bannedjava.util.stream.Stream API over for loopsforEach; prefer terminal operations that return valuesStream.of over Arrays.stream for known elements.toList() over .collect(Collectors.toList())List.of / Set.of / Map.of over new ArrayList<>() and array literals for small immutable collectionsStream.gather(...) with a Gatherer (Java 24+) over custom Spliterator or stateful forEach for stream transformations that need to keep state across elements or flush a remainder at end-of-streamList.of(), Set.of(), Map.of()), never nullnull values in collections""") for all multiline string content (JSON, SQL, HTML, help/usage text, templates) — never +-concatenation or embedded \n escapesString.formatted() (instance) over String.format(...) (static) for readability at the call siteFiles.readString / Files.writeString / Files.lines over BufferedReader/BufferedWriter ceremonythis to reference instance fields when it improves clarity.close() on any AutoCloseable'\n' not 10, define int ESC = '\033' instead of inlining 27Runnable, Consumer, or lambda in a record instead of switching on type externallyif a pure decisionif/elseOptional as a parameter type; use Optional as a return type only when absence is a meaningful part of the contractjava.lang.Exception or RuntimeException directly — throw a specific subclassthrow e adding no value_ for unused catch parameters (catch (IOException _)) instead of named variables like e or ignoredjava.lang.System.Logger instead of System.out statementsjava.util.logging.LoggerLogger fields must be named LOGGER (uppercase) and marked as static finaljava.net.http.HttpClient APIsHttpClient.sendAsync) only when explicitly requestedtest or shouldisEqualTo assertion makes less specific checks (startsWith, isNotNull) obsolete///, JEP 467); never use HTML-tagged /** */ blocksjava-cli-script, java-cli-app, microprofile-server, bce, zb)IO.println not System.out.println", "no package declaration in single-file scripts", "JAX-RS resources are boundary classes"), apply it on top of these rules; the composed skill always specializes, never contradictsWhat SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub themaverik/kanon --plugin kanon-java-airails8 skills in this plugin
/bceGeneric, composable architecture rules for the Boundary-Control-Entity (BCE/ECB) pattern — business components, layer responsibilities, package structure, and cross-component relationships. Technology-neutral; meant to be composed with language- or framework-specific skills (e.g. microprofile-server, web-components, aws-cdk, java-cli-app). Use when creating, generating, scaffolding, writing, or reviewing code organized as business components with boundary/control/entity layers. Triggers on "BCE", "ECB", "Boundary-Control-Entity", "business component", "BC layout", "BC structure", "boundary layer", "control layer", "entity layer", or requests to organize, package, refactor, or review code along BCE lines./continuous-testingContinuous test-driven development loop — after every code change, builds the project, starts the server, and runs Unit Tests, Integration Tests, and System Tests. Applies on top of microprofile-server skill. Use during development when you want full verification after each change. Triggers on "continuous testing", "continuous-testing", "test loop", "st-loop", or requests to run all tests after every change./ears-testsGenerate parameterized (table-driven) tests from EARS requirement statements — the deterministic transform that turns an SBCE capability spec's `## Requirements` into one parameterized test per requirement group and one labeled row per statement id. Stack-neutral; owns only the EARS→table mapping and the spec↔test trace, and delegates the test syntax to the composed stack skill (JUnit 5, zunit, Playwright). Use whenever turning EARS requirements, acceptance criteria, or an SBCE/`/sbce` spec into tests; whenever you see "When/While/If…then, the … shall …" statements that need covering; or when asked for table-driven, data-driven, or parameterized tests from a requirement group. Triggers on "EARS", "parameterized tests", "table-driven tests", "data-driven tests", "tests from requirements", "tests from the spec", "cover requirement Rn", "generate tests for this capability", "acceptance criteria to tests"./java-distillerSimplify, modernize, refactor, and beautify Java code to produce clean, idiomatic Java 25. Use when asked to distill, simplify, modernize, upgrade, refactor, clean up, beautify, or improve Java code. Triggers on "distill this Java", "modernize this code", "simplify this Java", "upgrade to modern Java", "refactor to Java 25", "clean up this code", "make this idiomatic", "beautify this Java", or when Java code needs transformation to current standards. Not for writing new code from scratch — use java-development for that./microprofile-serverArchitecture and coding rules for long-running Java MicroProfile / Jakarta EE server applications — BCE layering, business components (BC), JAX-RS resources, CDI, JSON-P, testing (unit/integration/system), and Maven project structure. Use when creating, generating, scaffolding, writing, or reviewing code, resources, entities, boundaries, or business components in MicroProfile server projects. Not for serverless deployments./sbceSpec-driven BCE workflow where one capability spec equals one business component (same name) and the spec is the boundary contract. Invoked as `/sbce new|apply <capability-or-feature>` (or by intent), it drives declare → converge; the stack's own test loop is the oracle for "done". `new` accepts a BC name or a natural-language feature description that may decompose into one or several BCs (new or existing). Stack-neutral — composes with `/bce` and a stack skill (`/java-cli-app`, `/microprofile-server`, `/web-components`, …) for code shape and verification. Use when authoring or converging a capability spec, declaring a feature as one or more BCs, mapping a spec to a BC, or running `/sbce new`, `/sbce apply`. Triggers on "SBCE", "capability spec", "spec-driven BCE", "declare a feature", "spec to BC", "converge to spec", "/sbce new", "/sbce apply".