write-script-mssql

Write and test Microsoft SQL Server scripts for Windmill workflows.

Updated May 28, 2026
One-click install
npx skills add https://github.com/kma-core/windmill --skill write-script-mssql-kma-core
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: write-script-mssql
Source: https://github.com/kma-core/windmill/tree/main/system_prompts/auto-generated/skills/write-script-mssql
Command: npx skills add https://github.com/kma-core/windmill --skill write-script-mssql-kma-core

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing and testing MS SQL Server scripts for Windmill requires knowing the correct parameter syntax, CLI commands, and deployment workflow, which this Skill provides so scripts run correctly the first time. ## Core Features & Use Cases - MSSQL Parameter Syntax: Declares named script arguments using @P1, @P2 placeholders with typed comments like -- @P1 name1 (varchar). - CLI Workflow Guidance: Distinguishes wmill script preview for local iteration from wmill script run for deployed scripts and wmill sync push for explicit deployment. - S3 Integration: Receives S3Object parameters decoded via OPENJSON and streams large query results 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 deploy it to the workspace only after validation. ## Quick Start Write a Windmill MSSQL script that selects users by name and 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 with parameters in Windmill?

Declare parameters with @P1, @P2 placeholders in the query and add typed comments before the statement, such as `-- @P1 name1 (varchar)` or `-- @P2 name2 (int) = 0` for defaults. Windmill maps these to script arguments automatically.

How do I test a Windmill script locally before deploying?

Use `wmill script preview <script_path>` to run the local file without deploying it to the workspace. Reserve `wmill script run` for scripts already deployed, and only use `wmill sync push` when you explicitly want to publish changes.

Can Windmill MSSQL scripts read files from S3?

Yes, declare an argument with type `(s3object)` and Windmill downloads the file and binds it as nvarchar(max) JSON text. Parquet and CSV files are decoded into JSON record arrays, which you consume with OPENJSON.

How do I export large MSSQL query results to S3 from 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 the result set directly to S3 and returns an S3Object instead of buffering rows.

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

`script preview` executes the local script file without deploying, making it the default for iterating on edits. `script run` executes the version already deployed in the workspace, so it ignores uncommitted local changes.