PowerShell coding standards and quality enforcement for scripts and modules. Use when (1) writing or editing PowerShell scripts (.ps1, .psm1), (2) audit or review scripts for quality, (3) enforce Verb-Noun naming or parameter validation, (4) fix style issues like aliases or missing error handling, (5) add SupportsShouldProcess or WhatIf/Confirm to destructive functions, (6) improve logging and Write-Host/Write-Output usage, or (7) ensure comment-based help is present.
Installation
Mit Codex oder Claude installieren Kopieren Sie diesen Prompt, fügen Sie ihn in Codex, Claude oder einen anderen Assistant ein und lassen Sie die Skill-Seite prüfen und installieren.
PowerShell coding standards and quality enforcement for scripts and modules. Use when (1) writing or editing PowerShell scripts (.ps1, .psm1), (2) audit or review scripts for quality, (3) enforce Verb-Noun naming or parameter validation, (4) fix style issues like aliases or missing error handling, (5) add SupportsShouldProcess or WhatIf/Confirm to destructive functions, (6) improve logging and Write-Host/Write-Output usage, or (7) ensure comment-based help is present.
PowerShell Coding Standards & Quality Enforcer
Key Standards
Category
Rule
Naming
Verb-Noun functions (approved verbs); PascalCase; no aliases in scripts
Parameters
[Parameter(Mandatory)]; ValidateSet/ValidateNotNullOrEmpty; singular form
Safety
SupportsShouldProcess + -WhatIf/-Confirm on destructive actions
Errors
try/catch with Write-Error; throw for terminating errors
Logging
Write-Host without color params for logging; Write-Output only for ##vso pipeline variables
Pipeline
ValueFromPipeline; Begin/Process/End blocks; return objects not text
Documentation
Comment-based help (.SYNOPSIS, .DESCRIPTION, .EXAMPLE) on public functions
Style
Full cmdlet names; 4-space indent; no abbreviations