write-script-powershell

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

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing PowerShell scripts that run correctly on the Windmill platform requires knowing its specific conventions, such as declaring arguments with a param block and returning objects as output. This Skill provides those conventions plus the correct wmill CLI commands for previewing, running, and deploying scripts without accidental deployments. ## Core Features & Use Cases - PowerShell Script Structure: Defines arguments via the param function on the first line, supports typed parameters like [string], [int], [bool], and [array], and returns hashtable objects as output. - CLI Command Guidance: Distinguishes between wmill script preview for local iteration, wmill script run for deployed scripts, wmill generate-metadata for .script.yaml and .lock files, and wmill sync push for explicit deployments. - Use Case: A developer asks for a PowerShell script that processes a list of servers. The Skill produces a script with a typed param block, then runs wmill script preview with sample arguments to validate it before any deployment. ## Quick Start Write a PowerShell script for Windmill that accepts a name and count parameter and returns a result 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?

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

How do I test a Windmill script locally without deploying?

Use wmill script preview <script_path> to run the local file without deploying it to the workspace. You can pass arguments with the -d flag, for example wmill script preview myscript.ps1 -d '{"Name": "test"}'.

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, so use it only when testing the deployed version.

Can I use typed parameters in Windmill PowerShell scripts?

Yes, PowerShell parameter types like [string], [int], [bool], and [array] are supported in the param block, for example param([string]$Name, [int]$Count = 0). Default values can also be assigned directly in the param declaration.

When should I run wmill sync push for a script?

Run wmill sync push only when you explicitly want to deploy local changes to the workspace. Pushing overwrites the workspace version, so validate changes with wmill script preview first and never push just to test a script.