sql-agent

Translate natural language questions into read-only SQL queries with human approval.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/HyunjunJeon/SDS-AX-Advanced-2026-1 --skill sql-agent
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sql-agent
Source: https://github.com/HyunjunJeon/SDS-AX-Advanced-2026-1/tree/main/Day-03/advanced_study/skills/sql-agent
Command: npx skills add https://github.com/HyunjunJeon/SDS-AX-Advanced-2026-1 --skill sql-agent

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Convert natural language questions into safe, read-only SQL queries, enabling analysts to explore databases without writing code and while preserving data integrity.

Core Features & Use Cases

  • List tables: discover available data structures via sql_db_list_tables.
  • Inspect schemas: view relevant table DDL with sql_db_schema.
  • Query generation & validation: generate queries from schema and validate with sql_db_query_checker before execution.
  • HITL-controlled execution: require human approval before running queries with sql_db_query.

Quick Start

Ask the agent to translate a natural language database question into a read-only SQL query and obtain HITL-approved results.

Frequently Asked Questions about sql-agent

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate SQL queries from natural language without risking data integrity?

The agent inspects database schemas and validates generated SQL queries before execution. It enforces read-only SELECT operations with explicit LIMIT clauses and requires human-in-the-loop approval prior to any data access, ensuring safe database exploration.

Can I explore a database schema using natural language instead of writing code?

Yes, you can discover available data structures by listing tables and viewing relevant table DDL schemas through natural language prompts. The agent handles schema inspection and query generation, enabling database exploration without writing SQL code manually.

Does the natural language to SQL agent support write operations or only read-only queries?

The agent supports only read-only SELECT operations and does not execute write, update, or delete queries. It enforces explicit LIMIT clauses and requires human approval prior to data access to preserve data integrity during database exploration.

How does human-in-the-loop approval work for SQL query execution?

Human-in-the-loop approval requires explicit user authorization before the agent executes any generated SQL query. The agent validates the query, enforces read-only SELECT with LIMIT, and pauses for human approval prior to accessing the database.

What is the best way to validate SQL queries generated from natural language?

The best approach is to use a query checker to validate generated SQL against the database schema before execution. This ensures the natural language translation produces syntactically correct, read-only SELECT queries with explicit LIMIT clauses prior to human approval.