review-powershell

Identify language and runtime conformance issues in PowerShell code.

7|3|Updated Jan 23, 2026
One-click install
npx skills add https://github.com/nesnilnehc/ai-cortex --skill review-powershell
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: review-powershell
Source: https://github.com/nesnilnehc/ai-cortex/tree/main/skills/review-powershell
Command: npx skills add https://github.com/nesnilnehc/ai-cortex --skill review-powershell

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

PowerShell code often lacks consistent language conventions, robust parameter validation, and reliable error handling, leading to hard-to-maintain scripts and fragile pipelines.

Core Features & Use Cases

  • Evaluates advanced function and cmdlet conventions (CmdletBinding, Verb-Noun naming, Begin/Process/End blocks) and their consistency.
  • Checks parameter design, required/optional attributes, ValueFromPipeline, and common validation attributes for reliability and testability.
  • Reviews error handling and object pipeline behavior to ensure outputs are pipeline-friendly and deterministically recoverable.

Quick Start

Provide a language-convention review for the given PowerShell code and return findings in the standard format.

Frequently Asked Questions about review-powershell

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

FAQPage Schema
How do I audit PowerShell code for language conventions and parameter validation?

Auditing PowerShell code involves evaluating advanced function conventions like CmdletBinding and Verb-Noun naming. It checks parameter contracts, validation attributes, and Begin/Process/End blocks to ensure reliability, returning structured findings with severity and remediation suggestions.

What does a PowerShell pipeline review check for error handling and object behavior?

A PowerShell pipeline review checks error handling and object pipeline behavior to ensure outputs are pipeline-friendly and deterministically recoverable. It identifies runtime conformance issues that cause fragile scripts and unreliable data transmission between cmdlets.

Can I check cross-version compatibility for PowerShell scripts?

Yes, you can check cross-version compatibility for PowerShell scripts. The review identifies language and runtime conformance issues across versions, ensuring code maintains consistent behavior and avoids deprecated features or unsupported cmdlet calls in different environments.

What is the best way to review advanced PowerShell functions for parameter contracts?

The best way to review advanced PowerShell functions is to evaluate required and optional attributes alongside ValueFromPipeline declarations. This assesses parameter design for reliability and testability, identifying missing validation attributes that could lead to fragile script execution.

Why does my PowerShell script fail when passing objects through the pipeline?

PowerShell scripts fail during pipeline object passing due to poor error handling and non-pipeline-friendly outputs. Reviewing the code identifies runtime conformance issues in object pipeline behavior, ensuring outputs are deterministically recoverable and properly formatted for downstream cmdlets.