Codex skills for Java and Kotlin on the JVM
For JVM projects these skills keep Codex on the Maven or Gradle wrapper and the declared toolchain, on Spring Boot 3 conventions such as open-in-view off and Testcontainers @ServiceConnection, and on Java 21 records, sealed types and virtual threads. JVM Tuning, JUnit 5 with AssertJ and Mockito, Ktor and Kotlin coroutines cover the rest of the server stack.
Start with these 3
- Java 21 Features Records, sealed switches and virtual threads done right Codex checks the project's release level before using any feature, then converts DTOs to records, closed hierarchies to sealed interfaces with default-free pattern switches, and blocking thread pools to virtual threads where the workload fits. It watches for synchronized pinning on JDK 21 to 23 with JFR, keeps preview features out unless the build enables them, and upgrades in small reviewable steps.
- Maven and Gradle Builds Reproducible JVM builds with explained versions Codex works through the wrapper and the declared Java toolchain, traces version conflicts with dependency:tree or dependencyInsight before changing anything, and fixes them with BOMs, platforms and constraints instead of piles of exclusions. It moves shared configuration into convention plugins, turns on build and configuration caching safely, and diffs dependency trees so every moved version is reported.
- Kotlin Idioms Kotlin that stops reading like Java Codex rewrites Kotlin that still thinks in Java: nulls handled at the boundary instead of with !!, state modelled as sealed interfaces and data classes so when stays exhaustive, value classes for ids, and scope functions chosen for what they return. It checks Java platform types after conversions, uses Kotlin 2.2 features only when the compiler allows, and leaves detekt and ktlint clean.
13 more Java and Kotlin on the JVM skills
-
Spring Boot
Typed config, thin controllers, fast test slices -
Kotlin Coroutines
Structured concurrency that cancels cleanly -
JVM Tuning
Collector, heap size, logs: short flags, real data -
Ktor Server
Kotlin APIs with plugins that tests can swap -
CSRF Protection
Forged requests die at the middleware -
CORS Configuration
Fix the CORS error without opening the API -
JUnit 5 with AssertJ and Mockito
Jupiter tests that are discovered, strict and fluent -
Testcontainers
Test against real Postgres, not a lookalike -
Selenium WebDriver
Explicit waits, stable locators, a pinned Grid -
Memory Leak Hunting
Snapshot, repeat, compare, follow the retainer -
Modular Monolith
Service-grade boundaries in one deployable -
Dependency Injection
Constructor wiring that makes tests trivial -
Integration Testing
Test the seams where production actually breaks
General skills with Java and Kotlin on the JVM guidance
Not built around Java and Kotlin on the JVM, but they include steps or tools for it. Not part of the install-all command.
-
Go Idioms
Go that reads like Go, not Java in disguise -
Ruby Idioms
Ruby that reads like Ruby, not translated Java -
OAuth 2.1 and OIDC
SSO logins that validate every hop -
AWS Lambda
Faster cold starts, no reprocessed batches -
OpenTelemetry
One connected trace per request, vendor-neutral -
Dependency Upgrades
One major at a time, changelog read first -
Naming Conventions
Names a reader can predict without opening the file -
Codemods
Change 500 files with code you can rerun -
Regex Crafting
Regexes with test tables and no catastrophic backtracking -
Problem Details Errors
One error shape clients can branch on -
GraphQL Resolvers
Constant query counts and auth on every path -
React Native Expo
Native apps you can regenerate from config
Every Java and Kotlin on the JVM skill in one command
Installs these 16 into ~/.agents/skills/. Add --project after -- to install into the current repository instead.
The installer is a 104-line POSIX shell script. It fetches the skills you name from codexskills.dev and unpacks each into its own folder in your skills directory. No sudo, no telemetry, and every skill page shows the full SKILL.md first. Read install.sh
curl -fsSL codexskills.dev/install.sh | sh -s -- java-21-features maven-gradle-builds kotlin-idioms spring-boot kotlin-coroutines jvm-tuning ktor-server csrf-protection cors-configuration junit-5 testcontainers selenium-webdriver memory-leak-hunting modular-monolith dependency-injection integration-testing Java and Kotlin on the JVM FAQ
Is there a Codex skill for Spring Boot 3?
Spring Boot builds Boot 3 services with records for @ConfigurationProperties, DTOs instead of entities on the wire and spring.jpa.open-in-view set to false, fixing LazyInitializationException by fetching inside the transaction rather than re-enabling it. Tests use the narrowest slice, such as @WebMvcTest or @DataJpaTest, with Testcontainers @ServiceConnection. It keeps Boot 4 advice, which changes package names and starters, out of 3.x projects.
Can Codex move a Java service to virtual threads?
Java 21 Features checks the project's release level first and replaces thread pools with virtual threads only for blocking I/O work. It checks for synchronized pinning, which JDK 24 removes through JEP 491, and swaps in ReentrantLock on older runtimes. Preview features stay out unless the team has agreed to --enable-preview.
Which JVM flags does the tuning skill set for containers?
JVM Tuning prefers -XX:MaxRAMPercentage, around 60 to 75, over a fixed -Xmx so the heap follows the container limit and leaves room for native memory. It picks G1, generational ZGC, Shenandoah or Parallel for the stated pause, throughput or footprint goal, noting that JDK 21 and 22 need -XX:+ZGenerational. Changes are read from unified GC logs and Flight Recorder and proven on one canary instance.
How do I install all 16 Java and Kotlin on the JVM skills at once?
Pass every name to the installer in one command: curl -fsSL https://codexskills.dev/install.sh | sh -s -- java-21-features maven-gradle-builds kotlin-idioms spring-boot kotlin-coroutines jvm-tuning ktor-server csrf-protection cors-configuration junit-5 testcontainers selenium-webdriver memory-leak-hunting modular-monolith dependency-injection integration-testing. Add --project right after -- to put them in the current repository's .agents/skills/ so your team gets them too.
Which Java and Kotlin on the JVM skill should I try first?
Java 21 Features is the closest fit for most Java and Kotlin on the JVM work. Mention it with $java-21-features in a prompt to load it on purpose; after that, Codex picks it up on its own whenever a task matches.