AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified Apache-2.0 Self-run

Bigquery Query Generation

skill-justvinhhere-bigquery-expert-bigquery-query-generation · by justvinhhere

>

No reviews yet
0 installs
31 views
0.0% view→install

Install

$ agentstack add skill-justvinhhere-bigquery-expert-bigquery-query-generation

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-justvinhhere-bigquery-expert-bigquery-query-generation)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
5mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Bigquery Query Generation? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

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 & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.