Axiom Sql Formatter

Other

Formats SQL queries with uppercase keywords, consistent indentation, aligned clauses, and preserved string literals for improved readability.

Install

openclaw skills install axiom-sql-formatter

axiom-sql-formatter

Version: 0.1.2 Axioma Tools

Formats SQL queries with consistent style without parsing or executing them.

What this skill does

  • Uppercase SQL keywords (SELECT, FROM, WHERE, etc.)
  • Consistent indentation (4 spaces or configurable)
  • Newline before major clauses
  • Single-quote string preservation
  • Configurable keyword list

When to use this skill

  • ✅ Format raw SQL for readability
  • ✅ Standardize team SQL style
  • ✅ Pre-process before code review
  • ❌ Parse SQL into AST (use sqlparse)
  • ❌ Validate SQL syntax (use EXPLAIN)

Usage

python3 axiom_sql_formatter.py query.sql
python3 axiom_sql_formatter.py --indent 2 query.sql
from axiom_sql_formatter import format_sql
formatted = format_sql('select a,b from t where x=1')
# 'SELECT a, b\nFROM t\nWHERE x = 1'

Validation

CheckStatus
Unit tests20+ cases
Performance<100ms
SecurityPure stdlib, no injection
DeterminismByte-to-byte stable
LicenseApache-2.0

Last updated: 2026-06-14