Skip to content

ericrisco/rsc-harness / skills/java

Use when writing, reviewing or refactoring modern Java (21+, 25 LTS) — records and sealed interfaces as algebraic data types, exhaustive pattern-matching switch over instanceof ladders, virtual-thread concurrency, structured concurrency and ScopedValue replacing ThreadLocal, Stream and Optional pipelines, compact-constructor validation, parametrized JDBC, and the Maven/Gradle build surface. NOT Spring framework wiring (that is `spring-boot`).

FileKindSize
SKILL.mdskill md17.9 KB
evals/README.mdmarkdown1.7 KB
evals/cases.yamlconfig4.5 KB
references/builds.mdmarkdown5.0 KB
references/concurrency.mdmarkdown5.0 KB
references/streams.mdmarkdown4.0 KB
scripts/verify.shexecutablescript3.2 KB

references/builds.md

View on GitHub
# Build surface: Maven 3.9 & Gradle 9 (deep)

Versions as of 2026-06: **Maven 3.9.x is current stable** (Maven 4 is 4.0.0-rc-5, not GA —
prefer 3.9.x for production, watch for 4 GA). **Gradle 9.5.1** is current, requires Java 17+ to
run, and prefers the configuration cache. JDK target here is **Java 25 LTS** via `<release>` /
toolchain — adjust to 21 if you must run on the prior LTS.

## Maven: full pom.xml skeleton

```xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.example</groupId>
  <artifactId>payments</artifactId>
  <version>1.0.0</version>
  <packaging>jar</packaging>

  <properties>
    <maven.compiler.release>25</maven.compiler.release>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <junit.version>5.11.4</junit.version>
    <assertj.version>3.27.0</assertj.version>
    <mockito.version>5.15.2</mockito.version>
  </properties>

  <dependencies>
    <dependency><groupId>org.junit.jupiter</groupId><artifactId>junit-jupiter</artifactId>
      <version>${junit.version}</version><scope>test</scope></dependency>
    <dependency><groupId>org.assertj</groupId><artifactId>assertj-core</artifactId>
      <version>${assertj.version}</version><scope>test</scope></dependency>
    <dependency><groupId>org.mockito</groupId><artifactId>mockito-core</artifactId>
      <version>${mockito.version}</version><scope>test</scope></dependency>
  </dependencies>

  <build><plugins>
    <plugin>
      <groupId>org.apache.maven.plugins</groupId><artifactId>maven-compiler-plugin</artifactId>
      <version>3.13.0</version>
      <configuration>
        <release>25</release>
        <compilerArgs><arg>-Xlint:all</arg><arg>-Werror</arg></compilerArgs>
      </configuration>
    </plugin>
    <plugin>
      <groupId>org.apache.maven.plugins</groupId><artifactId>maven-surefire-plugin</artifactId>
      <version>3.5.2</version>
    </plugin>
  </plugins></build>
</project>
```

Build and test: `./mvnw -q verify` (commit the wrapper via `mvn wrapper:wrapper`). The wrapper
pins the Maven version per project; do not rely on a globally installed `mvn`.

### Preview flags (Maven)

For preview features (e.g. `StructuredTaskScope`, JEP 505 in 25), pass `--enable-preview` to
compiler, surefire, and the run command — all three or it fails at the next stage:

```xml
<configuration>
  <release>25</release>
  <compilerArgs><arg>--enable-preview</arg></compilerArgs>
</configuration>
<!-- surefire: -->
<configuration><argLine>--enable-preview</argLine></configuration>
```

```bash
java --enable-preview -jar target/payments-1.0.0.jar
```

### Toolchains (decouple build JDK from runtime JDK)

`~/.m2/toolchains.xml` plus `maven-toolchains-plugin` lets the build select a specific JDK
regardless of `JAVA_HOME`, so CI and laptops compile against the same version.

## Gradle: full build.gradle.kts

```kotlin
plugins {
    java
    application
}

group = "com.example"
version = "1.0.0"

java {
    toolchain { languageVersion = JavaLanguageVersion.of(25) }   // Gradle provisions/selects JDK 25
}

repositories { mavenCentral() }

dependencies {
    testImplementation("org.junit.jupiter:junit-jupiter:5.11.4")
    testImplementation("org.assertj:assertj-core:3.27.0")
    testImplementation("org.mockito:mockito-core:5.15.2")
    testRuntimeOnly("org.junit.platform:junit-platform-launcher")
}

tasks.withType<JavaCompile> { options.compilerArgs.addAll(listOf("-Xlint:all", "-Werror")) }
tasks.test { useJUnitPlatform() }
application { mainClass = "com.example.App" }
```

Build and test: `./gradlew check` (compile + test). Gradle 9 prefers the configuration cache —
enable with `org.gradle.configuration-cache=true` in `gradle.properties`. For preview features:
`options.compilerArgs.add("--enable-preview")` plus `tasks.test { jvmArgs("--enable-preview") }`
plus `application { applicationDefaultJvmArgs = listOf("--enable-preview") }`.

## Multi-module

- **Maven**: a parent `pom.xml` with `<packaging>pom</packaging>` and `<modules>`; share
  versions via `<dependencyManagement>` / a BOM so every module agrees on a version.
- **Gradle**: `settings.gradle.kts` with `include("api", "core")`; a `buildSrc` or version
  catalog (`gradle/libs.versions.toml`) centralizes versions.

## Dependency hygiene

- Pin versions; use a BOM (`<dependencyManagement>` / Gradle platform) so transitive versions
  agree.
- Check for updates: `mvn versions:display-dependency-updates` or the Gradle versions plugin.
- Scan for vulnerable dependencies in CI (OWASP dependency-check / your SCA tool).

## jlink / jpackage (note only — shipping lives in `deployment`)

`jlink` builds a minimal custom runtime image containing only the modules your app uses (small
container base); `jpackage` wraps it into a native installer (.dmg/.msi/.deb). For Dockerfiles,
CI, and release wiring see the `deployment` skill — this skill only points at the tools.
writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deploymentStars: 322kUpdated Claude CodeCodexVerifiedInstall
xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.Stars: 197kUpdated Claude CodeCodexVerifiedInstall
shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release.Stars: 118kUpdated Claude CodeCodexVerifiedInstall