powershell-style-guide

Enforce PowerShell style, safety, and readability rules across codebases.

7|Updated Feb 14, 2026
One-click install
npx skills add https://github.com/KentoShimizu/sw-agent-skills --skill powershell-style-guide
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: powershell-style-guide
Source: https://github.com/KentoShimizu/sw-agent-skills/tree/main/skills/powershell-style-guide
Command: npx skills add https://github.com/KentoShimizu/sw-agent-skills --skill powershell-style-guide

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

PowerShell scripting often suffers from inconsistent style, missing error handling, and maintainability challenges across projects and CI pipelines. This skill defines and enforces PowerShell-specific style and quality standards to improve reliability and readability in local automation and CI workflows.

Core Features & Use Cases

  • Enforces strict error handling and parameter validation by default.
  • Promotes readable, safe scripting with consistent naming, structure, and inline documentation.
  • Use Case: when reviewing PowerShell modules or automation scripts, apply the style guide checks to ensure compliance before merge.

Quick Start

Run the PowerShell style checks on your repository and apply recommended fixes using the available scripts.

Frequently Asked Questions about powershell-style-guide

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enforce consistent PowerShell coding style and safety rules in my repository?

You can enforce PowerShell coding style by applying automated checks to your .ps1, .psm1, and .psd1 files to ensure consistent naming, structure, and secure coding patterns across your codebase.

How do I check PowerShell scripts for missing error handling and parameter validation?

To check PowerShell scripts for missing error handling, run style guide checks that identify non-compliant parameter validation and error handling patterns, allowing you to apply recommended fixes before merging.

Can I lint PowerShell code blocks in CI workflows that use shell: pwsh or shell: powershell?

Yes, you can lint PowerShell code in CI workflows by targeting workflow blocks configured with shell: pwsh or shell: powershell to enforce strict style and safety conformance in your automation pipelines.

What is the best way to autofix PowerShell readability and security issues in development workflows?

The best way to autofix PowerShell readability issues is to leverage available scripts that perform deterministic checks and apply style conformance fixes directly within your development workflows.

Does PowerShell style enforcement require any external dependencies or modules to run?

No external dependencies are required to run PowerShell style enforcement, as the skill operates independently to perform deterministic checks, autofixes, and style conformance on your script files.