db-query

Translate natural language database questions into safe SELECT SQL for MySQL, ClickHouse, and Doris.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/Pacvue/devflow-cursor --skill db-query-pacvue
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: db-query
Source: https://github.com/Pacvue/devflow-cursor/tree/main/.cursor/skills/db-query
Command: npx skills add https://github.com/Pacvue/devflow-cursor --skill db-query-pacvue

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pyyaml, pymysql, clickhouse-connect, and includes scripts (resource) components.

What problem does it solve?

Analyzes database schemas and translates natural language prompts into SQL across multiple engines, helping users quickly convert questions into executable queries.

Core Features & Use Cases

  • Schema-aware NL-to-SQL generation across MySQL, ClickHouse, and Doris.
  • Read-only safety: enforces SELECT/WITH and environment-specific safeguards.
  • Use Case: Ad-hoc querying and reporting over production-like schemas from natural language.

Quick Start

Describe a database question in natural language and ask the skill to generate a safe, fully-qualified SELECT SQL against the configured environment.

Frequently Asked Questions about db-query

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

FAQPage Schema
How do I turn natural language into SQL for cross-engine databases?

Natural language SQL generation translates plain questions into queries by analyzing schema and generating safe SELECT statements across MySQL, ClickHouse, and Doris engines.

Can I use natural language queries for ad-hoc reporting on production schemas?

Yes, natural language queries support ad-hoc reporting on production-like schemas by enforcing read-only SELECT and WITH clauses with environment-specific safeguards.

Does this NL-to-SQL approach work with ClickHouse and Doris?

NL-to-SQL generation works with ClickHouse and Doris, alongside MySQL, by performing schema analysis and generating fully-qualified queries tailored to each engine.

What is the best way to ensure read-only safety when generating SQL from text?

Read-only safety in SQL generation is ensured by enforcing strict SELECT and WITH clauses, validating safety with a verifier, and applying environment-specific production safeguards.

How do I generate SQL from natural language step by step?

Describe a database question in natural language, let the system resolve the environment from project config, construct the query via schema analysis, validate safety, and format the final results.

Are there limitations to natural language SQL generation across multiple engines?

Natural language SQL generation is limited to read-only operations, strictly enforcing SELECT and WITH clauses, meaning it cannot perform data modifications or write operations.