Sign inSign up

t2fn/plsql-claude-abliterated

By t2fn

Updated 25 days ago

IvorySQL + PL/SQL dev with pgTAP and compat tools, optimized for development token efficiency

Image
Machine learning & AI
Developer tools
0

1.5K

t2fn/plsql-claude-abliterated repository overview

plsql-claude-abliterated — IvorySQL + PL/pgSQL Dev Stack with sqlfluff, dbt-postgres, pgTAP, and ora2pg

Cost savings: use the tweakcc reduced system prompt + specialized PL/SQL 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 PL/SQL source files into a container and ask Claude to compile stored procedures, debug queries, lint SQL, migrate Oracle code, run pgTAP tests, profile performance, and ship them. This image combines Claude Code (abliterated) with the IvorySQL database engine, pgTAP testing framework, sqlfluff linter, dbt data transformation, ora2pg migration tool, and all build tools — a complete PL/SQL development workstation for disconnected enterprise environments.

What It Does

This container is a focused PL/SQL/IvorySQL development environment with the full stack of tools needed to develop, test, lint, format, migrate, and deploy stored procedures and database schemas:

  • IvorySQL 5.4 — Open-source Oracle-compatible PostgreSQL fork (PL/pgSQL + oracle compatibility)
  • pgTAP v1.3.4 — Unit testing framework for PL/pgSQL functions
  • plpgsql_check v2.10.2 — Static analysis of stored procedures
  • sqlfluff v4.2.2 — SQL linter with PL/pgSQL dialect support
  • dbt-postgres v1.11 + dbt-core v1.12 — Data transformation pipelines
  • ora2pg v24.3 — Oracle-to-IvorySQL migration tool (DDL, DML, PL/SQL conversion)
  • pgFormatter v5.10 — SQL and PL/pgSQL code formatter
  • pgcli — Smart PostgreSQL client with autocomplete and syntax highlighting
  • psql + pg_dump + pg_restore — Full database client and backup suite
  • ecpg — Embedded C/SQL preprocessor for PL/pgSQL-C interop
  • pg_repack — Online table maintenance without locks
  • pgbouncer — Connection pooling for production workloads
  • PostGIS 3.5 + pgroonga — Spatial indexing and full-text search extensions
  • gdb + valgrind — Debugger and memory profiler for C extension code

No configuration, no setup. Give it .sql/.plsql source files and ask Claude to compile (CREATE FUNCTION), lint, debug, profile, migrate, and ship.

Why This Container?

PL/SQL development without the workstation

Building Oracle-compatible database applications typically means installing IvorySQL, configuring pgTAP for testing, setting up sqlfluff for linting, configuring dbt for transformations, and installing ora2pg for migration. This container bundles it all and makes it accessible to Claude via a single prompt.

Without this containerWith plsql-claude-abliterated
Install IvorySQL, pgTAP, sqlfluff separatelydocker run — everything is ready
Configure Oracle-compatible PL/pgSQL syntaxClaude knows IvorySQL's Oracle compatibility layer
Run pgTAP unit tests with proper setupAsk Claude — it initializes the database and runs tests automatically
One tool per terminal sessionpsql, sqlfluff, dbt, ora2pg, pgFormatter all available
Manual migration configuration (ora2pg)Pre-configured Oracle-to-IvorySQL conversion tools
What Claude can do

The container works with any PL/SQL project under /workdir:

  • PL/pgSQL stored procedures — compile and test with IvorySQL's Oracle-compatible engine
  • Unit testing — run pgTAP tests against compiled functions automatically
  • Static analysis — use plpgsql_check to find bugs in stored procedures before deployment
  • Linting — sqlfluff checks SQL style, syntax, and best practices via .sqlfluff config
  • Data transformation — dbt-postgres builds ELT pipelines from raw schemas to analytics tables
  • Oracle migration — ora2pg converts Oracle DDL/DML/PLSQL to IvorySQL-compatible syntax
  • Code formatting — pgFormatter normalizes SQL style across teams
  • Query profiling — valgrind identifies memory issues in C extension code
  • Backup and restore — pg_dump/pg_restore handle full database migrations

Toolkit

PL/SQL Database Tools
ComponentSourceDescription
IvorySQL 5.4ivorysql.orgOracle-compatible PostgreSQL fork with PL/pgSQL + Oracle syntax support
pgTAP v1.3.4pgtap.orgUnit testing framework for PL/pgSQL functions and procedures
plpgsql_check v2.10.2github.com/okbob/plpgsql_checkStatic analyzer for PL/pgSQL stored procedures
sqlfluff v4.2.2sqlfluff.comSQL linter with dbt-postgres dialect support and best practice enforcement
dbt-postgres v1.11getdbt.comData transformation tool for building ELT pipelines on PostgreSQL/IvorySQL
ora2pg v24.3ora2pg.orgOracle-to-PostgreSQL/IvorySQL migration tool (DDL, DML, PL/SQL conversion)
pgFormatter v5.10pgformatter.comSQL and PL/pgSQL code formatter with Oracle compatibility rules
pgclipgcli.comSmart PostgreSQL client with autocomplete, syntax highlighting, and keybindings
psql + pg_dumppostgresql.orgFull database client and backup suite for IvorySQL/PostgreSQL
ecpgpostgresql.orgEmbedded C/SQL preprocessor for PL/pgSQL-C interop
Build and Debug Tools
ComponentSourceDescription
gdbrockylinux.devFull-screen TUI debugger with native expression evaluation
valgrindvalgrind.orgMemory leak detection, profiling (memcheck, cachegrind) for C extensions
make/cmakecmake.orgBuild automation for multi-file and mixed-language projects
Why this container is better suited for development

