powershell-expert

Standardize PowerShell scripting practices with naming, formatting, and error handling rules.

Updated Feb 1, 2026
One-click install
npx skills add https://github.com/jralph/.config-opencode --skill powershell-expert
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: powershell-expert
Source: https://github.com/jralph/.config-opencode/tree/main/skills/powershell-expert
Command: npx skills add https://github.com/jralph/.config-opencode --skill powershell-expert

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill standardizes PowerShell scripting practices to improve reliability, readability, and maintainability across teams.

Core Features & Use Cases

  • Enforces consistent naming conventions, capitalization, and brace style to reduce confusion.
  • Provides templates for function structure, error handling patterns, and security considerations to accelerate safe module development.
  • Use Case: Teams migrating legacy PowerShell scripts to modules with CmdletBinding, parameter validation, and cross-platform compatibility.

Quick Start

Install or adopt this PowerShell best-practices guide in your repository, then refactor existing scripts to follow the Verb-Noun naming, 4-space indentation, and standardized error handling as described. Use the provided guidelines to convert functions to CmdletBinding blocks and update comments to maintain consistent documentation.

Frequently Asked Questions about powershell-expert

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

FAQPage Schema
How do I standardize PowerShell module development for team consistency?

Standardize PowerShell module development by enforcing CmdletBinding blocks, PascalCase naming conventions, and 4-space indentation. This approach provides consistent formatting, secure coding patterns, and clear documentation templates to improve readability and maintainability across team scripts.

What is the best way to refactor legacy PowerShell scripts into modules?

The best way to refactor legacy PowerShell scripts is converting functions to CmdletBinding blocks with parameter validation. Apply Verb-Noun naming, standardized error handling patterns, and update comments to maintain consistent documentation for cross-platform compatibility.

Why should I use CmdletBinding in my PowerShell scripts?

Use CmdletBinding in PowerShell scripts to enforce function structure consistency and enable advanced parameter validation. It provides reliable error handling patterns and supports secure coding practices essential for scalable, maintainable module development across teams.

Does PowerShell scripting best practice require specific brace style and indentation?

PowerShell scripting best practice requires consistent brace style and 4-space indentation to reduce confusion. Applying these formatting standards alongside PascalCase naming conventions provides improved readability and reliable script execution across collaborative environments.

Can I use these PowerShell style-guide rules for cross-platform compatibility?

Yes, these PowerShell style-guide rules apply to cross-platform compatibility. The guidelines provide secure coding patterns and standardized error handling that ensure reliable script execution across different operating systems and environments.