Sign inSign up

t2fn/rust-claude-abliterated

By t2fn

•Updated about 1 month ago

Rust toolchain and debuggers, optimized for Rust development, token efficiency, with agents to task

Image
Machine learning & AI
Developer tools
0

2.4K

t2fn/rust-claude-abliterated repository overview

⁠rust-claude-abliterated — Rust Dev Stack with clippy, rust-analyzer, and Cross-Compilation Targets

Cost savings: use the tweakcc reduced system prompt + specialized Rust 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 Rust project into a container and ask Claude to compile, lint, cross-compile, and ship it. This image combines Claude Code (abliterated) with Rust, clippy, rust-analyzer, and cargo subcommands — a complete Rust development workstation with cross-compilation support.

⁠What It Does

This container is a focused Rust development environment. Mount whatever Rust crates, libraries, or CLI tools you want to work on, start the container, and Claude automatically gets:

  • Rust toolchain — rustc, cargo, rustfmt, rustdoc, clippy, rust-analyzer
  • clippy — 800+ lints for correctness, style, complexity, and performance
  • cargo subcommands — cargo-expand, cargo-audit, cargo-edit, cargo-outdated, cargo-semver-checks, cargo-tarpaulin, cargo-deny, cargo-make
  • Cross-compilation targets — x86_64, aarch64, ARM, ARMv7, PowerPC, RISC-V (both gnu and musl)
  • Abliterated Claude — lean ~10K system prompt, 200+ skills, subagent support, and low token cost

No configuration, no setup. Give it a Rust crate and ask Claude to build, lint, cross-compile, and ship.

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

# Build a Rust project with Claude and clippy working together
docker run -u $(id -u):$(id -g) -e ANTHROPIC_API_KEY=sk-... \
    -v "$PWD:/workdir:rw" \
    t2fn/rust-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/rust-claude-abliterated:latest

# Then send a prompt:
# "clippy my project, run cargo audit, and cross-compile to aarch64"

# 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/rust-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/rust-claude-abliterated:latest

Claude connects to the rust-analyzer server, calls cargo clippy, traces dependencies via cargo-deny, and returns a natural-language report — all from one prompt.

⁠Why This Container?

⁠Rust development without the workstation

Building Rust applications typically means installing the Rust toolchain, setting up CARGO_HOME/RUSTUP_HOME, and installing multiple cargo subcommands. This container bundles it all and makes it accessible to Claude via a single -p prompt.

Without this containerWith rust-claude-abliterated
Install Rust, clippy, rust-analyzer, cargo subcommandsdocker run — everything is ready
Write Rust code, run clippy, cargo-audit, cargo-deny manuallyClaude calls cargo clippy and gets actionable fixes directly
Manually manage Cargo.toml, Cargo.lock, cross-compilation targetsAsk Claude — it knows the Cargo ecosystem
Cross-compile with sysroots and toolchain setupBuilt-in cross-compilation targets (gnu + musl)
Manual cargo.toml and clippy.toml configurationPre-configured clippy.toml and cargo_deny.toml
⁠What Claude can do

The container works with any Rust project under /workdir:

  • Rust crates — full cargo crate management (add, remove, build, test, doc)
  • Linting — clippy with all lint groups (correctness, suspicious, style, complexity, perf, pedantic, restriction, cargo)
  • Security — cargo-audit + cargo-deny (licenses + advisories)
  • Semver checks — cargo-semver-checks for API compliance
  • Coverage — cargo-tarpaulin for code coverage reports
  • Macro expansion — cargo-expand for inspecting generated code
  • Cross-compilation targets — x86_64, aarch64, ARM, ARMv7, PowerPC, RISC-V

⁠Toolkit

⁠Rust Tools
ComponentSourceDescription
Rustrustup.rsCore toolchain (rustc, cargo, rustfmt, rustdoc)
Claude Codeclaude-abliterated/Abliterated CLI with tweakcc, 200+ skills, rules
clippyrustup component800+ lints (correctness, style, complexity, perf)
rust-analyzerrustup componentLanguage Server Protocol server
cargo-expandcrates.ioMacro expansion and code inspection
cargo-auditcrates.ioSecurity scanning (RustSec advisory database)
cargo-editcrates.ioCargo.toml management (add, remove, set, upgrade)
cargo-outdatedcrates.ioDependency version checking
cargo-semver-checkscrates.ioAPI semver compliance
cargo-tarpaulincrates.ioCode coverage (HTML, JSON, XML)
cargo-denycrates.ioLicense + advisory + dependency checks
cargo-makecrates.ioBuild automation (Cargo.toml-based Makefile)
⁠Why this container is better suited for development

Prompt Claude to use clippy linting practices. You can say "use the rust skill to check my crate, fix clippy warnings, and ensure functions are not too complex" and Claude will apply Rust-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 cargo clippy --all-targets, fix warnings, and check semver" — Claude applies clippy rules and cargo-deny automatically
  • Break tasks down: instead of a monolithic refactor, Claude splits the work into subagent tasks — each module gets tested independently before integration
  • Ensure mock-tested efficacy: Claude generates and runs mock tests for each segment, verifying that changes don't break existing behavior
  • Cross-compile confidently: ask Claude to "cross-compile to all targets and run cargo test on each" — no manual sysroot management
  • 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 rust skill to..." to directly task Claude with Rust-specific skills — clippy linting, cargo build/test, macro expansion with cargo-expand, and security scanning with cargo-deny.

⁠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/rust-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/rust-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 Rust development, this means:

  • Focused tools, focused rules — Rust-specific rules (clippy, rust-analyzer, cargo subcommands) 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

"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 "rust-claude-abliterated" is a third-party project name where:

  • "rust" — descriptive reference to the Rust 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 "Rust" and "Claude" to describe what it works with, not who it is from.

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

ContainerPurposeHub
asm-claude-abliterated⁠Cross-architecture assembly dev stackHub⁠
gcc-claude-abliterated⁠C/C++ development with GCC + valgrindHub⁠
golang-claude-abliterated⁠Go development with gopls + golangci-lintHub⁠
python-claude-abliterated⁠Python linting with ruff + mypyHub⁠
rust-claude-abliterated⁠Rust dev with clippy + cargoHub⁠
java-claude-abliterated⁠Java/Spring Boot with Maven + GradleHub⁠
typescript-claude-abliterated⁠TypeScript dev with biome + eslintHub⁠
hdl-claude-abliterated⁠FPGA/ASIC HDL dev (iverilog, ghdl, verilator)Hub⁠
ada-claude-abliterated⁠Ada development (GNAT via alr, AUnit testing)Hub⁠
cobol-claude-abliterated⁠COBOL compilation for mainframe modernizationHub⁠
julia-claude-abliterated⁠Julia scientific computing and IJulia notebooksHub⁠
apache-claude-abliterated⁠Apache Spark + Pig big data processingHub⁠
fortran-claude-abliterated⁠Fortran HPC with BLAS/LAPACK math libsHub⁠
ghidra-claude-abliterated⁠Ghidra 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:73a20463d…

Size

2 GB

Last updated

about 1 month ago

docker pull t2fn/rust-claude-abliterated