powershell-style-guide

Enforce PowerShell coding standards for scripts and modules.

1|Updated Apr 19, 2026
One-click install
npx skills add https://github.com/SandboxServers/github-copilot-agents --skill powershell-style-guide-sandboxservers
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: powershell-style-guide
Source: https://github.com/SandboxServers/github-copilot-agents/tree/main/skills/powershell-style-guide.skill
Command: npx skills add https://github.com/SandboxServers/github-copilot-agents --skill powershell-style-guide-sandboxservers

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

Ensures consistent coding practices in PowerShell scripts and modules, enhancing maintainability and readability for individual developers and teams.

Core Features & Use Cases

  • Enforces Naming Conventions: Standardizes variable, function, and parameter naming across the codebase.
  • Promotes Code Structure: Defines rules for functions, code blocks, and help documentation.
  • Enhances Error Handling and Logging: Provides guidance on error handling, logging, and idempotency in scripts.
  • Use Case: Establishing a shared set of standards within a team or project, making it easier for new team members to contribute and reducing errors.

Quick Start

Run the powershell-style-guide to enforce coding standards for your PowerShell scripts and modules.

Frequently Asked Questions about powershell-style-guide

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

FAQPage Schema
What are standard PowerShell naming conventions for scripts and modules?

Standard PowerShell naming conventions define consistent naming formats for variables, functions, and parameters across .ps1 and .psm1 files. Applying these rules standardizes your codebase, enhancing readability and maintainability for individual developers and teams.

How do I enforce coding standards for PowerShell scripts?

You enforce coding standards for PowerShell scripts by applying rules for code structure, error handling, and idempotency. This process reviews your .ps1 and .psm1 files against markdown documentation to ensure compliance with established security practices and structural guidelines.

Does this PowerShell style guide require any external dependencies?

No external dependencies are required to run this PowerShell style guide. It utilizes markdown documentation for guidance and operates directly on your scripts and modules without needing additional packages installed in your environment.

Can I use this to establish shared coding standards for a PowerShell team?

Yes, you can use this to establish shared coding standards for a PowerShell team. It enforces consistent practices regarding logging, security, and code structure, making it easier for new team members to contribute and reducing errors.

What is the best way to handle errors and logging in PowerShell modules?

The best way to handle errors and logging in PowerShell modules is to follow a standardized style guide. This ensures your scripts implement consistent error handling and logging practices, maintaining code quality and predictable execution.

Why do I need a style guide for PowerShell code structure?

You need a style guide for PowerShell code structure to enforce consistent rules for functions, code blocks, and help documentation. Maintaining this consistency enhances script readability and ensures secure, idempotent execution across your projects.