skills/clawhub.ai/PowerShell

PowerShell

Installation
SKILL.md

Output Behavior

  • Everything not captured goes to output — even without return or Write-Output
  • return doesn't stop output — previous uncaptured expressions still output
  • Write-Host bypasses pipeline — use for display only, not data
  • Assign to $null to suppress — $null = SomeFunction
  • [void] cast also suppresses — [void](SomeFunction)

Array Gotchas

  • Single item result is scalar, not array — @(Get-Item .) forces array
  • Empty result is $null, not empty array — check with if ($result) carefully
  • Array unrolling in pipeline — @(1,2,3) | ForEach sends items one by one
  • += on array creates new array — slow in loops, use [System.Collections.ArrayList]
  • , is array operator — ,$item wraps single item in array
Installs
3
First Seen
Aug 8, 2026
PowerShell from clawhub.ai