# Write Script Bigquery

MUST use when writing BigQuery queries.

- Repository: https://github.com/windmill-labs/windmill (18352 stars)
- Category: Writing
- License: see repository
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add windmill-labs/windmill --skill write-script-bigquery -g -a claude-code -y`
Codex: `npx skills add windmill-labs/windmill --skill write-script-bigquery -g -a codex -y`
Cursor: `npx skills add windmill-labs/windmill --skill write-script-bigquery -g -a cursor -y`
Gemini CLI: `npx skills add windmill-labs/windmill --skill write-script-bigquery -g -a gemini-cli -y`

## Description

MUST use when writing BigQuery queries.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

## CLI Commands

Place scripts in a folder.

After writing, tell the user which command fits what they want to do:

- `wmill script preview <script_path>`, **default when iterating on a local script.** Runs the local file without deploying.
- `wmill script run <path>`, runs the script **already deployed** in the workspace. Use only when the user explicitly wants to test the deployed version, not local edits.
- `wmill generate-metadata`, regenerate the local `.script.yaml` (input schema) and `.lock` (resolved dependencies) for scripts you changed, and refresh their content hashes in `wmill-lock.yaml`. Local files only, **not** a deploy. See "Keep metadata in sync" below.
- Deploy local changes to the workspace, via `git push` or `wmill sync push` depending on how the repo is wired (see the **Deploying** section in `AGENTS.wmill.md`). Only suggest/run a deploy when the user explicitly asks to deploy/publish/push, not when they say "run", "try", or "test".

### Preview vs run, choose by intent, not habit

If the user says "run the script", "try it", "test it", "does it work" while there are **local edits to the script file**, use `script preview`. Do NOT push the script to then `script run` it, pushing is a deploy, and deploying just to test overwrites the workspace version with untested changes.

Only use `script run` when:
- The user explicitly says "run the deployed version" / "run what's on the server".
- There is no local script being edited (you're just invoking an existing script).

Only use `sync push` when:
- The user explicitly asks to deploy, publish, push, or ship.
- The preview has already validated the change and the user wants it in the workspace.

### Keep metadata in sync after editing

The rest: https://github.com/windmill-labs/windmill/blob/HEAD/system_prompts/auto-generated/skills/write-script-bigquery/SKILL.md
