powershell-windows — Claude Code skill: what it does, how to install
Defines patterns for Windows PowerShell scripts, enforcing cmdlet parentheses, pure ASCII console output, and safe JSON parsing. Solves common syntax crashes.
npx claude-code-templates@latest --skill development/powershell-windowsWhat powershell-windows does
This skill guides Claude Code to write reliable PowerShell scripts tailored for Windows environments. It focuses on resolving interpreter syntax quirks. When combining cmdlet calls with -and or -or, each cmdlet must be wrapped in parentheses. If skipped, PowerShell halts parsing. Complex object properties must be stored in standalone variables before string interpolation, and every object requires a $null check before property access.
Emojis are banned across script outputs. Using them triggers unexpected token errors in standard Windows shells. The skill replaces them with clean ASCII indicators like [OK] or [WARN]. Scripts also follow a strict baseline: running Set-StrictMode, setting execution preferences, handling errors via try/catch without early returns, and constructing directories through Join-Path.
Calling ConvertTo-Json without the -Depth parameter silently truncates nested data structures. The assistant utilizes tools like Read, Write, Edit, Glob, Grep, and Bash to inspect and modify project scripts.
What it helps with
- Eliminate syntax errors caused by unparenthesized cmdlets in
-andor-orchecks - Prevent unexpected token crashes by replacing Unicode emojis with ASCII tags
- Preserve nested data when exporting objects with
ConvertTo-Json - Scaffold boilerplate scripts using
Set-StrictModeand structured error handling
Example prompts for the agent
- Write a PowerShell script that parses
settings.jsonand reports service health - Inspect
backup.ps1for null-reference issues and missing cmdlet parentheses - Generate a template script using
Join-Pathand try-catch exit codes
How to install powershell-windows
1claude-code-templates
npx claude-code-templates@latest --skill development/powershell-windows2Skills CLI (Vercel)
npx skills add davila7/claude-code-templates --skill powershell-windows -a claude-code3Manually: put the files in place
~/.claude/skills/powershell-windows/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/powershell-windows/
Manually: put the files in place
.agents/skills/powershell-windows/SKILL.mdFor all projects use ~/.agents/skills/
Manually: put the files in place
.cursor/skills/powershell-windows/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install davila7/claude-code-templates powershell-windows2Manually: put the files in place
.github/skills/powershell-windows/SKILL.mdPlatform CLI
gemini skills install https://github.com/davila7/claude-code-templates --path cli-tool/components/skills/development/powershell-windowsManually: put the files in place
.devin/skills/powershell-windows/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about powershell-windows
How do I install powershell-windows in Claude Code?
Run npx claude-code-templates@latest --skill development/powershell-windows in your terminal.
What does the powershell-windows skill do?
It directs Claude Code to follow safe PowerShell conventions, including parenthesized logical operators, ASCII-only log tags, and explicit JSON depth limits.
Why does powershell-windows forbid Unicode in scripts?
Standard Windows consoles frequently fail on emojis with an Unexpected token error. Using plain ASCII tags such as [OK] or [!] keeps scripts stable.