Sign inSign up

t2fn/forth-claude-abliterated

By t2fn

•Updated about 1 month ago

gforth Forth interpreter/compiler + stack-based dev tools, optimized for Forth development

Image
Machine learning & AI
Developer tools
0

1.2K

t2fn/forth-claude-abliterated repository overview

⁠forth-claude-abliterated — gforth Development Stack with gdb and valgrind

Cost savings: use the tweakcc reduced system prompt + specialized Forth 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 Forth source files into a container and ask Claude to compile, debug, profile, cross-compile embedded C, and ship them. This image combines Claude Code (abliterated) with the gforth interpreter/compiler, gdb debugger, valgrind profiler, and all build tools — a complete Forth development workstation for disconnected enterprise environments.

⁠What It Does

This container is a focused Forth development environment. Mount whatever Forth projects, real-time control scripts, or embedded systems code you want to work on, start the container, and Claude automatically gets:

  • gforth — GNU FreeForth 0.7.x interpreter/compiler (stack-based execution model)
  • gdb — Full-screen TUI debugger with Forth source-level debugging support
  • valgrind — Memory leak detection, heapcheck, cachegrind profiling
  • make/cmake — Build automation for multi-file and mixed-language projects
  • Runtime libraries — libgfortran (for Fortran interop), openssl, zlib, bzip2
  • Abliterated Claude — lean ~10K system prompt, 200+ skills, subagent support, and low token cost

No configuration, no setup. Give it Forth source files (.fs) and ask Claude to compile, lint, debug, and ship.

⁠Why This Container?

⁠Forth development without the workstation

Building stack-based applications typically means installing gforth interpreter/compiler, setting up GDB for debugging, configuring make/cmake build systems, and installing valgrind for memory analysis. This container bundles it all and makes it accessible to Claude via a single prompt.

Without this containerWith forth-claude-abliterated
Install gforth, gdb, make separatelydocker run — everything is ready
Compile Forth with correct stack semanticsClaude knows gforth's stack-based execution model automatically
Run interactive Forth REPL sessionsAsk Claude — it interprets and compiles .fs files correctly
One tool per terminal sessiongforth, gdb, valgrind all available simultaneously
Manual embedded systems configurationPre-configured for spacecraft control, robotics, real-time applications
⁠What Claude can do

The container works with any Forth project under /workdir:

  • Forth programs — interpret and compile .fs files with gforth's stack-based execution model
  • Word definitions — define new vocabulary words (like functions) and execute them interactively
  • Embedded systems — use Forth for real-time control, robotics, or spacecraft guidance
  • Cross-compilation — target ARM, MIPS, or other architectures with -e flag
  • Debugging — step through compiled binaries in GDB with stack inspection
  • Memory analysis — run valgrind to detect leaks in long-running embedded applications
  • Build automation — use make/cmake for complex multi-module Forth projects

⁠Toolkit

⁠Forth Interpreter/Compiler Tools
ComponentSourceDescription
gforthgforth.orgGNU FreeForth interpreter/compiler with stack-based execution model and native code generation
gdbrockylinux.devFull-screen TUI debugger with native Forth expression evaluation and stack inspection
valgrindvalgrind.orgMemory leak detection, profiling (memcheck, cachegrind) for compiled binaries
⁠Build and Runtime Tools
ComponentSourceDescription
makerockylinux.devBuild automation for Makefile-based Forth projects
cmakecmake.orgMulti-language CMake builds for complex Forth/C/Fortran projects
libgfortrangcc.gnu.orgFortran runtime library for Forth-Fortran interop
⁠Why this container is better suited for development

Prompt Claude to use standard Forth linting practices. You can say "use the forth skill to compile myscript.fs with gforth, debug it with gdb, and run valgrind" and Claude will apply Forth-specific compilation rules, break tasks down properly, and verify each segment works.

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

  • Ask Claude to build: "compile myscript.fs with gforth -e 'include myscript.fs'" — Claude runs the interpreter/compiler pipeline automatically
  • Break tasks down: instead of a monolithic Forth refactor, Claude splits the work into subagent tasks — each word definition gets tested independently before integration
  • Ensure stack safety: Claude uses gdb to verify stack balance and memory correctness in compiled binaries
  • Debug systematically: Claude runs valgrind to identify leaks in long-running embedded applications
  • Avoid overcorrection: the ablated system prompt avoids the "STRICTLY PROHIBITED" trap that causes Claude to overzealously fix style at the expense of Forth semantics

Say "use the forth skill to..." to directly task Claude with Forth-specific skills — gforth interpretation, GDB debugging, valgrind profiling, and make/cmake build automation.

⁠Usage

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

# Compile and run Forth with Claude and gforth working together
docker run -u $(id -u):$(id -g) -e ANTHROPIC_API_KEY=sk-... \
    -v "$PWD:/workdir:rw" \
    t2fn/forth-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/forth-claude-abliterated:latest

# Then send a prompt:
# "compile myscript.fs with gforth, debug it, and run the result"

# Run in privileged mode (for full device access):
docker run --privileged -u $(id -u):$(id -g) -e ANTHROPIC_API_KEY=sk-... \
    -v "$PWD:/workdir:rw" \
    t2fn/forth-claude-abliterated:latest

# Or with podman (no --privileged needed, use --device):
podman run -u $(id -u):$(id -g) --userns=keep-id \
    --device=/dev/pts:/dev/pts \
    -e ANTHROPIC_API_KEY=sk-... \
    -v "$PWD:/workdir:rw" \
    t2fn/forth-claude-abliterated:latest

# With Ollama for local LLM integration
docker run -u $(id -u):$(id -g) -e ANTHROPIC_API_KEY=sk-... \
    -v "$PWD:/workdir:rw" \
    t2fn/forth-claude-abliterated:latest

# Claude-tools development shell — start an interactive /bin/bash session with claude-tools available on $PATH
docker run -u $(id -u):$(id -g) -e ANTHROPIC_API_KEY=sk-... \
    -v "$PWD:/workdir:rw" \
    t2fn/forth-claude-abliterated:latest /bin/bash

# Then send a prompt:
# "compile and run myscript.fs, then debug it with gdb"

Claude connects to the gforth interpreter, calls gforth myscript.fs, traces stack operations, runs valgrind for memory checks, and returns a natural-language report — all from one prompt.

⁠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 Forth development, this means:

  • Focused tools, focused rules — Forth-specific rules (stack semantics, word definitions) 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 "forth-claude-abliterated" is a third-party project name where:

  • "forth" — descriptive reference to the Forth 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 "Forth" 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⁠
ada-claude-abliterated⁠Ada development (GNAT via alr, AUnit testing)Hub⁠
cobol-claude-abliterated⁠COBOL compilation for mainframe modernizationHub⁠
fortran-claude-abliterated⁠Fortran HPC with BLAS/LAPACK math libsHub⁠
julia-claude-abliterated⁠Julia scientific computing and IJulia notebooksHub⁠
apache-claude-abliterated⁠Apache Spark + Pig big data processingHub⁠
hdl-claude-abliterated⁠FPGA/ASIC HDL dev (iverilog, ghdl, verilator)Hub⁠
pascal-claude-abliterated⁠Pascal compilation with Free Pascal Compiler + gdb + valgrindHub⁠
pli-claude-abliterated⁠PL/I mainframe compilation with xPL/C → gcc pipeline + gdb + valgrindHub⁠
forth-claude-abliterated⁠Forth stack-based computing (gforth interpreter/compiler, gdb, valgrind)This image

⁠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:c8e1808a1…

Size

464.8 MB

Last updated

about 1 month ago

docker pull t2fn/forth-claude-abliterated