write-script-snowflake_skill

This skill guides you to write Snowflake queries with parameter placeholders and clear comments for naming, improving reliability and readability.
  • HTML

15.8k

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill windmill-labs/windmill --skill write-script-snowflake

  • SKILL.md561 B

Overview

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.

How this skill works

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.

When to use it

  • When creating Snowflake-backed scripts that will be deployed as platform scripts or webhooks.
  • When you need safe, parameterized queries to avoid SQL injection and ensure predictable bindings.
  • When you plan to generate metadata and lock files for reproducible script deployments.
  • When converting ad-hoc queries into self-hostable automation or UI-driven endpoints.
  • When you need to discover available resources and schema types before writing queries.

Best practices

  • Always use ? placeholders for runtime values rather than interpolating strings.
  • Place parameter comment lines immediately before the SQL statement, for example: -- ? user_id (number) = 0
  • Declare types and sensible defaults in comments to produce accurate .script.yaml metadata.
  • Keep each script focused and idempotent so it can be safely retried or run in workflows.
  • Run wmill resource-type list --schema to inspect available resource types before coding.

Example use cases

  • A script that queries users by name and age with: -- ? name (text) and -- ? age (number) before the SELECT using ? placeholders.
  • Automating a daily report that runs a parameterized Snowflake query and posts results to a webhook.
  • Converting an analytics query into a reusable endpoint that UI components can call with typed inputs.
  • Packaging business logic into scripts, generating .script.yaml and .lock files with wmill script generate-metadata, then deploying with wmill sync push.

FAQ

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.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational
write-script-snowflake skill by windmill-labs/windmill | VeilStrat