Sign inSign up

t2fn/claude-abliterated

By t2fn

Updated about 3 hours ago

Tweaks for Claude, optimize for token efficiency, and finely tuned agents for tasking.

Image
Machine learning & AI
Developer tools
1

10K+

t2fn/claude-abliterated repository overview

claude-abliterated — Docker images with lobotomized system prompts

Your system prompt is leaking money. A default Claude Code prompt injects 30K+ characters on every single turn — that's $90 per million turns on Sonnet 4.6 and $150 on Opus 4.6 for tokens you never read. lobotomized-claude-code cuts that to ~10K, trimming ~20K characters per coding turn. With prompt caching that brings input costs down to $0.30/MTok (Sonnet) — a 90% discount on cached reads. For a coding session sending 100 requests per hour, that saves roughly $4.50/hour in input alone. You get better output quality too — fewer rules means less drift, fewer contradictory instructions, and fewer wasted output tokens on overcorrection. This Docker image does all the work upfront so you ship with optimized prompts, pre-loaded tools, and 200+ skills — no manual setup, no token waste.

Full-stack development, beyond the flip-flop

A bare-bones Claude assistant is a generalist that must learn your problem on every turn. It sees a feature request, enters plan mode to identify the problem, confirms the approach, then enters plan mode again to decide how to code it, then executes — the "flip-flop" between planning and doing that bloats tokens and time.

This package helps the agents develop focus and project awareness as they work. It arrives pre-knowledgeable — 200+ skills encode domain understanding (security pentesting via Shannon, deep research via DAG-based fan-out, CI/CD patterns, testing strategies, devOps automation, frontend design with distinctive aesthetics, skill creation with quantitative benchmarking, and more). With that context baked in from the first turn, the assistant knows which workflows matter and self-drives automated microtasks — launching parallel subagents, iterating gaps, and synthesizing results — straight through to completion without re-entering plan mode for every decision.

