Sign inSign up

t2fn/java-claude-abliterated

By t2fn

Updated 22 days ago

Java JDK and debuggers, optimized for JVM development, token efficiency, with agents for tasking

Image
Machine learning & AI
Developer tools
0

2.6K

t2fn/java-claude-abliterated repository overview

java-claude-abliterated — Java Dev Stack with Spring Boot and Linters

Cost savings: use the tweakcc reduced system prompt + specialized Java tools for the best results. A default Claude Code prompt injects 30K+ characters per turn — that's $90/MTurn on Sonnet and $150 on Opus for tokens you never read. The tweakcc thinkingVerbs and ablated prompts trim this to ~10K, saving up to 90% on cached reads and ~$4.50/hour in input for a coding session at 100 requests/hour.

Drop a Java project into a container and ask Claude to build, lint, test, and ship it. This image combines Claude Code (abliterated) with JDK, Spring Boot, Maven, Gradle, Google Java Format, SpotBugs, PMD, and Checkstyle — a complete Java development workstation with pre-loaded linting configs and a built-in Spring Boot CLI.

What It Does

This container is a focused Java development environment. Mount whatever Java projects, Spring Boot apps, or Gradle/Maven modules you want to work on, start the container, and Claude automatically gets:

  • JDK toolchain — java, javac, jdb (debugger), full JDK with tools.jar
  • Maven — build tool, dependency manager, archetype generation
  • Gradle — incremental builds, dependency management, multi-module support
  • Spring Boot CLI — init projects, run JARs, package applications, manage dependencies
  • Google Java Format — auto-formatter (zero-config, Google style)
  • Checkstyle — code style linter (naming, imports, Javadoc, formatting)
  • SpotBugs — static bug detector (200+ patterns)
  • PMD — static code analyzer (correctness, design, performance)
  • JDT Language Server — IDE-like intelli-sense, diagnostics, navigation
  • Abliterated Claude — lean ~10K system prompt, 200+ skills, subagent support, and low token cost

No configuration, no setup. Give it a Java project and ask Claude to build, lint, run Spring Boot, and ship.

# First, navigate to your project directory.
# cd $HOME/git/my-project

# Build a Java project with Claude and Google Java Format working together
docker run -u $(id -u):$(id -g) -e ANTHROPIC_API_KEY=sk-... \
    -v "$PWD:/workdir:rw" \
    t2fn/java-claude-abliterated:latest

# Or with podman:
podman run -u $(id -u):$(id -g) --userns=keep-id \
    -e ANTHROPIC_API_KEY=sk-... \
    -v "$PWD:/workdir:rw" \
    t2fn/java-claude-abliterated:latest

# Then send a prompt:
# "Google Java Format my project, run checkstyle, and build with Maven"

# Spring Boot project:
docker run -u $(id -u):$(id -g) -e ANTHROPIC_API_KEY=sk-... \
    -v "$PWD:/workdir:rw" \
    t2fn/java-claude-abliterated:latest

# Then: "spring init --build=maven --dependencies=web,actuator myapp"
# Then: "spring run myapp"

# Or with a local Ollama model:
docker run -u $(id -u):$(id -g) -e OLLAMA_MODEL=gemma4:31b \
    -e OLLAMA_HOST=10.12.2.4 \
    -e ANTHROPIC_API_KEY=sk-... \
    -v "$PWD:/workdir:rw" \
    t2fn/java-claude-abliterated:latest

# Or with podman:
podman run -u $(id -u):$(id -g) --userns=keep-id \
    -e OLLAMA_MODEL=gemma4:31b \
    -e OLLAMA_HOST=10.12.2.4 \
    -e ANTHROPIC_API_KEY=sk-... \
    -v "$PWD:/workdir:rw" \
    t2fn/java-claude-abliterated:latest

Claude connects to the JDT Language Server, calls google-java-format and checkstyle, traces Spring Boot dependencies, and returns a natural-language report — all from one prompt.

Why This Container?

Java development without the workstation

Building Java applications typically means installing the JDK, setting up JAVA_HOME, installing Maven/Gradle, and configuring multiple linting tools. This container bundles it all and makes it accessible to Claude via a single -p prompt.

Without this containerWith java-claude-abliterated
Install JDK, Maven, Gradle, Spring Boot CLIdocker run — everything is ready
Write Java code, run google-java-format, checkstyle, SpotBugs manuallyClaude calls google-java-format -i and gets actionable fixes directly
Manually manage pom.xml/build.gradle, Spring Boot dependenciesAsk Claude — it knows the Spring ecosystem and starters
One tool per terminal sessionSpring Boot CLI, Maven, and Gradle all available
Manual linting configurationPre-loaded checkstyle.xml, google-java-format.jar, SpotBugs, PMD
What Claude can do

