
SQL Query Generator
Turns plain-English data questions into SQL queries for several database dialects
- Repository
- phuryn/pm-skills
- Stars
- 27,616
- Licence
- MIT
- Files
- 1 file
What it does
Once installed, the agent can take a business question such as 'find users who signed up in the last 30 days' and write the SQL to answer it. It can read a schema you provide (a SQL file, documentation, or a written description of tables) so the query matches your actual table and column names, and it explains what the query does and how to check the results. The skill only shapes the agent's writing; it does not connect to your database or run queries itself.
Great for
- Product managers and analysts who need queries but do not write SQL often
- Engineers who want a first draft of a query across BigQuery, PostgreSQL, MySQL or Snowflake
- Students learning SQL who want a query explained step by step
Skip it if
- Running queries against live production databases unattended, because the skill only generates SQL text and the output still needs human review for correctness and cost
- Queries where exact results must be guaranteed for financial or compliance reporting without someone validating them against known figures
Try asking
- “Upload my database_schema.sql and write a query for users who signed up in the last 30 days with at least 5 sessions”
- “Write a BigQuery query showing revenue by region and customer tier with year-over-year growth”
- “Here are my Users and Sessions tables; give me average session duration per user for January”
Install in 3 steps
- 1
Download the skill
The ZIP contains the 1 original files, the MIT licence and an attribution note.
sql-queries.zip - 2
Add it to your agent
Claude Code (all projects)
mkdir -p ~/.claude/skills && unzip sql-queries.zip -d ~/.claude/skills/Claude Code / Agent SDK (this project only)
mkdir -p .claude/skills && unzip sql-queries.zip -d .claude/skills/Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.
- 3
Ask for the task
No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.
Get better results
- Share the schema (column names, types, keys) so the generated joins and filters are correct
- Name the exact SQL dialect and approximate data volume so the agent can suggest suitable indexes or partitioning
- Test generated queries on a small or staging dataset and compare results with a known figure before relying on them
What's inside
- SKILL.md
Redistributed unmodified from phuryn/pm-skills under the MIT licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.