The suggestion workflow makes tasking point straight at the solution. When a skill triggers (e.g., frontend-design sees you're building a web component), it injects curated domain knowledge — typography, motion, color, composition guidelines — and Claude starts implementing rather than discovering. Compare:

Bare-bones Claudeclaude-abliterated
"Let me plan this feature first" → enter plan modefrontend-design fires automatically — sees the component, commits to a bold aesthetic direction
"Should I use React or Vue?"Writes production code immediately with the design skill's typography, motion, and composition rules baked in
Plans → codes → re-plans when a new constraint appearsSelf-drives through subagents; if a new constraint surfaces, it resolves it inline without leaving plan mode
~30K chars of always-on rules, many niche and irrelevant~10K chars of lean, tuned rules — language-specific docs only inject when needed; CAPS-free (no STRICTLY PROHIBITED overcorrection on 4.7)
parallel tool calls require explicit promptingParallel tool calls enabled by default — subagents fork and run independently
claude -p single-shot: system prompt inflates to ~30K — Claude reads irrelevant hooks and tool descriptions before output. You pay for everything, get a generic result.claude -p single-shot: system stays at ~10K — load-bearing rules only, skills fire from the first token, domain knowledge (Shannon auth patterns, template variables) inject inline. One pass, higher signal-to-noise.

You still get tasking + coding when you want it. Skills are invocable and composable — you can /skill-test to run quantitative evals, invoke Brainstorm for multi-lens design panels, or trigger deep-research for adversarial fact-checking on a whitepaper topic. But the key difference: these tools don't require plan mode. They're suggestions that guide execution, not gates you must pass through. The tasking becomes the path to the solution rather than a detour between planning and doing.

Why Claude Abliterated?

The ablation works because it targets what actually matters

A default system prompt is a wall of rules — every turn, Claude Code injects 30K+ characters covering everything from CI/CD to WSL to calendar skills, even for a user who only writes Python and never touches cron. The ablation (via skrabe/lobotomized-claude-code) does three precise things:

  1. Cuts ~67% off daily-flow prompts — the fragments that inject every interactive turn (harness, communication, tasks, actions, memory, tool descriptions) are trimmed to ~10K chars from ~30K. Each coding turn carries roughly 20K fewer characters. Faster first response, more headroom before compaction, less drift from contradictory always-on rules.
  2. Cuts ~33% off everything — language-specific API docs, model migration guide, calendar/cron skills, WSL settings, Windows tool descriptions are all still there, just smaller. Niche prompts only inject when you trigger that feature (most users never do), so the daily flow is what matters.
  3. Rewrites load-bearing fragments — targeted at 4.7's strengths:
    • Less is more — fewer rules, less drift
    • No CAPS theaterSTRICTLY PROHIBITED / MUST triggers overcorrection on 4.7; the ablated prompt softens this
    • Parallel tool calls by default — subagents fork and run concurrently without explicit prompting
    • Grill-me plan mode — plan mode asks real questions instead of boilerplate confirmations
    • No always-on CTAs/schedule upsell eliminated
    • Tighter destructive guards — git operations require explicit confirmation
Why the agents stay focused

A general-purpose assistant without domain understanding must repeatedly enter plan mode → identify the problem → confirm the approach → execute → re-enter plan mode for the next sub-decision. This "flip-flop" inflates both tokens and wall-clock time.

Pre-installed skills help agents develop project context as they work, so they're less apt to lose awareness and start over. Domain knowledge is encoded at the skill level:

  • frontend-design — sees a web component request, injects typography, motion, composition rules, and starts coding immediately. No "let me think about this" plan mode detour.
  • deep-research — DAG-based fan-out for adversarial claim verification. Launches parallel subagents to search, fetch, verify, and synthesize without plan mode round-trips.
  • code-review — reviews diffs with configurable effort levels (low/medium/high) and can pass --comment to post inline PR comments or --fix to apply findings directly.
  • shannon — AI-driven architecture and pattern guidance. When asked "what's the best pattern for this use case?", it consults domain research, not generic heuristics.
  • verify — runs the app and observes real behavior (not just tests) to confirm a change works.

The result: goal-oriented tasks complete faster. The assistant knows what workflows matter from the first turn and self-drives through microtasks — launching parallel subagents, iterating gaps, and synthesizing results — straight through to completion.


Concrete examples — what changes in practice
ScenarioBare-bones Claudeclaude-abliterated
"Build me a dashboard"Enters plan mode → "should I use a charting library?" → plans → codes → re-enters plan mode for the layout → ...deep-research or frontend-design fires → DAG fan-out identifies the right approach → parallel subagents fetch data, build charts, refine layout → straight to working code
"Fix the auth bug"Reads code, plans approach, writes fix, enters plan mode to confirm the test strategycode-review with --fix → inline diff applied → verify runs the app → confirmation in one pass
"Create a new API endpoint""Do I use FastAPI or Flask? Should I add tests? What about the router template?"Templates with {{name}}, {{path}}, {{type}} variables apply immediately; skill context narrows the decision space before you type the second sentence
claude -p "write the auth middleware"System prompt bloats the single-shot prompt to ~30K chars — Claude reads irrelevant hooks, communication rules, and tool descriptions before generating output. You pay for everything, get a generic result.The same prompt with an ablated system stays at ~10K — Claude reads only the load-bearing rules and the skill context fires (Shannon for auth patterns, templates for the endpoint). Single pass, higher signal-to-noise, and the output reflects domain knowledge injected from the start.
Token cost per turn~30K chars injected, many irrelevant to your task~10K chars injected, only what matters for your domain — ~90% discount on cached reads ($0.30/MTok on Sonnet)

All images are built with Claude Code 2.1.141+ and Node.js 23.

Available tags (t2fn/claude-abliterated):

TagBase
t2fn/claude-abliterated:latestRocky 10
t2fn/claude-abliterated:rocky10Rocky 10
t2fn/claude-abliterated:rocky9Rocky 9
t2fn/claude-abliterated:ubuntuUbuntu
t2fn/claude-abliterated:debianDebian
t2fn/claude-abliterated:alpineAlpine

Quick start

When working with Claude, it is often a good idea to restrict the Claude driven LLM from becoming unbounded and doing things to the base system which may impact other applications/evironments. This docker container solves this by providing a volume mounted /workdir to contain and control Claud's sphere of influence. The .claude backup folder is stored WITH the software package with a consistent parent path of /workdir so you can focus on developing with resilience. One can even "check in" the claude backups into git along side the rest of the development proceses. Everything-is-together... how nice.

# First, navigate into the root path of your code development.
cd $HOME/git/my-project

# Then pick a method of spawning off Claude Abliterated:

# Defaults with API_KEY (defaults to Rocky 10)
docker run -u $(id -u):$(id -g) --rm -it -v $PWD:/workdir -e ANTHROPIC_API_KEY="your-api-key" t2fn/claude-abliterated:latest

# With Ollama
docker run -u $(id -u):$(id -g) --rm -it -v $PWD:/workdir -e OLLAMA_MODEL=your-model t2fn/claude-abliterated:latest

# With Ollama hosted on another system (note, do not use 127.0.0.1 addresses, but the actual IP assigned to the box and set Ollama to allow remote requests)
docker run -u $(id -u):$(id -g) --rm -it -v $PWD:/workdir -e OLLAMA_HOST=10.12.2.4 -e OLLAMA_MODEL=your-model docker.io/t2fn/claude-abliterated:latest

# Podman requires an extra flag "--userns=keep-id":
podman run -u $(id -u):$(id -g) --userns=keep-id --rm -it -v $PWD:/workdir -e ANTHROPIC_API_KEY="your-api-key" t2fn/claude-abliterated:latest

Other options including using OpenAI's API endpoint are provided by means of environment variables (see below).

Volume mounts

Mount pointPurpose
-v /path/to/code:/workdirYour workspace — Claude Code reads and writes files here by default
(in the above `/workdir/.claude')Claude Code persistent data (history, settings, downloads). Use claude-data for a named volume or an absolute path
-v claude-ollama:/home/claudeuser/.ollamaOllama model library — models are cached across container runs so they don't need re-pulling
-v claude-tweakcc:/home/claudeuser/.tweakccLobotomized prompts and tweaks — symlinks to system-prompts/ and system-reminders/

Workspace + named data volumes

docker run --rm -it \
  -v /path/to/my/code:/workdir \
  -v claude-ollama:/home/claudeuser/.ollama \
  t2fn/claude-abliterated:latest

All volumes as host paths

docker run --rm -it \
  -v /host/code:/workdir \
  -v /host/.ollama:/home/claudeuser/.ollama \
  -v /host/tweakcc:/home/claudeuser/.tweakcc \
  t2fn/claude-abliterated:latest

For heavy development purposes:

# All restrictions off (NOT RECOMMENDED)
docker run --rm -it \
  -v /host/code:/workdir \
  -v /host/.ollama:/home/claudeuser/.ollama \
  -v /host/tweakcc:/home/claudeuser/.tweakcc \
  -e IS_SANDBOX=1 -u root \
  t2fn/claude-abliterated:latest --dangerously-skip-permissions

A bare shell

docker run --rm -it \
  -v /path/to/my/code:/workdir \
  -v claude-ollama:/home/claudeuser/.ollama \
  t2fn/claude-abliterated:latest /bin/bash

GPU

Pass --gpus all for NVIDIA GPUs or --device /dev/dri for AMD/Intel.

# NVIDIA GPU + Ollama
docker run --rm -it --gpus all \
  -e OLLAMA_MODEL=your-model \
  -v claude-ollama:/home/claudeuser/.ollama \
  t2fn/claude-abliterated:latest

# AMD/Intel GPU
docker run --rm -it --device /dev/dri \
  -e OLLAMA_MODEL=your-model \
  -v claude-ollama:/home/claudeuser/.ollama \
  t2fn/claude-abliterated:latest

Additional Tools

Claude Code comes pre-loaded with several tools that extend its capabilities. Each tool integrates directly into Claude Code's workflow — no extra setup needed.

Everyday commands

Claude Code understands slash commands typed in the chat:

/fix        → Analyze errors and propose fixes
/ask        → Answer without modifying files
/plan       → Plan implementation before coding

Examples and source: mijuny/claude-tools

Prompt mode (single-shot)

For scripts, CI pipelines, or one-shot tasks, -p passes your prompt through with the ablated system and exits — no interactive loop, no repeated plan mode, no bloat:

# Replace the docker_run_claude with the command picked from above:

# Single-shot: lean prompt, skills fire inline, output is final
docker_run_claude -p "write the auth middleware with JWT"

# With a prompt file (avoids CLI argument limit — the system reads it directly)
docker_run_claude -p -f PROMPT.md

# Pipe a prompt with variables and template hints
echo "Create a FastAPI endpoint for /users with SQLAlchemy models. Use the api-router template." | docker_run_claude -p

# With model selection (uses ablated system regardless of model)
docker_run_claude -p "design the dashboard layout" --model claude-sonnet-4-6

The ablated image ensures the -p single-shot prompt carries the same ~10K lean system you get in the interactive loop — skills like shannon and frontend-design fire from the first token, templates with {{name}}/{{path}}/{{type}} variables apply inline. No need to write your prompt and re-state constraints the system prompt would normally handle.

Note on volume mounts: The container's /workdir is the working directory. Prompt files referenced with -f resolve relative to that — so if you cd $HOME/git/my-project and mount with -v $PWD:/workdir, docker_run_claude -p -f PROMPT.md reads the file from your project root.

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

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

Skills

Skills are domain-specific knowledge loaded automatically based on your project's files. This image includes 200+ skills covering common languages and frameworks:

# Works with: Python, TypeScript, Go, Rust, Docker, Kubernetes, Terraform, SQL, and more
# Activates by detecting files — e.g., package.json → frontend skills, requirements.txt → Python skills

Browse all skills: rohitg00/awesome-claude-code-toolkit/skills

Rules

Rules guide Claude Code's behavior per-project. They live in .claude/rules/ and control coding style, naming conventions, and project-specific decisions:

# Create .claude/rules/my-rule.md for project-specific behavior
# Example: "Always use TypeScript for new files" or "Prefer composition over inheritance"

Rules directory: rohitg00/awesome-claude-code-toolkit/rules

Templates

Templates are reusable code patterns Claude Code applies when generating files. They live in .claude/templates/:

# Use a template in your prompt:
Use the api-router template for this endpoint

# Templates support variables: {{name}}, {{path}}, {{type}}

Templates directory: rohitg00/awesome-claude-code-toolkit/templates

Superpowers

Superpowers add advanced development workflows. They're loaded as skills and scripts:

Brainstorm the best approach for this feature      → Brainstorming mode
Check if this PR is ready to merge                 → Gate checking
Build this feature as a subagent                   → Subagent-driven development
Debug the failing test in /src/auth               → Systematic debugging

All superpowers: pcvelz/superpowers

Shannon

Shannon brings AI-driven development guidance — it helps Claude Code make decisions about architecture, patterns, and best practices based on Shannon's research:

# Ask Shannon for guidance:
What's the best pattern for this use case?

# Uses SKILL.md loaded into ~/.claude/skills/ for contextual guidance

More details: unicodeveloper/shannon

antigravity-awesome-skills

A curated collection of additional skills installed globally. Activates automatically based on file context and project type — no manual configuration:

# Install is automatic during the Docker build
# Skills activate by detecting project files (e.g., package.json, Cargo.toml, go.mod)

NPM package: antigravity-awesome-skills

Environment variables

These variables are processed at startup. When the corresponding source variable is set and the target is unset, values will be set as follows.

VariableSourcePurpose
ANTHROPIC_BASE_URLOPENAI_BASE_URLBase URL for the Anthropic API. If ANTHROPIC_BASE_URL is unset and OPENAI_BASE_URL is set, it is derived by stripping the trailing /v1 (or /v1/). Also supports the socket:// protocol — see below for socket forwarding.
ANTHROPIC_AUTH_TOKENOPENAI_API_KEYAuthentication token. Copies OPENAI_API_KEY when unset.
MODEL(set manually)Master model variable. When set, propagates to all downstream model variables below.
ANTHROPIC_MODELMODELThe main model Claude Code uses.
ANTHROPIC_SMALL_FAST_MODELMODELModel used for small, fast operations.
CLAUDE_CODE_SUBAGENT_MODELMODELModel used by subagent processes.
ANTHROPIC_DEFAULT_SONNET_MODELMODELDefault Sonnet model.
ANTHROPIC_DEFAULT_HAIKU_MODELMODELDefault Haiku model.
ANTHROPIC_DEFAULT_OPUS_MODELMODELDefault Opus model (inherits ANTHROPIC_MODEL if unset).
LOCAL_PORTOPENAI_BASE_URLExtracted from OPENAI_BASE_URL when it starts with http://localhost: (e.g. http://localhost:11434LOCAL_PORT=11434).
CLAUDE_CODE_DISABLE_ADAPTIVE_THINKINGSet this to 1 to disable adaptive thinking.
CLAUDE_CODE_EFFORT_LEVELSet this to max to extend thinking (no token constraints).

Note: Combine the DISABLE_ADAPTIVE_THINKING=1 and EFFORT_LEVEL=max to give the highest level of effort (and the most token consumption).

Docker / Claude Code
VariableDefaultPurpose
PATH/home/claudeuser/.local/bin:$PATHClaude binary location.
BASH_DEFAULT_TIMEOUT_MS3600000Default timeout for bash commands (1h). Higher values support longer subagent sessions without premature termination.
BASH_MAX_TIMEOUT_MS3600000Maximum timeout for bash commands (1h). Parallel subagents can run independently without competing for timeout.
CLAUDE_CODE_FORK_SUBAGENT1Enables fork-based subagent execution. Independent agents fork off the parent process — useful for research tasks that run concurrently with the main session.
CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS1Enables experimental multi-agent coordination. Agents share a task list and coordinate work without blocking each other.
OLLAMA_CONTEXT_LENGTH262144Ollama model context length. Only set if not already provided; allows overriding without rebuilding.
OLLAMA_MODEL(unset)If set (and OLLAMA_HOST is not set), start_claude.sh starts Ollama in the background, pulls the model, and passes it to Claude. If unset, Claude runs without Ollama.
OLLAMA_HOST(unset)External Ollama host address. Set to 100.100.100.100:11434 (or any host:port) to connect Claude to an external Ollama instance — Claude will use the specified OLLAMA_MODEL from that host instead of starting Ollama inside the container.

Socket forwarding (LINUX ONLY)

When ANTHROPIC_BASE_URL is set to a socket:// URI, a background socat process is spawned that forwards a local TCP port to the specified Unix socket. Claude Code then connects to http://127.0.0.1:<port> and traffic is forwarded through socat to the socket. The socket is cleaned up when the script exits.

# Listen on the host's socket at $HOME/claude.sock
podman run -u $(id -u):$(id -g) --userns=keep-id --rm -it \
  -v .:/workdir \
  -v $HOME/claude.sock:$HOME/claude.sock \
  -e ANTHROPIC_BASE_URL=socket://$HOME/claude.sock \
  t2fn/claude-abliterated:latest

Sockets are useful when working with shared cloud instances and needing to do LLM driven development.

# First use SSH to create a remote socket during the login process:
host1$ ssh -R $HOME/claude.sock:ollama_host:11434 -AY host2

# Second spawn the container using the SSH created socket:
host2$ podman run -u $(id -u):$(id -g) --userns=keep-id --rm -it \
  -v .:/workdir \
  -v $HOME/claude.sock:$HOME/claude.sock \
  -e ANTHROPIC_BASE_URL=socket://$HOME/claude.sock \
  t2fn/claude-abliterated:latest

The socat dependency is included in all images. It binds an ephemeral TCP port (in the kernel-assigned range).

"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 (11th Cir. 2004: New Kids on the Block v. News America Publishing). 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 "claude-abliterated" is a third-party project name where:

  • "claude" — descriptive reference to Anthropic's Claude Code (nominative fair use)
  • "abliterated" — a coined portmanteau ("ablation" + "obliteration") representing the project's own branding and trademark, denoting the reduction of system prompt bloat and replacements/removals of CAPS like "STRICTLY PROHIBITED"

The project uses "Claude" to describe what it works with, not who it is from. This follows the same trademark convention as "Python bindings for Django", "Builds with Gradle", or "Compatible with TypeScript" — the mark identifies the compatible product, not the source of the third-party project.

All other trademarks, brand names, and service marks appearing in this project belong to their respective owners. No implication of Anthropic's endorsement is made by the use of these marks.

Open Source

Source code and suggestions/issues/pull requests can be made for this repository here:

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

Tag summary

Content type

Image

Digest

sha256:ab5ae280e

Size

276.4 MB

Last updated

about 3 hours ago

docker pull t2fn/claude-abliterated