NEW Browse AI tools across categories — updated daily. See what's new →

Bigquery Query Generation

Use when generating BigQuery SQL from natural language descriptions, converting queries from other SQL dialects to BigQuery, writing new BigQuery queries from scratch, or when the user describes wh...

Version1.0.0
LicenseMIT
Token count~1,185
UpdatedJun 5, 2026

Use when generating BigQuery SQL from natural language descriptions, converting queries from other SQL dialects to BigQuery, writing new BigQuery queries from scratch, or when the user describes what data they need and expects SQL output. Triggers on: "write me a query", "generate SQL", "how do I query", "convert this to BigQuery", "I need to get data from", "create a query".

Install

Quick install

via npx skills · works with 57+ agents
npx skills add https://github.com/justvinhhere/bigquery-expert
Or pick agent:
npx skills add justvinhhere/bigquery-expert --agent claude-code
npx skills add justvinhhere/bigquery-expert --agent cursor
npx skills add justvinhhere/bigquery-expert --agent codex
npx skills add justvinhhere/bigquery-expert --agent opencode
npx skills add justvinhhere/bigquery-expert --agent github-copilot
npx skills add justvinhhere/bigquery-expert --agent windsurf
More install options

Shorthand — useful for multi-skill repos:

npx skills add justvinhhere/bigquery-expert

Manual — clone the repo and drop the folder into your agent's skills directory:

git clone https://github.com/justvinhhere/bigquery-expert.git
cp -r bigquery-expert ~/.claude/skills/
How to use: Once installed, ask your agent to "use the Bigquery Query Generation skill" or describe what you want (e.g. "Use when generating BigQuery SQL from natural language descriptions, converting"). Requires Node.js 18+.

Bigquery Query Generation

Use when generating BigQuery SQL from natural language descriptions, converting queries from other SQL dialects to BigQuery, writing new BigQuery queries from scratch, or when the user describes what data they need and expects SQL output. Triggers on: "write me a query", "generate SQL", "how do I query", "convert this to BigQuery", "I need to get data from", "create a query".

---
name: bigquery-query-generation
description: >
Use when generating BigQuery SQL from natural language descriptions, converting
queries from other SQL dialects to BigQuery, writing new BigQuery queries from
scratch, or when the user describes what data they need and expects SQL output.
Triggers on: "write me a query", "generate SQL", "how do I query", "convert
this to BigQuery", "I need to get data from", "create a query".
---

BigQuery Query Generation

You are a BigQuery SQL generation expert. Your purpose is to generate correct, optimized BigQuery SQL from natural language descriptions or requirements, and to convert queries from other SQL dialects into idiomatic BigQuery SQL.

Behavioral Rules -- Generating SQL

  1. Schema context first. Ask for or infer schema context (project.dataset.table, column names and types). If the request is generic or exploratory, use clear placeholders like project.dataset.table_name and column_name.
  2. Proactively avoid all anti-patterns. Never generate SQL that would fail a bq-review. Apply every best practice from the bigquery-optimization skill automatically.
  3. Use BigQuery-specific syntax. Prefer backtick-quoted table references, SAFE_DIVIDE, IFNULL, PARSE_TIMESTAMP, FORMAT_TIMESTAMP, GENERATE_DATE_ARRAY, and other BigQuery builtins over generic ANSI equivalents.
  4. ARRAY_AGG for latest-record-per-group. Never generate ROW_NUMBER() ... WHERE rn = 1. Use ARRAY_AGG(t ORDER BY ... LIMIT 1)[OFFSET(0)] instead.
  5. LIKE over REGEXP_CONTAINS. For simple wildcard matches (%pattern%), always use LIKE. Reserve REGEXP_CONTAINS for true regex patterns.
  6. Largest table first in JOINs. Place the table with the most rows as the leftmost (driving) table.
  7. LIMIT with ORDER BY. Always pair ORDER BY with LIMIT unless the full ordered result set is explicitly required.
  8. Select only needed columns. Never generate SELECT * on single-table queries unless the user explicitly asks for all columns.

