Axiom SQL Formatter for Openclaw

A lightweight, pure standard library SQL formatting tool that styles SQL queries without execution or external parsing dependencies.

kofna3369
v0.1.2
Jun 15, 2026
0
505
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install axiom-sql-formatter

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install axiom-sql-formatter using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Axiom SQL Formatter?

Axiom SQL Formatter is a lightweight, zero-dependency utility designed to instantly standardize and clean up your SQL code. As a valuable asset in the ecosystem of Openclaw Skills, this tool formats raw SQL string inputs to apply consistent indentation, align primary clauses, and automatically uppercase SQL keywords. Because it is built entirely using the Python standard library, it achieves ultra-fast performance under 100ms without relying on heavy external SQL parsers or execution runtimes.

This utility makes SQL queries highly readable and digestible for human review, helping developer workflows and team coding standards alike. Developers searching for reliable Openclaw Skills to enhance their database workflow can leverage this tool for both CLI-based automation and direct integration inside Python applications.

Axiom SQL Formatter Use Cases

  • Formatting messy, minified, or raw SQL queries to improve readability before committing changes.
  • Standardizing code styles across development teams for shared SQL query files.
  • Pre-processing SQL scripts as a linting step before code review processes.
  • Automating SQL query presentation within terminal environments or text editor pipelines.
  • Formatting database logs for cleaner logging output in telemetry dashboards.

How Axiom SQL Formatter Works

  1. Input Reception: The tool takes a raw SQL script or text block through the CLI file argument or the Python API function call.
  2. Lexing and Matching: It identifies SQL keywords utilizing a configurable internal keyword list without generating an abstract syntax tree (AST).
  3. Formatting Application: It automatically uppercases detected SQL keywords (e.g., SELECT, FROM, WHERE) while safely preserving any single-quoted string literals.
  4. Indentation and Clause Realignment: It injects consistent indentation (defaulting to 4 spaces) and places newlines before major query clauses.
  5. Deterministic Output: It generates byte-to-byte stable, beautifully formatted SQL queries in under 100ms.

Axiom SQL Formatter Setup

To start using this package as part of your collection of Openclaw Skills, download the script into your project directory.

Command Line Interface

Ensure Python 3 is installed, then run the formatter directly on any SQL file:

# Format a query file with default settings (4-space indentation)
python3 axiom_sql_formatter.py query.sql

# Format a query with custom indentation depth
python3 axiom_sql_formatter.py --indent 2 query.sql

Python API Integration

Import the format function to programmatically clean up SQL code inside your applications:

from axiom_sql_formatter import format_sql

# Clean up a raw string query
raw_sql = "select id, name from users where status = 'active'"
formatted = format_sql(raw_sql)
print(formatted)
# Output:
# SELECT id, name
# FROM users
# WHERE status = 'active'

Axiom SQL Formatter Data Schema & Taxonomy

This utility does not generate complex metadata tracking databases, maintaining a clean execution footprint. It operates on plain text input and produces direct text output.

Technical Metrics and Verification

Check Status Specifications
Unit tests 20+ cases Validates multiple complex query conditions
Performance < 100ms Highly optimized local string mapping
Security Pure stdlib, no injection Zero database execution or execution runtimes
Determinism Byte-to-byte stable Output is entirely consistent for matching inputs
License Apache-2.0 Permissive open-source distribution

Axiom SQL Formatter Advanced Features

  • Configurable Indentation: Allows developers to adjust indentation spacing depth to match precise project style guides.
  • String Literal Preservation: Safely bypasses formatting transformations inside single-quoted strings to prevent query corruption.
  • Zero-Dependency Core: Operates purely on standard Python libraries, eliminating installation friction and bloating in minimal agent environments.
  • Custom Keyword Lists: Supports extensibility for specifying customized lists of target keywords for uppercase formatting.
  • Stable Determinism: Ensures that repeated runs on the exact same input generate identical string structures, perfect for Git-tracked workflows.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*