Sign inSign up

t2fn/python-claude-abliterated

By t2fn

Updated 22 days ago

Python toolchain and debuggers, optimized for scripting and AI development, token efficiency, agents

Image
Machine learning & AI
Developer tools
0

2.8K

t2fn/python-claude-abliterated repository overview

python-claude-abliterated — Python Linting & Code Quality Stack with Claude Code

Cost savings: use the tweakcc reduced system prompt + specialized Python 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 Python project into a container and ask Claude to lint, type-check, test, and refine it. This image combines Claude Code (abliterated) with ruff, pylint, mypy, bandit, and a full suite of Python development tools — a complete Python quality assurance workstation.

What It Does

This container is a focused Python development environment. Mount whatever Python packages, scripts, or data pipelines you want to work on, start the container, and Claude automatically gets:

  • ruff — fastest all-in-one linter + formatter (replaces flake8, isort, black, pydocstyle)
  • pylint — comprehensive linter (style, complexity, conventions)
  • mypy + pyright — dual static type checkers
  • bandit — security linter for Python code
  • Abliterated Claude — lean ~10K system prompt, 200+ skills, subagent support, and low token cost

No configuration, no setup. Give it a Python project and ask Claude to lint, type-check, and ship.

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

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

# Then send a prompt:
# "ruff check my project, run mypy on all modules, and fix all issues"

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

Claude connects to the linters, calls ruff check, traces type annotations, and returns a natural-language report — all from one prompt.

Why This Container?

Python quality assurance without the workstation

Python linting and type-checking typically means installing ruff, pylint, mypy, pyright, bandit, and more — each with their own configurations. This container bundles it all and makes it accessible to Claude via a single -p prompt.

Without this containerWith python-claude-abliterated
Install ruff, pylint, mypy, pyright, bandit, black, isort, etc.docker run — everything is ready
Write Python code, run lint commands, parse output manuallyClaude calls ruff check and gets actionable fixes directly
Manually manage pyproject.toml, pip dependencies, type stubsAsk Claude — it knows the Python ecosystem
One project per analysis sessionMount multiple packages; Claude checks them sequentially
Manual tool installation and configurationruff + pylint + mypy pre-configured with pyproject.toml
What Claude can do

The container works with any Python project under /workdir:

  • Python packages — full pip package management (add, remove, install, verify)
  • Linting — ruff (RECOMMENDED), pylint, flake8, pycodestyle, pyflakes
  • Type checking — mypy + pyright dual type checkers
  • Security — bandit security scanning for vulnerabilities
  • Code formatting — ruff format (or black, pyupgrade)
  • Multiple packages at once — drop a monorepo and ask Claude to check all packages

Toolkit

Python Tools
ComponentSourceDescription
Pythonrocky10Core interpreter and standard library
Claude Codeclaude-abliterated/Abliterated CLI with tweakcc, 200+ skills, rules
ruffcrates.ioFastest all-in-one linter + formatter
pylintpypi.orgComprehensive linter (style, complexity, conventions)
mypypypi.orgStatic type checker
pyrightpypi.orgMicrosoft's static type checker
banditpypi.orgSecurity linter for Python
blackpypi.orgOpinionated code formatter
flake8pypi.orgStyle guide enforcement (PEP 8)
isortpypi.orgImport sorting
pyupgradepypi.orgUpgrade syntax to newer versions
pydocstylepypi.orgDocstring style checking
autoflakepypi.orgRemove unused imports and variables
Why this container is better suited for development

Prompt Claude to use standard linting practices. You can say "use the python skill to lint my code, ensure functions are not too complex, and apply ruff formatting" and Claude will apply Python-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 ruff check, fix complexity issues, and format all files" — Claude applies the correct toolchain and rules automatically
  • Break tasks down: instead of a monolithic refactor, Claude splits the work into subagent tasks — each function 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
  • 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 python skill to..." to directly task Claude with Python-specific skills — type checking with mypy, security scanning with bandit, import sorting with isort, and docstring validation with pydocstyle.

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/python-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/python-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 Python development, this means:

  • Focused tools, focused rules — Python-specific rules (ruff, pylint, mypy) 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 "python-claude-abliterated" is a third-party project name where:

  • "python" — descriptive reference to the Python 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 "Python" 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-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:9e0edc124

Size

383.3 MB

Last updated

22 days ago

docker pull t2fn/python-claude-abliterated