Prerequisites
The install command requiresnpx, which comes with Node.js 18+. Run node -v to check. If you see “command not found,” install Node.js from nodejs.org first.
The skill itself also requires the gcloud and bq CLIs and BigQuery read access to your SourceMedium project. See BigQuery Access Request Template if you need access.
Install
skills CLI installs into supported agent environments. If your agent does not support automatic install, copy the skill folder into that agent’s configured skills directory.
Update
If you already installed the skill, update before using the latest setup verification, discovery, and custom-data helpers:Quick Start (Copy/Paste)
What It Does
Setup verification — confirms gcloud/bq CLIs, authentication, active project, and table-level read access before writing any SQL. If something is broken, it surfaces the exact failing step and points to the access request template. Warehouse discovery — readssm_metadata.dim_data_dictionary to find which tables exist and have fresh data, and sm_metadata.dim_semantic_metric_catalog to resolve metric names, formulas, and 180+ pre-defined calculations. The agent discovers what’s available before writing SQL rather than guessing.
Safe SQL generation — all queries are SELECT-only, dry-run first, and cost-capped at 1 GB by default (most queries cost well under a dollar at standard BigQuery rates). No mutations, no unbounded scans.
SQL receipts — a SQL receipt is a bundled audit package: the exact SQL used, the pre-run byte estimate, the metric definition, timeframe, scope, and a verify command you can re-run yourself. Every answer includes one.
Hybrid data joins — can safely join your own BigQuery tables to SourceMedium data. The skill runs a cardinality check before any join to prevent silent metric inflation.
No fabrication — if access fails or a table is unavailable, returns the exact error and stops rather than inventing numbers.
Example Questions
After installing, ask your coding agent:After Installing
First thing to do
Ask the agent to verify your setup and discover what’s available:Custom or prefixed datasets
If your warehouse uses tenant-prefixed dataset names (common in shared projects), tell the agent:Joining your own tables
If you have your own BigQuery tables alongside SourceMedium data:Debugging
Inflated numbers (3× what you’d expect) Usually means an LTV table query is missing a required filter. Ask:SQL Receipt Format
Every answer from this skill includes:| Field | What it means |
|---|---|
| Answer | Plain-English conclusion |
| SQL | Copy/paste BigQuery Standard SQL |
| Notes | Metric definition, timeframe, scope, timezone, what was excluded |
| Verify | bq query --dry_run command to re-validate independently |
| Bytes scanned | Pre-run cost estimate; agent confirms before running if over the cap |
No Access Yet?
See BigQuery Access Request Template for the minimum IAM roles and a copy/paste message for your internal admin.Related
BigQuery Essentials
Setup and first-query fundamentals.
SQL Query Library
SourceMedium SQL templates and patterns.
Table Docs
Schema-level documentation for core tables.
Metric Catalog
180+ pre-defined metrics with calculations.
Data Dictionary
Table availability, freshness, and column stats.
Multi-Touch Attribution
MTA models and experimental tables.

