SQL Query Assistant (Free Edition) for Openclaw

Openclaw Skills for SQL query generation, performance optimization, schema design, and data analysis across major databases.

thcjp
v1.0.0
Aug 2, 2026
0
151
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install sql-free

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 sql-free 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 SQL Query Assistant (Free Edition)?

Openclaw Skills for SQL Query Assistant (Free Edition) helps AI agents convert natural-language requests into database-specific SQL, optimize slow queries, and support practical schema design and analytical SQL workflows.

It is built for developers who work across MySQL, SQLite, SQL Server, and related database environments and need a structured, reusable way to produce executable SQL, analyze execution plans, and generate DDL or migration-friendly outputs. Openclaw Skills is especially valuable when speed, consistency, and cross-database SQL portability matter.

SQL Query Assistant (Free Edition) Use Cases

  • Convert natural-language questions into executable SQL for MySQL, SQLite, SQL Server, and similar relational databases.
  • Optimize slow queries using EXPLAIN-oriented analysis, index recommendations, and query rewrites.
  • Design table schemas, constraints, and index strategies for new or evolving applications.
  • Generate complex analytical SQL with CTEs, window functions, GROUP BY/HAVING logic, and time-series patterns.
  • Support database migration work by producing DDL and migration-ready structure definitions.
  • Analyze ORM-generated queries and identify N+1 patterns or other performance issues.
  • Standardize SQL outputs for repeatable workflows in AI coding and automation environments.

How SQL Query Assistant (Free Edition) Works

  1. Identify the target database engine so Openclaw Skills can adapt SQL syntax and dialect-specific functions.
  2. Provide the table structure, either as CREATE TABLE statements or as a schema description with relationships and key fields.
  3. Describe the SQL goal in natural language or paste an existing SQL fragment that needs rewriting or optimization.
  4. The skill generates, rewrites, or optimizes SQL and annotates dialect differences such as date functions, pagination, concatenation, and auto-increment behavior.
  5. If the request is performance-related, it analyzes execution characteristics and returns optimization guidance, index suggestions, and rewritten SQL.
  6. If the request is schema-related, it produces DDL, index strategy guidance, and optional ER-style relationship output.
  7. Optionally validate the result by executing it in the target environment and reviewing the returned data or execution plan.

SQL Query Assistant (Free Edition) Setup

Openclaw Skills requires an AI agent environment with LLM access and an API key configured in the runtime shell.

  1. Ensure your agent platform supports SKILL.md-based skills and provides read, exec, and write tool access.
  2. Set the required API key before starting the agent session:
export API_KEY=${API_KEY:?please set the environment variable}
  1. Restart the shell session or open a new terminal so the environment variable is available to the agent.
  2. Confirm the target database type before issuing requests so the skill can generate the correct dialect.
  3. Provide table schemas, constraints, and sample query intent for best results.
  4. Avoid placing sensitive values such as database passwords or secret fields directly into prompts.

Recommended runtime context:

  • Supported OS: Windows, macOS, Linux
  • Supported agent platforms: Claude Code, Cursor, Codex, Gemini CLI, and similar AI agents
  • Required dependency: agent-provided LLM API access

SQL Query Assistant (Free Edition) Data Schema & Taxonomy

Openclaw Skills organizes inputs and outputs around a small, structured interface and a predictable response envelope.

Field Type Required Purpose
input string Yes Natural-language request, SQL statement, or instruction for SQL Query Assistant (Free Edition)
options object No Optional configuration such as mode selection or formatting preferences
callback_url string No Async notification endpoint after processing completes

Response envelope

Field Type Purpose
success boolean Indicates whether processing succeeded
data.result string Generated or optimized SQL result text
data.execution_time string Reported processing duration
data.metadata.version string Skill version metadata
data.metadata.processor string Processor label, such as sql
execution_log array[string] Internal processing steps for traceability
error null or object Error details when processing fails

Metadata taxonomy

  • Database dialect: MySQL, SQLite, SQL Server, or standard SQL fallback
  • Work mode: query generation, performance optimization, schema design, or data analysis
  • Output class: executable SQL, DDL, optimization notes, or execution-plan guidance
  • Safety context: sensitive-data avoidance, injection awareness, and access-control constraints

Generated artifacts

  • Executable SQL statements
  • Rewritten SQL with dialect notes
  • DDL and migration-oriented schema definitions
  • Index strategy recommendations
  • EXPLAIN-oriented optimization guidance
  • Optional ER-style relationship descriptions

SQL Query Assistant (Free Edition) Advanced Features

  • Natural-language to SQL translation with automatic dialect adaptation for MySQL, SQLite, SQL Server, and standard SQL.
  • Query performance analysis using EXPLAIN-oriented reasoning, including scans, temporary tables, and filesort detection.
  • Index strategy recommendations based on WHERE, JOIN, and ORDER BY patterns.
  • Query rewrites that reduce SELECT *, flatten subqueries, and simplify nested logic.
  • Schema design support with table structure, constraints, normalization tradeoffs, and migration-ready DDL generation.
  • Complex analytical SQL support including CTEs, recursive patterns, window functions, and time-series calculations.
  • N+1 query pattern identification for ORM-generated workloads.
  • Async callback support through callback_url for agent workflows that need deferred completion handling.
  • Compatible with structured AI agent pipelines in Openclaw Skills for repeatable database automation tasks.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*