Powershell
PowerShell cmdlet and scripting best practices based on Microsoft guidelines. Use when writing or reviewing PowerShell scripts (.ps1, .psm1). Trigger on phrases like "write a PowerShell function", "review my script", "PowerShell best practices", "cmdlet design", "PS1 style".From its SKILL.md
npx -y skills add bmaltais/skills --skill powershellAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
1.9 KB, 344 tokens by cl100k_base, as published. Nobody here has run it
PowerShell Cmdlet Development
Write idiomatic, safe, and maintainable PowerShell aligned with Microsoft guidelines.
Routing Table
| Topic | Reference |
|---|---|
| Naming (verbs, params, variables, aliases) | references/naming.md |
| Parameter design (types, validation, switches) | references/parameters.md |
| Pipeline, output, and PassThru patterns | references/pipeline.md |
| Error handling, ShouldProcess, safety | references/errors.md |
| Style, documentation, and performance | references/style.md |
Key Rules (Always Apply)
- Verb-Noun format with approved verbs (
Get-Verb), PascalCase, singular nouns. [CmdletBinding()]on every function — enables common parameters.[switch]for boolean flags — never[bool], never assign defaults.- Exec form for CMD/ENTRYPOINT in containers, exec form analogy: always use full cmdlet names, never aliases in scripts.
- Non-interactive — no
Read-Host; accept all input via parameters. - Return objects — never formatted text. Use
[PSCustomObject]for structured data. SupportsShouldProcesson any function that modifies state.- Full names — no aliases (
Get-ChildItemnotgci,Where-Objectnot?). - Comment-based help (
.SYNOPSIS,.DESCRIPTION,.PARAMETER,.EXAMPLE) on public functions.
What ships with it: 5 files
11.9 KB alongside SKILL.md
references/
- errors.md3.6 KB
- naming.md1.3 KB
- parameters.md2.2 KB
- pipeline.md1.7 KB
- style.md3.1 KB