Skip to content
Back to skills

SQL Generation Agent

ASecurity

--> --- name: sql-generation-agent description: Generates and evaluates grounded Text-to-SQL queries using schema context, production monitoring, and constrained decoding patterns. keywords: - sql-generation - text-to-sql - data-science - schema-grounding - constrained-decoding measurable_outcome: Generate schema-grounded SQL and evaluate production Text-to-SQL outputs with documented semantic checks. license: Proprietary compatibility: - system: Python 3.10+ allowed-tools: - read_file - run_...

  • 7 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 8, 2026
databasespythonshellsqldatabase

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned September 8, 2026

npx -y skills add mdbabumiamssm/AI-Agentic-Skills-by-Dr.-Mia --skill SQL_Generation_Agent --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of SQL Generation Agent?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for SQL Generation Agent
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/mdbabumiamssm-sql-generation-agent/badge)](https://www.skillsdirectory.com/skills/mdbabumiamssm-sql-generation-agent)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
<!--
# COPYRIGHT NOTICE
# This file is part of the "Universal AI Agentic Skills" project.
# Copyright (c) 2026 MD BABU MIA, PhD <md.babu.mia@mssm.edu>
# All Rights Reserved.
#
# This code is proprietary and confidential.
# Unauthorized copying of this file, via any medium is strictly prohibited.
#
# Provenance: Authenticated by MD BABU MIA

-->

---
name: sql-generation-agent
description: Generates and evaluates grounded Text-to-SQL queries using schema context, production monitoring, and constrained decoding patterns.
keywords:
  - sql-generation
  - text-to-sql
  - data-science
  - schema-grounding
  - constrained-decoding
measurable_outcome: Generate schema-grounded SQL and evaluate production Text-to-SQL outputs with documented semantic checks.
license: Proprietary
compatibility:
  - system: Python 3.10+
allowed-tools:
  - read_file
  - run_shell_command
---

# SQL Generation Agent Skill

**Domain:** Data Science / Database Management
**Status:** Active

## Overview
The SQL Generation Agent provides a structured interface for translating natural language into SQL queries. This is a common "text-to-SQL" pattern utilized in modern data platforms. It supports providing schema context (DDL) to ground the language model and improve query accuracy.

## Capabilities
- `generate_sql(natural_language_query, schema_context)`: Generates a SQL query string based on the user's intent and an optional database schema.
- `evaluate_sql_production(user_question, enriched_reformulation, generated_sql)`: Applies STEF-style production Text-to-SQL evaluation by extracting semantic specifications from the natural-language inputs and generated SQL, aligning normalized features, and producing schema-agnostic scoring and monitoring without reference SQL.
- `template_constrained_decoding(recurring_workload, user_question, schema_context)`: For recurring Text-to-SQL workloads, mine reusable templates from historical NL-SQL pairs, reject unmatched queries, select matched templates with natural language inference, and enforce grammar-constrained SQL generation for safer low-latency production behavior.

## Implementation Details
- **Language:** Python
- **Dependencies:** Standard library
- **Main Class:** `SQLGenerationAgent`
- **Note:** The current implementation uses a heuristic mock for demonstration. In production, this integrates with the project's core LLM adapters.

## References
- http://arxiv.org/abs/2604.28049v1
- http://arxiv.org/abs/2604.28028v1

Files in this skill

  • SKILL.md2.4 KB
  • sql_agent.py2.8 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in databases →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.