executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
WindowsWindows-specific patterns, security practices, and operational traps that cause silent failures.
Independent GitHub snapshot · Automated classification · Original documentation governs
name: Windows slug: windows version: 1.0.0 description: Windows-specific patterns, security practices, and operational traps that cause silent failures. homepage: https://clawic.com/skills/windows metadata: category: system skills:
# Store
cmdkey /generic:"MyService" /user:"admin" /pass:"secret"
# Retrieve in script
$cred = Get-StoredCredential -Target "MyService"
Get-Credential and export securely:
$cred | Export-Clixml -Path "cred.xml" # Encrypted to current user/machine
$cred = Import-Clixml -Path "cred.xml"
gpresult /r to see what's actually applied-ErrorAction SilentlyContinue hides problems — use Stop and handle explicitlymklink is CMD-only, PowerShell uses New-Item -ItemType SymbolicLink$cert = Get-ChildItem Cert:\CurrentUser\My -CodeSigningCert
Set-AuthenticodeSignature -FilePath script.ps1 -Certificate $cert
-WhatIf first on destructive operations — Remove-Item -Recurse -WhatIfStart-Transcript for audit trail — forgotten until incident investigationicacls for CLI, but inheritance rules are non-obvious — test changes on copy firstEnable-PSRemoting -Force isn't enough on workgroupsSet-Item WSMan:\localhost\Client\TrustedHosts -Value "server1,server2"New-EventLog -LogName Application -Source "MyScript" -ErrorAction SilentlyContinue
Write-EventLog -LogName Application -Source "MyScript" -EventId 1000 -Message "Started"
try { [IO.File]::OpenWrite($path).Close(); $true } catch { $false }
$env:TEMP fills silently — scripts should cleanup with try/finally:
$tmp = New-TemporaryFile
try { ... } finally { Remove-Item $tmp -Force }
$env:USERPROFILE points to system profile, not user's\\server\share