The container works with any Java project under /workdir:

  • Java projects — compile, run, test with javac/java, Maven, or Gradle
  • Spring Boot applications — init projects, run JARs, package, inspect endpoints
  • Maven builds — compile, test, package, deploy, archetype generation, dependency management
  • Gradle builds — incremental compilation, multi-module, dependency trees
  • Google Java Format — auto-format all Java files with Google style (zero-config)
  • Checkstyle — code style linting (naming, imports, Javadoc, line length, brace style)
  • SpotBugs — static bug detection (null-pointers, resource leaks, thread safety)
  • PMD — static code analysis (complexity, design, performance)
  • Multiple build tools — use Maven for one module, Gradle for another
  • Spring Boot starters — web, data-jpa, security, test, validation, actuator, redis, mail, aop, mongodb, webflux, cache

Toolkit

Java Tools
ComponentSourceDescription
JDKopenjdk.java.netCore toolchain (java, javac, jdb, jar, jlink)
Claude Codeclaude-abliterated/Abliterated CLI with tweakcc, 200+ skills, rules
Mavenapache.orgBuild tool & dependency manager (pom.xml lifecycle)
Gradlegradle.orgBuild tool & dependency manager (incremental builds)
Spring Bootspring.ioSpring Boot CLI (init, run, jar, war, status)
Google Java Formatgithub.com/googleAuto-formatter (Google style, zero-config)
Checkstylecheckstyle.orgCode style linter (naming, imports, Javadoc, formatting)
SpotBugsspotbugs.github.ioStatic bug detector (200+ patterns)
PMDpmd.github.ioStatic code analyzer (correctness, design, performance)
JDT Language Servereclipse.orgIDE-like intelli-sense, diagnostics, navigation
Spring Boot Starters Included

Spring Boot CLI pulls in the most common starters at runtime. The full catalog:

StarterPurpose
spring-boot-starter-webWeb/REST applications (Spring MVC, Tomcat)
spring-boot-starter-data-jpaDatabase persistence with JPA/Hibernate
spring-boot-starter-securityAuthentication & authorization
spring-boot-starter-testJUnit 5, Mockito, Hamcrest, Testcontainers
spring-boot-starter-validationBean validation (Jakarta Validation)
spring-boot-starter-actuatorProduction monitoring (health, metrics)
spring-boot-starter-cacheSpring caching abstraction
spring-boot-starter-data-redisRedis connectivity
spring-boot-starter-mailEmail support (Jakarta Mail)
spring-boot-starter-aopAspect-Oriented Programming
spring-boot-starter-data-mongodbMongoDB persistence
spring-boot-starter-webfluxReactive web (WebFlux, Netty)
Why this container is better suited for development

Prompt Claude to use standard Java linting practices. You can say "use the java skill to check my code, apply Google Java Format, and run checkstyle" and Claude will apply Java-specific linting rules, break tasks down properly, and mock test each segment for efficacy.

Directed skills improve code quality and resilience. With abliterated Claude and directed skills:

  • Ask Claude to lint: "run checkstyle, fix all violations, and apply Google Java Format" — Claude applies checkstyle rules and Google Java Format automatically
  • Break tasks down: instead of a monolithic refactor, Claude splits the work into subagent tasks — each class gets tested independently before integration
  • Ensure mock-tested efficacy: Claude generates and runs mock tests for each segment, verifying that Spring Boot beans and dependencies work correctly
  • Spring Boot focused: Claude knows Spring Boot starters and can use them to scaffold, run, and test applications without manual configuration
  • Avoid overcorrection: the ablated system prompt avoids the "STRICTLY PROHIBITED" trap that causes Claude to overzealously fix style at the expense of correctness

Say "use the java skill to..." to directly task Claude with Java-specific skills — Spring Boot scaffolding, Maven/Gradle builds, Google Java Format, SpotBugs analysis, and PMD code quality checks.

claude-tools

Extends Claude Code with specialized command-line tools. Available scripts are automatically in $PATH and activate via slash commands or Claude's built-in tool use:

claude-fix    # Fix code issues with context-aware edits
claude-ask    # Ask questions, get answers without side effects
claude-bash   # Run bash with smarter timeouts and session persistence
claude-agent  # Launch Claude as a persistent agent

To invoke the claude-tools development shell, add /bin/bash to your docker run or podman run command. This starts an interactive shell where claude-tools are available on $PATH and Claude Code is configured for development:

