home / skills / windmill-labs / windmill / write-script-snowflake
/system_prompts/auto-generated/skills/write-script-snowflake
This skill guides you to write Snowflake queries with parameter placeholders and clear comments for naming, improving reliability and readability.
npx playbooks add skill windmill-labs/windmill --skill write-script-snowflakeReview the files below or copy the command above to add this skill to your agents.
---
name: write-script-snowflake
description: MUST use when writing Snowflake queries.
---
## CLI Commands
Place scripts in a folder. After writing, run:
- `wmill script generate-metadata` - Generate .script.yaml and .lock files
- `wmill sync push` - Deploy to Windmill
Use `wmill resource-type list --schema` to discover available resource types.
# Snowflake
Arguments use `?` placeholders.
Name the parameters by adding comments before the statement:
```sql
-- ? name1 (text)
-- ? name2 (number) = 0
SELECT * FROM users WHERE name = ? AND age > ?;
```
This skill helps you write Snowflake queries that integrate reliably with the platform's script workflow. It enforces parameterized statements using ? placeholders and documents parameter names and types with inline comments. It also guides the developer flow for packaging and deploying scripts using the provided CLI commands.
You write SQL files with ? placeholders for runtime arguments and add a short comment line before the statement to name each parameter and declare its type and optional default. Place scripts in a folder, generate script metadata with the CLI, and push the package to the platform for execution. The skill checks for the correct comment format and common mistakes so queries are deployable as scripts, webhooks, or tasks.
How do I name parameters in a query?
Add a comment line immediately before the SQL with the format: -- ? name (type) = default. The parser uses these comments to map placeholders to names and types.
What placeholder syntax should I use for arguments?
Use ? placeholders in the SQL statement. Each ? will be bound in order to the parameters declared in the comment lines.
What CLI commands are required to deploy a script?
Place scripts in a folder, run wmill script generate-metadata to create metadata and lock files, then deploy with wmill sync push.