write-script-powershell

Writes Windmill PowerShell scripts with param blocks, typed parameters, and CLI preview workflows.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing PowerShell scripts for the Windmill platform requires knowing the correct param block structure, return conventions, and which wmill CLI command to run for testing versus deploying. This Skill encodes those conventions so scripts are structured correctly and tested without accidentally deploying untested code. ## Core Features & Use Cases - Correct script structure: Enforces the param(...) first-line convention, typed parameters, and hashtable return values that Windmill expects. - Preview vs run discipline: Distinguishes wmill script preview (test local edits) from wmill script run (deployed version) and wmill sync push (explicit deploy only), preventing accidental overwrites of workspace scripts. - Metadata synchronization: Runs wmill generate-metadata after edits that change imports or main arguments so .lock, .script.yaml, and wmill-lock.yaml hashes stay consistent. - Use Case: You ask for a PowerShell script that processes a list of servers. The Skill writes the script with a typed param block, then offers to run wmill script preview with sample arguments and regenerates metadata before any deploy. ## Quick Start Write a Windmill PowerShell script that takes a name and count parameter and returns a summary object, then preview it locally.

Frequently Asked Questions about write-script-powershell

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

FAQPage Schema
How do I write a PowerShell script for Windmill?▼

Start the script with a param block on the first line, such as param($Name, [int]$Count = 0), then write your logic and output a hashtable as the return value. Windmill maps the param arguments to the script's input schema automatically.

How do I test a Windmill script locally without deploying?▼

Use wmill script preview <script_path> to run the local file with sample arguments without deploying anything. Use wmill script run only when you explicitly want to execute the version already deployed in the workspace.

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

wmill script preview executes your local script file, including uncommitted edits, without deploying. wmill script run executes the version already deployed in the workspace, so it ignores local changes.

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

Editing script content, especially adding imports or changing main arguments, invalidates the stored content hash. Run wmill generate-metadata to regenerate the .lock, .script.yaml schema, and hash entries so they match the code again.

Can PowerShell scripts in Windmill use typed parameters?▼

Yes, you can annotate parameters with types like [string], [int], [bool], and [array] inside the param block, along with default values. Windmill uses these declarations to build the script's input form.