# claude-tools development shell with Docker
docker run -u $(id -u):$(id -g) -e ANTHROPIC_API_KEY=sk-... \
    -v "$PWD:/workdir:rw" \
    t2fn/java-claude-abliterated:latest /bin/bash

# Or with podman:
podman run -u $(id -u):$(id -g) --userns=keep-id \
    -e ANTHROPIC_API_KEY=sk-... \
    -v "$PWD:/workdir:rw" \
    t2fn/java-claude-abliterated:latest /bin/bash

From the shell you can run claude-fix, claude-ask, claude-bash, claude-agent, and send slash commands (/fix, /ask, /plan) directly to Claude. Use claude-fix --comment to post inline PR comments or --fix to apply findings directly.

More examples: mijuny/claude-tools/tree/main/README.md

Cost Savings with tweakcc

This container runs on claude-abliterated:rocky10, which uses the tweakcc (tweakcc-fixed) reduced system prompt to cut ~67% off daily-flow prompts — from ~30K to ~10K characters. For Java development, this means:

  • Focused tools, focused rules — Java-specific rules (google-java-format, checkstyle, Spring Boot) are loaded on-demand, not every turn
  • tweakcc thinkingVerbs — 207 safe movement-only verbs reduce cognitive drift on every turn
  • Cost-per-hour comparison: ~$4.50/hour savings on input tokens alone for a typical 100-request/hour session
  • Better output — fewer contradictory always-on rules means less "overcorrection" waste on each turn
  • Pre-loaded linting — checkstyle.xml, google-java-format.jar, SpotBugs, PMD — ready but not auto-run

Linting Philosophy

The container uses a no-silent-file-touching approach:

  • New files Claude writes — auto-lint before presenting (auto-fix is always safe)
  • Existing code — do NOT touch unless explicitly tasked; Claude asks before linting
  • Startup hooks — report version numbers only (no file modifications)
  • All linting configs pre-loaded — checkstyle.xml, google-java-format.jar, SpotBugs, PMD — ready but not auto-run

See SKILL.md for the full linting decision matrix.

"Claude" and "Claude Code" are registered trademarks of Anthropic, PBC. This project uses the name "Claude" in a nominative (descriptive) sense — it identifies the Anthropic product (Claude Code) that this project is built to work with, consistent with the nominative fair use doctrine. The use is necessary: a third-party project cannot refer to "Claude Code" without using the mark itself.

This project is not affiliated with, endorsed by, or sponsored by Anthropic, PBC. The name "java-claude-abliterated" is a third-party project name where:

  • "java" — descriptive reference to the Java programming language (nominative fair use)
  • "claude" — descriptive reference to Anthropic's Claude Code (nominative fair use)
  • "abliterated" — coined portmanteau ("ablation" + "obliteration") representing the reduction of system prompt bloat

The project uses both "Java" and "Claude" to describe what it works with, not who it is from.

"Spring", "Spring Boot", and "Spring Framework" are trademarks of Spring.io (VMware/Pivotal). References to Spring in this document are nominative — they describe the technology this container works with, not endorsement by VMware or Pivotal.

All other trademarks belong to their respective owners. No implication of endorsement is made by the use of these marks.

ContainerPurposeHub
asm-claude-abliteratedCross-architecture assembly dev stackHub
gcc-claude-abliteratedC/C++ development with GCC + valgrindHub
golang-claude-abliteratedGo development with gopls + golangci-lintHub
python-claude-abliteratedPython linting with ruff + mypyHub
rust-claude-abliteratedRust dev with clippy + cargoHub
java-claude-abliteratedJava/Spring Boot with Maven + GradleHub
typescript-claude-abliteratedTypeScript dev with biome + eslintHub
hdl-claude-abliteratedFPGA/ASIC HDL dev (iverilog, ghdl, verilator)Hub
ada-claude-abliteratedAda development (GNAT via alr, AUnit testing)Hub
cobol-claude-abliteratedCOBOL compilation for mainframe modernizationHub
julia-claude-abliteratedJulia scientific computing and IJulia notebooksHub
apache-claude-abliteratedApache Spark + Pig big data processingHub
fortran-claude-abliteratedFortran HPC with BLAS/LAPACK math libsHub
ghidra-claude-abliteratedGhidra reverse engineering and malware inspectionHub

Open Source

Source code and suggestions/issues/pull requests can be made at:

https://github.com/t2fn/claude-abliterated

Tag summary

Content type

Image

Digest

sha256:10ba6fe57

Size

939.3 MB

Last updated

22 days ago

docker pull t2fn/java-claude-abliterated