jvm-helper
Java and Kotlin development with modern patterns, build tools, and JVM tooling When user works with .java or .kt files, mentions Java, Kotlin, Gradle, Maven, JVM, or JDK features
What this skill does
# JVM Helper Agent
## What's New
### Java Releases
- **Java 25 LTS** (Sep 2025): Next LTS after 21. Finalizes: Scoped Values, Module Import Declarations, Compact Source Files / Instance Main Methods, Flexible Constructor Bodies, Compact Object Headers, Generational Shenandoah. Previews: Structured Concurrency (5th), Primitive Types in Patterns (3rd), Stable Values, PEM Encodings
- **Java 24** (Mar 2025): 24 JEPs. Finalizes Stream Gatherers, Class-File API. Previews: Flexible Constructor Bodies (3rd), Primitive Types in Patterns (2nd). Deprecates 32-bit x86 port
- **Java 23** (Sep 2024): Primitive Types in Patterns preview, Module Import Declarations preview, Implicitly Declared Classes (3rd preview). Removes String Templates (design issues). Introduces Oracle GraalVM JIT as JDK option
- **Java 22** (Mar 2024): 12 JEPs. Finalizes Foreign Function & Memory API (JEP 454), Unnamed Variables & Patterns (JEP 456). Previews: Statements before super(), Implicitly Declared Classes (2nd)
- **Java 21 LTS** (Sep 2023): 15 JEPs. Finalizes Virtual Threads (JEP 444), Record Patterns (JEP 440), Pattern Matching for switch (JEP 441), Sequenced Collections (JEP 431). Previews: String Templates, Structured Concurrency, Scoped Values, Unnamed Patterns
### Kotlin Releases
- **Kotlin 2.1** (Nov 2024): Guard conditions in `when` expressions, basic Swift export support, stable Gradle DSL for compiler options, K2 kapt enabled by default (2.1.20), Lombok `@SuperBuilder` support
- **Kotlin 2.0** (May 2024): Stable K2 compiler - 2x faster compilation on average (initialization up to 488% faster, analysis up to 376% faster). Unified pipeline for all backends (JVM, JS, Wasm, Native). Improved smart casts, redesigned multiplatform compilation scheme
## Overview
This skill covers Java and Kotlin development on the JVM, including modern language features (Java 21+ and Kotlin 2.x), build tools (Gradle and Maven), packaging tools (jlink, jpackage, GraalVM native-image), and JVM tuning. The user manages Java via mise (LTS versions), so focus on Java 21 LTS features with awareness of 25 LTS additions.
## CLI Commands
### Auto-Approved Safe Commands
```bash
# Compile Java source
javac --version
javac -d out src/Main.java
# Run Java program
java --version
java -cp out Main
# Interactive Java REPL
jshell
# Kotlin compiler
kotlinc --version
kotlinc hello.kt -include-runtime -d hello.jar
# Gradle (read-only / build)
gradle --version
./gradlew tasks
./gradlew build
./gradlew test
./gradlew check
./gradlew dependencies
./gradlew dependencyInsight --dependency <name>
./gradlew projects
# Maven (read-only / build)
mvn --version
mvn compile
mvn test
mvn package
mvn dependency:tree
mvn dependency:resolve
mvn help:effective-pom
mvn help:active-profiles
# JDK tools
jar --list --file app.jar
javap -c MyClass.class
jps
jstack <pid>
jmap -histo <pid>
jcmd <pid> VM.flags
jfr print recording.jfr
```
### Build and Package
```bash
# Gradle build
./gradlew clean build
./gradlew build -x test # skip tests
./gradlew :module:build # specific module
./gradlew bootRun # Spring Boot
./gradlew assemble # build without tests
./gradlew jar # build JAR
# Maven build
mvn clean package
mvn package -DskipTests
mvn -pl module-name package # specific module
mvn spring-boot:run # Spring Boot
mvn verify # run integration tests
# Create runtime image with jlink
jlink --module-path $JAVA_HOME/jmods:mods \
--add-modules com.myapp \
--output custom-runtime \
--strip-debug --compress zip-6
# Create installable package with jpackage
jpackage --input lib/ --main-jar app.jar \
--main-class com.example.Main \
--name MyApp --type dmg
# GraalVM native image
native-image -jar app.jar myapp
native-image --no-fallback -jar app.jar
```
## Modern Java Essentials (21 LTS)
### Records
```java
// Immutable data carrier - auto-generates constructor, equals, hashCode, toString, accessors
record Point(int x, int y) {}
// Records can have custom constructors and methods
record Range(int lo, int hi) {
Range { // compact constructor for validation
if (lo > hi) throw new IllegalArgumentException();
}
int length() { return hi - lo; }
}
// Records can implement interfaces
record NamedPoint(String name, int x, int y) implements Serializable {}
```
### Sealed Classes
```java
// Restrict which classes can extend
sealed interface Shape permits Circle, Rectangle, Triangle {}
record Circle(double radius) implements Shape {}
record Rectangle(double w, double h) implements Shape {}
record Triangle(double a, double b, double c) implements Shape {}
// Exhaustive switch - compiler verifies all cases covered
double area(Shape s) {
return switch (s) {
case Circle c -> Math.PI * c.radius() * c.radius();
case Rectangle r -> r.w() * r.h();
case Triangle t -> { /* Heron's formula */ yield 0; }
};
}
```
### Pattern Matching
```java
// Pattern matching for instanceof
if (obj instanceof String s && s.length() > 5) {
System.out.println(s.toUpperCase());
}
// Pattern matching for switch with guards
String format(Object obj) {
return switch (obj) {
case Integer i when i > 0 -> "positive: " + i;
case Integer i -> "non-positive: " + i;
case String s -> "string: " + s;
case null -> "null";
default -> "other: " + obj;
};
}
// Record patterns (destructuring)
record Point(int x, int y) {}
if (obj instanceof Point(int x, int y)) {
System.out.println("x=" + x + " y=" + y);
}
// Nested record patterns
record Line(Point start, Point end) {}
switch (shape) {
case Line(Point(var x1, var y1), Point(var x2, var y2)) ->
System.out.println("Line from (%d,%d) to (%d,%d)".formatted(x1, y1, x2, y2));
}
```
### Virtual Threads
```java
// Create virtual threads directly
Thread.startVirtualThread(() -> {
// lightweight, ideal for I/O-bound tasks
var result = fetchFromDatabase();
});
// With executor
try (var executor = Executors.newVirtualThreadPerTaskExecutor()) {
IntStream.range(0, 10_000).forEach(i ->
executor.submit(() -> handleRequest(i))
);
}
// Virtual thread builder
Thread vt = Thread.ofVirtual()
.name("worker-", 0)
.start(() -> doWork());
```
### Sequenced Collections
```java
// New interfaces: SequencedCollection, SequencedSet, SequencedMap
SequencedCollection<String> list = new ArrayList<>(List.of("a", "b", "c"));
list.getFirst(); // "a"
list.getLast(); // "c"
list.addFirst("z");
list.reversed(); // reversed view
SequencedMap<String, Integer> map = new LinkedHashMap<>();
map.putFirst("first", 1);
map.putLast("last", 99);
map.firstEntry(); // first=1
map.pollLastEntry(); // removes and returns last
map.sequencedKeySet().reversed();
```
### Unnamed Variables (finalized in Java 22, preview in 21)
```java
// Underscore for unused variables
try { /* ... */ } catch (Exception _) { log("failed"); }
for (var _ : collection) { count++; }
map.forEach((_, value) -> process(value));
// Unnamed patterns in switch
case Point(var x, _) -> "x=" + x; // ignore y
```
## Kotlin Essentials
### Null Safety
```kotlin
// Non-null by default
var name: String = "hello"
// name = null // compile error
// Nullable types with ?
var nullable: String? = null
// Safe call operator
val length = nullable?.length // null if nullable is null
// Elvis operator
val len = nullable?.length ?: 0
// Not-null assertion (use sparingly)
val forced = nullable!!.length // throws if null
// Smart cast after null check
if (nullable != null) {
println(nullable.length) // compiler knows it's non-null
}
```
### Data Classes and Sealed Classes
```kotlin
// Auto-generates equals, hashCode, toString, copy, componentN
data class User(val name: String, val age: Int)
val user = User("Alice", 30)
val copy = user.copy(age = Related in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.