dbt-debugging
Load when dbt run or dbt parse fails. Covers YML duplicate patches, ref errors, passthrough model warnings, current_date fixes,…
BigQuery-specific SQL patterns: UNNEST for array expansion, STRUCT, ARRAY_AGG, DATE_DIFF/DATE_ADD, backtick-quoted table references, EXCEPT/REPLACE in SELECT, approximate aggregation, partitioned and wildcard tables.
Claude Code
$ npx -y skills add signalpilot-labs/signalpilot --skill bigquery-sql --agent claude-code
Codex
$ npx skills add signalpilot-labs/signalpilot --skill bigquery-sql -a codex -y
Cursor
$ npx skills add signalpilot-labs/signalpilot --skill bigquery-sql -a cursor -y
Gemini CLI
$ npx skills add signalpilot-labs/signalpilot --skill bigquery-sql -a gemini-cli -y
GitHub Copilot
$ npx skills add signalpilot-labs/signalpilot --skill bigquery-sql -a github-copilot -y
OpenCode
$ npx skills add signalpilot-labs/signalpilot --skill bigquery-sql -a opencode -y
Windsurf
$ npx skills add signalpilot-labs/signalpilot --skill bigquery-sql -a windsurf -y
name: bigquery-sql description: "BigQuery-specific SQL patterns: UNNEST for array expansion, STRUCT, ARRAY_AGG, DATE_DIFF/DATE_ADD, backtick-quoted table references, EXCEPT/REPLACE in SELECT, approximate aggregation, partitioned and wildcard tables." type: skill
-- Full table reference SELECT * FROM `project.dataset.table`; -- Can omit project if using the default project SELECT * FROM `dataset.table`;
-- Explode an array column to rows SELECT id, item FROM `project.dataset.table`, UNNEST(array_col) AS item; -- UNNEST with offset (position) SELECT id, item, pos FROM `project.dataset.table`, UNNEST(array_col) AS item WITH OFFSET AS pos; -- UNNEST a literal array SELECT * FROM UNNEST([1, 2, 3]) AS num;
-- Add/subtract time DATE_ADD(order_date, INTERVAL 7 DAY) DATE_ADD(CURRENT_DATE(), INTERVAL -1 MONTH) -- Difference between dates DATE_DIFF(end_date, start_date, DAY) DATE_DIFF(end_date, start_date, MONTH) -- Truncate to period DATE_TRUNC(event_date, MONTH) TIMESTAMP_TRUNC(event_ts, HOUR) -- Current date/time CURRENT_DATE() CURRENT_TIMESTAMP()
-- All columns except one SELECT * EXCEPT (col_to_remove) FROM `dataset.table`; -- Replace a column value inline SELECT * REPLACE (UPPER(name) AS name) FROM `dataset.table`;
-- Create a STRUCT SELECT STRUCT(id, name) AS person FROM `dataset.table`; -- Aggregate rows into an array SELECT department, ARRAY_AGG(employee_name) AS employees FROM `dataset.employees` GROUP BY department; -- Aggregate into array of structs SELECT ARRAY_AGG(STRUCT(id, name)) AS records FROM `dataset.table`;
-- Approximate distinct count (faster for large tables) APPROX_COUNT_DISTINCT(user_id) -- Approximate quantiles APPROX_QUANTILES(value, 100)[OFFSET(50)] -- median
When querying partitioned tables, always filter on the partition column to avoid full-table scans:
-- Partition on _PARTITIONDATE (pseudo-column) WHERE _PARTITIONDATE >= '2024-01-01' -- Partition on a date column WHERE event_date BETWEEN '2024-01-01' AND '2024-12-31'
-- Query all date-sharded tables matching a prefix SELECT * FROM `project.dataset.events_*` WHERE _TABLE_SUFFIX BETWEEN '20240101' AND '20241231';
REGEXP_EXTRACT(col, r'pattern') -- extract first match
REGEXP_REPLACE(col, r'pattern', 'repl') -- replace matches
SPLIT(col, ',')[SAFE_OFFSET(0)] -- split, access by index
TRIM(col) / LTRIM(col) / RTRIM(col)
FORMAT('%s-%d', str_col, int_col) -- printf-style formattingTo filter for Python 2 specific questions (excluding Python 3):
WHERE REGEXP_CONTAINS(tags, r'python-2') AND NOT REGEXP_CONTAINS(tags, r'python-3')
Load when dbt run or dbt parse fails. Covers YML duplicate patches, ref errors, passthrough model warnings, current_date fixes,…
Populate the knowledge base from dbt project research. Proposes entries across all 6 categories at org, project, and connection…
Load when task involves dbt snapshots, SCD Type 2, or tracking data changes over time. Covers strategy selection, column casing,…
Load when task involves adding, writing, or fixing dbt unit tests. Covers unit_tests YAML format, given/expect blocks, edge-case…
Load when task involves dbt model versioning, creating v2 of a model, or backward-compatible model changes. Covers versions YAML…
Load at Step 1 before exploring the project. Covers output shape inference, incremental model handling, and what to trust in YML.
Use this skill to extract structured Markdown/JSON from PDFs and document images—tables with cell-level precision, formulas as…
Estimates intracellular metabolic fluxes from steady-state carbon-13 isotope-tracing measurements using validated atom maps,…