powershell-windows
PowerShell Windows patterns. Critical pitfalls, operator syntax, error handling.
npx skills add sickn33/agentic-awesome-skills --skill powershell-windows --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# PowerShell Windows Patterns > Critical patterns and pitfalls for Windows PowerShell. --- ## 1. Operator Syntax Rules ### CRITICAL: Parentheses Required | ❌ Wrong | ✅ Correct | |----------|-----------| | `if (Test-Path "a" -or Test-Path "b")` | `if ((Test-Path "a") -or (Test-Path "b"))` | | `if (Get-Item $x -and $y -eq 5)` | `if ((Get-Item $x) -and ($y -eq 5))` | **Rule:** Each cmdlet call MUST be in parentheses when using logical operators. --- ## 2. Unicode/Emoji Restriction ### CRITICAL: No Unicode in Scripts | Purpose | ❌ Don't Use | ✅ Use | |---------|-------------|--------| | Success | ✅ ✓ | [OK] [+] | | Error | ❌ ✗ 🔴 | [!] [X] | | Warning | ⚠️ 🟡 | [*] [WARN] | | Info | ℹ️ 🔵 | [i] [INFO] | | Progress | ⏳ | [...] | **Rule:** Use ASCII characters only in PowerShell scripts. --- ## 3. Null Check Patterns ### Always Check Before Access | ❌ Wrong | ✅ Correct | |----------|-----------| | `$array.Count -gt 0` | `$array -and $array.Count -gt 0` | | `$text.Length` | `if ($text) { $text.Length }` | --- ## 4. String Interpolation ### Complex Expressions | ❌ Wrong | ✅ Correct | |----------|-----------| | `"Value: $($obj.prop.sub)"` | Store in variable first | **Pattern:** ``` $value
- 1. Operator Syntax Rules
- CRITICAL: Parentheses Required
- 2. Unicode/Emoji Restriction
- CRITICAL: No Unicode in Scripts
- 3. Null Check Patterns
- Always Check Before Access
- 4. String Interpolation
- Complex Expressions
- 5. Error Handling
- ErrorActionPreference
- Try/Catch Pattern
- 6. File Paths
- Windows Path Rules
- 7. Array Operations
What does the powershell-windows skill do?
PowerShell Windows patterns. Critical pitfalls, operator syntax, error handling.
How do I install it?
Run `npx skills add sickn33/agentic-awesome-skills --skill powershell-windows --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From sickn33/agentic-awesome-skills, a repository with 44,414 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.