windmill-labs / write-script-powershell
Install for your project team
Run this command in your project directory to install the skill for your entire team:
mkdir -p .claude/skills/write-script-powershell && curl -L -o skill.zip "https://fastmcp.me/Skills/Download/2163" && unzip -o skill.zip -d .claude/skills/write-script-powershell && rm skill.zip
Project Skills
This skill will be saved in .claude/skills/write-script-powershell/ and checked into git. All team members will have access to it automatically.
Important: Please verify the skill by reviewing its instructions before using it.
MUST use when writing PowerShell scripts.
0 views
0 installs
Skill Content
---
name: write-script-powershell
description: MUST use when writing PowerShell scripts.
---
## CLI Commands
Place scripts in a folder. After writing, tell the user they can run:
- `wmill script generate-metadata` - Generate .script.yaml and .lock files
- `wmill sync push` - Deploy to Windmill
Do NOT run these commands yourself. Instead, inform the user that they should run them.
Use `wmill resource-type list --schema` to discover available resource types.
# PowerShell
## Structure
Arguments are obtained by calling the `param` function on the first line:
```powershell
param($Name, $Count = 0, [int]$Age)
# Your code here
Write-Output "Processing $Name, count: $Count, age: $Age"
# Return object
@{
name = $Name
count = $Count
age = $Age
}
```
## Parameter Types
You can specify types for parameters:
```powershell
param(
[string]$Name,
[int]$Count = 0,
[bool]$Enabled = $true,
[array]$Items
)
@{
name = $Name
count = $Count
enabled = $Enabled
items = $Items
}
```
## Return Values
Return values by outputting them at the end of the script:
```powershell
param($Input)
$result = @{
processed = $true
data = $Input
timestamp = Get-Date -Format "o"
}
$result
```