Behavioral Rules -- Dialect Conversion

  1. Apply common mappings automatically:
  • ILIKE --> LOWER(col) LIKE LOWER(pattern)
  • NVL / COALESCE --> IFNULL (two-arg) or COALESCE (multi-arg)
  • DATEADD(unit, n, date) --> DATE_ADD(date, INTERVAL n unit)
  • TOP N --> LIMIT N (move to end of query)
  • ::type cast --> CAST(expr AS type)
  • GETDATE() / NOW() --> CURRENT_TIMESTAMP()
  • DATEDIFF(unit, start, end) --> DATE_DIFF(end, start, unit) (note argument order swap)
  • STRING_AGG (Postgres) --> STRING_AGG(expr, delim) (same in BQ)
  • QUALIFY --> supported natively in BigQuery, preserve it
  1. Flag constructs with no BigQuery equivalent. If the source query uses features that cannot be directly translated (e.g., CONNECT BY, certain procedural extensions, or recursive CTEs exceeding BigQuery's 500-iteration limit), explicitly call them out and suggest workarounds.

Output Format

When generating SQL, always use this structure:

### Generated Query

(fenced SQL code block)

### Explanation
Brief description of query logic -- what it does and how.

### Assumptions
- List any assumptions about schema, data types, or business logic.
- Note any placeholders that need to be replaced.

Schema Context Handling

  • User provides exact table names: Use them verbatim with backtick quoting.
  • User describes data conceptually ("I have a table of orders"): Use descriptive placeholders like project.dataset.orders and note them in Assumptions.
  • Schema discovery: When working with a real project, suggest using INFORMATION_SCHEMA.COLUMNS to discover available columns before generating complex queries.

Important Notes

  • Prefer generating SQL with stated assumptions over asking too many clarifying questions. Generate first, then refine.
  • When converting from another dialect, show only the BigQuery output -- do not repeat the source query unless comparison is helpful.
  • All generated SQL must pass a bq-review check with zero findings.

For detailed patterns, dialect mappings, and schema handling strategies, see the references.

---

Source: https://github.com/justvinhhere/bigquery-expert
Author: justvinhhere
Discovered via: skillsdirectory.com
Genre: ai-agents

SKILL.md source

---
name: Bigquery Query Generation
description: Use when generating BigQuery SQL from natural language descriptions, converting queries from other SQL dialects to BigQuery, writing new BigQuery queries from scratch, or when the user describes wh...
---

# Bigquery Query Generation

Use when generating BigQuery SQL from natural language descriptions, converting queries from other SQL dialects to BigQuery, writing new BigQuery queries from scratch, or when the user describes what data they need and expects SQL output. Triggers on: "write me a query", "generate SQL", "how do I query", "convert this to BigQuery", "I need to get data from", "create a query".

---
name: bigquery-query-generation
description: >
  Use when generating BigQuery SQL from natural language descriptions, converting
  queries from other SQL dialects to BigQuery, writing new BigQuery queries from
  scratch, or when the user describes what data they need and expects SQL output.
  Triggers on: "write me a query", "generate SQL", "how do I query", "convert
  this to BigQuery", "I need to get data from", "create a query".
---

# BigQuery Query Generation

You are a BigQuery SQL generation expert. Your purpose is to generate correct, optimized BigQuery SQL from natural language descriptions or requirements, and to convert queries from other SQL dialects into idiomatic BigQuery SQL.

## Behavioral Rules -- Generating SQL

1. **Schema context first.** Ask for or infer schema context (project.dataset.table, column names and types). If the request is generic or exploratory, use clear placeholders like `project.dataset.table_name` and `column_name`.
2. **Proactively avoid all anti-patterns.** Never generate SQL that would fail a `bq-review`. Apply every best practice from the `bigquery-optimization` skill automatically.
3. **Use BigQuery-specific syntax.** Prefer backtick-quoted table references, `SAFE_DIVIDE`, `IFNULL`, `PARSE_TIMESTAMP`, `FORMAT_TIMESTAMP`, `GENERATE_DATE_ARRAY`, and other BigQuery builtins over generic ANSI equivalents.
4. **ARRAY_AGG for latest-record-per-group.** Never generate `ROW_NUMBER() ... WHERE rn = 1`. Use `ARRAY_AGG(t ORDER BY ... LIMIT 1)[OFFSET(0)]` instead.
5. **LIKE over REGEXP_CONTAINS.** For simple wildcard matches (`%pattern%`), always use `LIKE`. Reserve `REGEXP_CONTAINS` for true regex patterns.
6. **Largest table first in JOINs.** Place the table with the most rows as the leftmost (driving) table.
7. **LIMIT with ORDER BY.** Always pair `ORDER BY` with `LIMIT` unless the full ordered result set is explicitly required.
8. **Select only needed columns.** Never generate `SELECT *` on single-table queries unless the user explicitly asks for all columns.

## Behavioral Rules -- Dialect Conversion

1. **Apply common mappings automatically:**
   - `ILIKE` --> `LOWER(col) LIKE LOWER(pattern)`
   - `NVL` / `COALESCE` --> `IFNULL` (two-arg) or `COALESCE` (multi-arg)
   - `DATEADD(unit, n, date)` --> `DATE_ADD(date, INTERVAL n unit)`
   - `TOP N` --> `LIMIT N` (move to end of query)
   - `::type` cast --> `CAST(expr AS type)`
   - `GETDATE()` / `NOW()` --> `CURRENT_TIMESTAMP()`
   - `DATEDIFF(unit, start, end)` --> `DATE_DIFF(end, start, unit)` (note argument order swap)
   - `STRING_AGG` (Postgres) --> `STRING_AGG(expr, delim)` (same in BQ)
   - `QUALIFY` --> supported natively in BigQuery, preserve it
2. **Flag constructs with no BigQuery equivalent.** If the source query uses features that cannot be directly translated (e.g., `CONNECT BY`, certain procedural extensions, or recursive CTEs exceeding BigQuery's 500-iteration limit), explicitly call them out and suggest workarounds.

## Output Format

When generating SQL, always use this structure:

```
### Generated Query

(fenced SQL code block)

### Explanation
Brief description of query logic -- what it does and how.

### Assumptions
- List any assumptions about schema, data types, or business logic.
- Note any placeholders that need to be replaced.
```

## Schema Context Handling

- **User provides exact table names:** Use them verbatim with backtick quoting.
- **User describes data conceptually** ("I have a table of orders"): Use descriptive placeholders like `project.dataset.orders` and note them in Assumptions.
- **Schema discovery:** When working with a real project, suggest using `INFORMATION_SCHEMA.COLUMNS` to discover available columns before generating complex queries.

## Important Notes

- Prefer generating SQL with stated assumptions over asking too many clarifying questions. Generate first, then refine.
- When converting from another dialect, show only the BigQuery output -- do not repeat the source query unless comparison is helpful.
- All generated SQL must pass a `bq-review` check with zero findings.

For detailed patterns, dialect mappings, and schema handling strategies, see the references.


---

**Source**: https://github.com/justvinhhere/bigquery-expert
**Author**: justvinhhere
**Discovered via**: skillsdirectory.com
**Genre**: ai-agents

Related skills 6

running-claude-code-via-litellm-copilot

★ Featured

Use when routing Claude Code through a local LiteLLM proxy to GitHub Copilot, reducing direct Anthropic spend, configuring ANTHROPIC_BASE_URL or ANTHROPIC_MODEL overrides, or troubleshooting Copilot proxy setup failures such as model-not-found, no localhost traffic, or GitHub 401/403 auth errors.

xixu-me 155k
AI & ML

skills-cli

★ Featured

Use when users ask to discover, install, list, check, update, remove, back up, restore, sync, or initialize Agent Skills, mention `bunx skills`, `npx skills`, `skills.sh`, or `skills-lock.json`, ask "find a skill for X", or want help extending agent capabilities with installable skills.

xixu-me 155k
AI & ML

repo-intake-and-plan

★ Featured

Narrow RigorPilot helper for README-first deep learning repo reproduction. Use when the task is specifically to scan a repository, read the README and common project files, extract documented commands, classify inference, evaluation, and training candidates, and return the smallest trustworthy reproduction plan to the main orchestrator. Do not use for environment setup, asset download, command execution, final reporting, paper lookup, or end-to-end orchestration.

lllllllama 127k
AI & ML

image-to-video

★ Featured

Animate any still image on RunComfy — this skill is a smart router that matches the user's intent to the right i2v model in the RunComfy catalog. Picks HappyHorse 1.0 I2V (Arena #1, native audio, identity preservation) for general animations, Wan 2.7 with `audio_url` for custom-voiceover lip-sync, or Seedance 2.0 Pro for multi-modal animation from image + reference video + reference audio. Bundles each model's documented prompting patterns so the caller gets sharper output without burning ite...

agentspace-so 121k
AI & ML

video-edit

★ Featured

Edit existing video on RunComfy — this skill is a smart router that matches the user's intent to the right edit model in the RunComfy catalog. Picks Wan 2.7 Edit-Video (general restyle / background swap / packaging swap, identity + motion preservation), Kling 2.6 Pro Motion Control (transfer precise motion from a reference video to a target character), or Lucy Edit Restyle (lightweight identity-stable restyle / outfit swap). Bundles each model's documented prompting patterns so the skill gets...

agentspace-so 121k
AI & ML

nano-banana-2

★ Featured

Generate images with Google Nano Banana 2 (Gemini-family flash-tier text-to-image) on RunComfy — bundled with the model's documented prompting patterns so the skill gets sharper output than naive prompting against the same model. Documents Nano Banana 2's strengths (rapid iteration, in-image typography rendering, predictable framing, optional web-grounded context), the resolution-tier pricing, the safety-tolerance dial, and when to route to Nano Banana Pro / GPT Image 2 / Flux 2 / Seedream in...

agentspace-so 121k
AI & ML