# SQL queries

> SQL queries is an open-source agent skill for databases. Generate SQL queries from natural language descriptions. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/phuryn/pm-skills/tree/main/pm-data-analytics/skills/sql-queries
- **Repository:** https://github.com/phuryn/pm-skills
- **GitHub stars:** 28,088
- **License:** MIT
- **Skill name:** sql-queries
- **Collection:** https://github.com/phuryn/pm-skills
- **Categories:** databases
- **Listing updated:** 2026-11-17

## About

Generate SQL queries from natural language descriptions. Supports BigQuery, PostgreSQL, MySQL, and other dialects. Reads database schemas from uploaded diagrams or documentation. Use when writing SQL, building data reports, exploring databases, or translating business questions into queries.

## When your agent uses it

> Generate SQL queries from natural language descriptions. Supports BigQuery, PostgreSQL, MySQL, and other dialects. Reads database schemas from uploaded diagrams or documentation. Use when writing SQL, building data reports, exploring databases, or translating business questions into queries.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/phuryn/pm-skills/tree/HEAD/pm-data-analytics/skills/sql-queries)
- [License: MIT](https://github.com/phuryn/pm-skills/tree/HEAD/pm-data-analytics/skills/sql-queries)

## Install

### Claude Code

This skill ships in the `pm-data-analytics` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add phuryn/pm-skills
/plugin install pm-data-analytics@pm-skills
```

Or copy only this skill to `~/.claude/skills/sql-queries`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/phuryn/pm-skills.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/sql-queries &&
cp -R "$tmp/pm-data-analytics/skills/sql-queries" ~/.claude/skills/sql-queries &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/sql-queries` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/sql-queries` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/phuryn/pm-skills.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/sql-queries &&
cp -R "$tmp/pm-data-analytics/skills/sql-queries" ~/.agents/skills/sql-queries &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/sql-queries` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/sql-queries` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/phuryn/pm-skills.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/sql-queries &&
cp -R "$tmp/pm-data-analytics/skills/sql-queries" ~/.cursor/skills/sql-queries &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/sql-queries` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/phuryn/pm-skills.git --path pm-data-analytics/skills/sql-queries
```

Or copy the folder to `~/.gemini/skills/sql-queries` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/sql-queries`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/phuryn/pm-skills.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/sql-queries &&
cp -R "$tmp/pm-data-analytics/skills/sql-queries" ~/.copilot/skills/sql-queries &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/sql-queries` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/phuryn/pm-skills.git
```

Then copy `pm-skills/pm-data-analytics/skills/sql-queries` into your agent's skills folder as `sql-queries`. Agents that support SKILL.md read one folder per skill.

## FAQ

### How do I install SQL queries in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/sql-queries to use it in all your projects, or to .claude/skills/sql-queries in one project. Or install the pm-data-analytics plugin, which includes it: /plugin marketplace add phuryn/pm-skills, then /plugin install pm-data-analytics@pm-skills.

### Does SQL queries run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use SQL queries?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to SQL queries?

The closest alternatives to SQL queries are Bigquery pipeline audit, SQL server table reconciliation, Postgresql optimization, Pinecone rag and Supabase rls policies.

## Alternatives

- [Bigquery pipeline audit](https://ai-powered.com/skills/bigquery-pipeline-audit): Bigquery pipeline audit is an open-source agent skill for databases.
- [SQL server table reconciliation](https://ai-powered.com/skills/sql-server-table-reconciliation): SQL server table reconciliation is an open-source agent skill for databases.
- [Postgresql optimization](https://ai-powered.com/skills/postgresql-optimization): Postgresql optimization is an open-source agent skill for databases.
- [Pinecone rag](https://ai-powered.com/skills/pinecone-rag): Pinecone rag is an open-source agent skill for knowledge and memory.
- [Supabase rls policies](https://ai-powered.com/skills/supabase-rls-policies): Supabase rls policies is an open-source agent skill for databases.
- [Snowflake semanticview](https://ai-powered.com/skills/snowflake-semanticview): Snowflake semanticview is an open-source agent skill for databases.
- [Creating oracle to postgres migration integration tests](https://ai-powered.com/skills/creating-oracle-to-postgres-migration-integration-tests): Creating oracle to postgres migration integration tests is an open-source agent skill for databases.
- [Migrating oracle to postgres data access code](https://ai-powered.com/skills/migrating-oracle-to-postgres-data-access-code): Migrating oracle to postgres data access code is an open-source agent skill for databases.

---
Source: https://ai-powered.com/skills/sql-queries
