PowerShell Safe Invocation
Stops PowerShell scripts from breaking on quoted paths, Invoke-Expression, and Start-Process quirks.
Test report
- Verdict
- Tested · Works
- Score
- Tested
- Jul 13, 2026
- Environment
- Claude Code 2.x (agent harness)
- Upstream re-checked
- Aug 10, 2026 · 17f98fc
⚠ The author changed this skill after we tested it. The verdict below describes the version we ran on Jul 13, 2026; it's queued for a re-test.
Asked for a PowerShell wrapper around a converter.exe with a spaced/bracketed path: baseline defaulted to string-building + Invoke-Expression (exactly what the skill calls out as forbidden), the skill version used array splatting with & and explicit $LASTEXITCODE capture — a real quoting-bug class avoided.
Scored on four weighted criteria — install, triggering, output vs. baseline, docs. How scoring works
- Installs cleanly 5/5
- Triggers reliably 5/5
- Output vs. baseline 9/10
- Docs & honesty 4/5
What PowerShell Safe Invocation does
Covers safe invocation patterns for PowerShell on Windows: array-based argument passing instead of string-building, hashtable splatting with -LiteralPath, when to use Start-Process vs ProcessStartInfo, and version differences between PowerShell 5.1 and 7. Triggers when writing or debugging PowerShell that calls native programs, handles quoted/special-character paths, or needs shell troubleshooting.
How to install PowerShell Safe Invocation
git clone https://github.com/Misaka-Mikoto-Tech/agent-skills
cd agent-skills
mkdir -p ~/.claude/skills
cp -r skills/powershell-safe-invocation ~/.claude/skills/powershell-safe-invocation
Skills live in ~/.claude/skills/ (global) or .claude/skills/
(per-project). Restart Claude Code after installing.
Commands — how to trigger PowerShell Safe Invocation
-
/powershell-safe-invocationStops PowerShell scripts from breaking on quoted paths, Invoke-Expression, and Start-Process quirks.
It also activates on plain-language prompts like these:
-
Write a PowerShell script that calls an exe with a spaced file path -
My Start-Process -ArgumentList call isn't passing arguments correctly -
Help me safely invoke a native program from PowerShell without quoting bugs
Frequently asked questions
- Is the PowerShell Safe Invocation skill free?
- Yes. The skill itself is free from Misaka-Mikoto-Tech/agent-skills. SkillProof publishes the install command and an independent test verdict at no cost.
- Does PowerShell Safe Invocation work with Claude Code?
- We tested it with Claude Code 2.x (agent harness) on Jul 13, 2026. Verdict: Tested · Works. Asked for a PowerShell wrapper around a converter.exe with a spaced/bracketed path: baseline defaulted to string-building + Invoke-Expression (exactly what the skill calls out as forbidden), the skill version used array splatting with & and explicit $LASTEXITCODE capture — a real quoting-bug class avoided.
- What is the PowerShell Safe Invocation SkillProof Score?
- 9.2/10 — installs cleanly 5/5, triggers reliably 5/5, output vs. baseline 9/10, docs & honesty 4/5.
- How do I install PowerShell Safe Invocation?
- Copy the install command from this page, run it in your terminal, and restart Claude Code. Skills live in ~/.claude/skills/ (global) or .claude/skills/ inside a project.
- Can I use PowerShell Safe Invocation with Cursor, Copilot, Gemini CLI, Codex or other AI tools?
- The SKILL.md format is native to Claude (Claude Code, Desktop, claude.ai). The instructions inside adapt to other assistants: Cursor rules, GitHub Copilot instructions, Windsurf rules, Custom GPTs, AGENTS.md for OpenAI Codex, and GEMINI.md for Google Gemini CLI — our conversion guides cover each, and the free converter on the tools page does the wrapping for you.