
Powershell Windows
If you've ever hit cryptic PowerShell errors about "unexpected token 'or'" or had emoji break your scripts, this will save you time. It's a reference for the syntax gotchas that trip people up: why you need double parentheses around cmdlets in logical operators, why Unicode characters cause failures, and how to handle nulls before accessing properties. Also covers JSON depth issues, error handling patterns, and a basic script template. Think of it as the condensed version of lessons learned from Windows automation work. You'll refer back to the operator syntax table and Unicode restrictions more than you'd expect.
- skills.sh installs
- 123
- GitHub stars
- 7.6K
- last updated
- Jun 3, 2026
Install
$ npx -y skills add vudovn/antigravity-kit --skill powershell-windows --agent claude-codeInstalls into .claude/skills of the current project.
Files
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 |
Sponsors
Details
- Repository
- github.com/vudovn/antigravity-kit
- First seen
- Jun 3, 2026
More from vudovn/antigravity-kit
All 30- I18n Localization122
- Parallel Agents122
- Plan Writing121
- Python Patterns119
- Red Team Tactics119
- Performance Profiling118
- Bash Linux116
- Behavioral Modes115
- Documentation Templates115
- Seo Fundamentals115
- Frontend Design320
- Code Review Checklist252
- Mobile Design239
- Webapp Testing212
- Clean Code197
- Systematic Debugging186
- Mcp Builder159
- Intelligent Routing157
- Architecture143
- Game Development141
- Database Design139
- Nodejs Best Practices138
- Testing Patterns138
- Brainstorming137