text-to-sql — Claude Code skill: what it does, how to install
text-to-sql turns a plain-language request into a SQL query, checked against your database schema and built with placeholders instead of inlined values.
no license 158 installs ★ 45 updated 2026-07-14
npx skills add oimiragieo/agent-studio --skill text-to-sql -a claude-codeWhat text-to-sql does
Give it a question in ordinary words and the skill breaks the request down, checks names against your schema, writes the SQL and validates the syntax. No script ships with it: the whole thing is agent instructions, so it runs in the context of the sonnet model and reads files with Read, Write, Grep and Glob.
You bring the schema. Identifiers get checked against whatever you put in context, and with nothing there the validation has nothing to compare. Values arrive as placeholders (? or $N), SELECT statements carry LIMIT 100 unless you say otherwise, and DROP, DELETE, TRUNCATE or UPDATE sit waiting for your confirmation.
The repository also carries an evaluation path through promptfoo: a config such as text_to_sql_config.yaml plus npx promptfoo@latest eval -c text_to_sql_config.yaml. The guidance leans on sample queries, and on step-by-step reasoning once a query gets hard.
What it helps with
- turn a plain-language request into runnable SQL
- join
ordersandproductsto get revenue per item - spot duplicate rows in a table
- check query syntax before it touches live data
- compare prompt variants with promptfoo
Example prompts for the agent
- Write the SQL for every user who signed up in the past month.
- Build a query joining
ordersandproductsfor revenue per product in Q4. - Find duplicate rows in
users, keep aLIMIT, and walk me through what the query does.
How to install text-to-sql
1Skills CLI (Vercel)
npx skills add oimiragieo/agent-studio --skill text-to-sql -a claude-code2Manually: put the files in place
~/.claude/skills/text-to-sql/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/text-to-sql/
1Skills CLI (Vercel)
npx skills add oimiragieo/agent-studio --skill text-to-sql -a codex2Manually: put the files in place
.agents/skills/text-to-sql/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add oimiragieo/agent-studio --skill text-to-sql -a cursor2Manually: put the files in place
.cursor/skills/text-to-sql/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install oimiragieo/agent-studio .claude/skills/text-to-sql2Manually: put the files in place
.github/skills/text-to-sql/SKILL.md1Skills CLI (Vercel)
npx skills add oimiragieo/agent-studio --skill text-to-sql -a gemini-cli2Platform CLI
gemini skills install https://github.com/oimiragieo/agent-studio --path .claude/skills/text-to-sqlManually: put the files in place
.devin/skills/text-to-sql/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add oimiragieo/agent-studio --skill text-to-sql -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about text-to-sql
How do I install text-to-sql in Claude Code?
Run npx skills add oimiragieo/agent-studio --skill text-to-sql -a claude-code. The skill file then lives at ~/.claude/skills/text-to-sql/SKILL.md.
What does text-to-sql do?
It converts a natural-language question into SQL, matching table and column names to your schema and returning the query with placeholders rather than baked-in values.
What limits should I know about?
Without a schema in context there is nothing to validate identifiers against. SELECT queries get LIMIT 100, and DROP, DELETE, TRUNCATE or UPDATE only run after you confirm.