commit 2b058653385e6eccba8e32e7c0c2d60f22a549cd equwal <13551856+equwal@users.noreply.github.com> 2026-10-04 04:06:10 -0700 import: claude skills/powershell/SKILL.md from pc
skills/powershell/SKILL.md | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/skills/powershell/SKILL.md b/skills/powershell/SKILL.md index 8d4b70c..b35ffdd 100644 --- a/skills/powershell/SKILL.md +++ b/skills/powershell/SKILL.md @@ -64,6 +64,11 @@ metadata: - `Get-Content` returns lines array — `-Raw` for single string - `Select-Object` creates new object — properties are copies, not references +## Claude Code PowerShell tool: delete guard +- The tool scans the command text. It blocks the call when the text has a delete word (`rm`, `rmdir`, `Remove-Item`) and a token that looks like a top-level path (`/`, `/home`, `/1KB`). The error is `Remove-Item on system path '<token>' is blocked`. +- The guard also reads inside a single-quoted `ssh` string, and it reads a division such as `$sum/1KB` as a path. +- Put each delete in its own call, with the full exact path. Keep `cd /`, `df -h /home`, and `/` arithmetic out of that call. + ## Cross-Platform - `pwsh` is PowerShell 7+ — `powershell` is Windows PowerShell 5.1 - Paths use `/` or `\` — `Join-Path` for portable