write-script-mssql

Writes Microsoft SQL Server scripts for Windmill with parameter binding and S3 integration.

1|Updated Aug 3, 2026
One-click install
npx skills add https://github.com/vpzed-dev/smithy --skill write-script-mssql-vpzed-dev
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: write-script-mssql
Source: https://github.com/vpzed-dev/smithy/tree/main/windmill/local-dev/.agents/skills/write-script-mssql
Command: npx skills add https://github.com/vpzed-dev/smithy --skill write-script-mssql-vpzed-dev

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing and testing MS SQL Server scripts in Windmill requires knowing the correct parameter syntax, preview workflow, and metadata regeneration steps, and mistakes like deploying untested code or leaving stale lock files cause spurious diffs and broken runs. ## Core Features & Use Cases - MSSQL Parameter Binding: Declares named script arguments using @P1, @P2 placeholders with typed comments such as -- @P1 name1 (varchar). - Preview vs Run Guidance: Distinguishes wmill script preview for local iteration from wmill script run for deployed versions, preventing accidental deploys of untested code. - S3 Integration: Receives S3Object parameters decoded via OPENJSON and streams large result sets to S3 with the -- s3 directive in JSON, Parquet, or CSV format. - Use Case: Write a query filtering users by name and age, preview it locally with sample arguments, then regenerate metadata so the lock file and input schema stay in sync. ## Quick Start Write a Windmill MSSQL script that selects users by name and minimum age, then preview it locally with sample arguments.

Frequently Asked Questions about write-script-mssql

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write an MSSQL script in Windmill?▼

Declare parameters with @P1, @P2 placeholders and name them using comments like `-- @P1 name1 (varchar)` before the statement. Test locally with `wmill script preview <script_path>` before deploying anything to the workspace.

What is the difference between wmill script preview and script run?▼

`wmill script preview` executes the local script file without deploying, making it the default for iterating on edits. `wmill script run` executes the version already deployed in the workspace and should only be used when explicitly testing the deployed version.

How do I pass an S3 file as a parameter to a Windmill SQL script?▼

Declare the argument with type `(s3object)`, for example `-- @P1 file (s3object)`. Windmill downloads the file and binds it as nvarchar(max) JSON text, which you consume with OPENJSON and a WITH clause defining the columns.

How do I stream large MSSQL query results to S3 in Windmill?▼

Add a `-- s3` directive at the top of the script with optional keys for prefix, storage, and format (json, parquet, or csv). Windmill streams rows directly to S3 and returns the resulting S3Object instead of buffering the result set.

Why does wmill-lock.yaml show diffs after editing a script?▼

Editing script content, especially imports or main's arguments, invalidates the stored content hash and leaves the lock and input schema stale. Run `wmill generate-metadata` to regenerate locks and refresh hashes so git-sync and CI stay clean.