Prompt Claude to use standard SQL linting practices. You can say "use the plsql skill to compile stored procedures, run pgTAP tests, and lint with sqlfluff" and Claude will apply PL/pgSQL-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 test: "run pgTAP tests against the bonus calculation function" — Claude compiles with correct flags and runs unit tests automatically
  • Break tasks down: instead of a monolithic database refactor, Claude splits the work into subagent tasks — each procedure gets linted and tested independently before integration
  • Ensure migrated code works: Claude uses ora2pg to convert Oracle syntax to IvorySQL-compatible PL/pgSQL, then validates with pgTAP
  • Format consistently: Claude applies pgFormatter rules across all SQL files for team consistency
  • Avoid overcorrection: the ablated system prompt avoids the "STRICTLY PROHIBITED" trap that causes Claude to overzealously fix style at the expense of Oracle compatibility

Say "use the plsql skill to..." to directly task Claude with PL/SQL-specific skills — IvorySQL compilation, pgTAP testing, sqlfluff linting, ora2pg migration, and dbt data transformation.

Usage

# Initialize database and run SQL scripts
docker run -u $(id -u):$(id -g) \
    -v "$PWD:/workdir:rw" \
    t2fn/plsql-claude-abliterated:latest \
    bash -c '/usr/ivory-5/bin/initdb -D /tmp/db && \
             /usr/ivory-5/bin/pg_ctl -D /tmp/db start -w && \
             psql -p 5432 -f schema.sql && \
             /usr/ivory-5/bin/pg_ctl -D /tmp/db stop'

# Run pgTAP unit tests against compiled functions
docker run -u $(id -u):$(id -g) \
    -v "$PWD:/workdir:rw" \
    t2fn/plsql-claude-abliterated:latest \
    bash -c '/usr/ivory-5/bin/initdb -D /tmp/db >/dev/null 2>&1 && \
             /usr/ivory-5/bin/pg_ctl -D /tmp/db start -w >/dev/null 2>&1 && \
             sleep 2; psql -p 5432 -f tests/test_bonus.sql'

# Lint SQL files with sqlfluff
docker run -u $(id -u):$(id -g) \
    -v "$PWD:/workdir:rw" \
    t2fn/plsql-claude-abliterated:latest \
    bash -c 'sqlfluff lint --dialect postgres *.sql'

# Format SQL with pgFormatter
docker run -u $(id -u):$(id -g) \
    -v "$PWD:/workdir:rw" \
    t2fn/plsql-claude-abliterated:latest \
    bash -c 'pg_format schema.sql > formatted_schema.sql'

# Migrate Oracle DDL to IvorySQL with ora2pg
docker run -u $(id -u):$(id -g) \
    -v "$PWD:/workdir:rw" \
    t2fn/plsql-claude-abliterated:latest \
    bash -c 'ora2pg --configure -c /workdir/ora2pg.conf && ora2pg -c ora2pg.conf -o schema.sql'

# With Claude Code integration (asks for ANTHROPIC_API_KEY env var)
docker run -u $(id -u):$(id -g) -e ANTHROPIC_API_KEY=sk-... \
    -v "$PWD:/workdir:rw" \
    t2fn/plsql-claude-abliterated:latest

# Privileged mode (for full device access and database initialization)
docker run --privileged -u $(id -u):$(id -g) -e ANTHROPIC_API_KEY=sk-... \
    -v "$PWD:/workdir:rw" \
    t2fn/plsql-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/plsql-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/plsql-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/plsql-claude-abliterated:latest /bin/bash

# Then send a prompt:
# "create schema.sql with table definitions, write PL/pgSQL functions, run pgTAP tests"

Claude connects to the IvorySQL database engine, calls CREATE FUNCTION, runs pgTAP tests, traces Oracle compatibility issues, 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 PL/SQL development, this means:

  • Focused tools, focused rules — PL/pgSQL-specific rules (IvorySQL syntax, pgTAP testing) 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 "plsql-claude-abliterated" is a third-party project name where:

  • "plsql" — descriptive reference to the PL/SQL 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 "PL/SQL" 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
ada-claude-abliteratedAda development (GNAT via alr, AUnit testing)Hub
cobol-claude-abliteratedCOBOL compilation for mainframe modernizationHub
fortran-claude-abliteratedFortran HPC with BLAS/LAPACK math libsHub
julia-claude-abliteratedJulia scientific computing and IJulia notebooksHub
apache-claude-abliteratedApache Spark + Pig big data processingHub
hdl-claude-abliteratedFPGA/ASIC HDL dev (iverilog, ghdl, verilator)Hub
pascal-claude-abliteratedPascal compilation (Free Pascal Compiler 3.2.x, gdb, valgrind)Hub
forth-claude-abliteratedForth stack-based computing (gforth interpreter/compiler, gdb, valgrind)Hub
pli-claude-abliteratedPL/I mainframe compilation (xPL/C → gcc pipeline, gdb, valgrind)Hub
plsql-claude-abliteratedPL/SQL + IvorySQL database dev stack (psql, sqlfluff, dbt-postgres, pgTAP, ora2pg)This image

References

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:ba57a3320

Size

625.8 MB

Last updated

25 days ago

docker pull t2fn/plsql-claude-abliterated