GitHub Copilot Claude Skill

powershell-review

Review PowerShell code against this repository's PowerShell standards and report findings by rule ID. Use when asked to review, validate, analyze, or check PowerShell code for quality or standards compliance.

LLM Mart · 0 points · 0 views 0 listing impressions 0 install-command copies
Download fadwen-ai-powershell-standards-.github_skills_powershell-review-fbf1a17.zip · 1 KB

Install

skills CLI npx skills add https://github.com/fadwen/ai-powershell-standards/tree/main/.github/skills/powershell-review
Claude Code claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install fadwen-ai-powershell-standards@llmmart
Git git clone https://github.com/fadwen/ai-powershell-standards.git

The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole fadwen/ai-powershell-standards collection as a plugin from our marketplace. Git is the plain clone.

Skill manifest

Review PowerShell code against the standards

Read the core rules (.github/copilot-instructions.md, or AGENTS.md if the repository has no such file) and the topic files they list for the kind of file under review, unless they are already loaded. Every rule has an ID such as ERR-10; cite it.

Steps

  1. Establish the target version from #requires lines and the module manifest. Judge the code against that version, not against the newest one.
  2. Run the tools first when you can: PSScriptAnalyzer, with -Settings ./PSScriptAnalyzerSettings.psd1 when that file exists, and the existing tests. Include what they report.
  3. Read the code for what tools cannot see, in this order:
    1. Correctness: logic errors, unhandled failure paths, wrong assumptions about a command's output.
    2. Error handling: the ERR rules, in particular throw in advanced functions, a missing -ErrorAction Stop inside try, and empty or silent catch blocks.
    3. Security: the SEC rules.
    4. Functions and output: the FUN rules.
    5. Version fit: the VER rules.
    6. Help and style: the DOC and STY rules.
  4. Confirm each finding before reporting it. Read the surrounding code, and where behaviour is in doubt, run a small test. Do not report a rule violation in code that the change did not touch, unless it is a defect.
  5. A comment of the form # Exception to ERR-11: reason records a decision of the project (DOC-22). Do not report the code under it as a finding of that rule. Do report the comment when its reason is missing or no longer matches the code. A comment that names a security rule (SEC) excuses nothing: report the finding, and the comment. Do not propose such a comment as the fix for a finding.

Report

List findings with the most serious first. For each one give the file and line, the rule ID or the word "defect", what is wrong, and the corrected code. Separate requirements (MUST) from recommendations (SHOULD). List the recorded exceptions with their reasons, apart from the findings. State what you ran and what you did not check. If nothing is wrong, say so; do not invent findings.

Files (ai-powershell-standards)
  • SKILL.md 2.3 KB
    ---
    name: powershell-review
    description: Review PowerShell code against this repository's PowerShell standards and report findings by rule ID. Use when asked to review, validate, analyze, or check PowerShell code for quality or standards compliance.
    ---
    
    # Review PowerShell code against the standards
    
    Read the core rules (`.github/copilot-instructions.md`, or `AGENTS.md` if the repository has no such
    file) and the topic files they list for the kind of file under review, unless they are already
    loaded. Every rule has an ID such as `ERR-10`; cite it.
    
    ## Steps
    
    1. Establish the target version from `#requires` lines and the module manifest. Judge the code
       against that version, not against the newest one.
    2. Run the tools first when you can: PSScriptAnalyzer, with `-Settings ./PSScriptAnalyzerSettings.psd1`
       when that file exists, and the existing tests. Include what they report.
    3. Read the code for what tools cannot see, in this order:
       1. Correctness: logic errors, unhandled failure paths, wrong assumptions about a command's output.
       2. Error handling: the ERR rules, in particular `throw` in advanced functions, a missing
          `-ErrorAction Stop` inside `try`, and empty or silent `catch` blocks.
       3. Security: the SEC rules.
       4. Functions and output: the FUN rules.
       5. Version fit: the VER rules.
       6. Help and style: the DOC and STY rules.
    4. Confirm each finding before reporting it. Read the surrounding code, and where behaviour is in
       doubt, run a small test. Do not report a rule violation in code that the change did not touch,
       unless it is a defect.
    5. A comment of the form `# Exception to ERR-11: reason` records a decision of the project (DOC-22).
       Do not report the code under it as a finding of that rule. Do report the comment when its reason
       is missing or no longer matches the code. A comment that names a security rule (SEC) excuses
       nothing: report the finding, and the comment. Do not propose such a comment as the fix for a
       finding.
    
    ## Report
    
    List findings with the most serious first. For each one give the file and line, the rule ID or the
    word "defect", what is wrong, and the corrected code. Separate requirements (MUST) from
    recommendations (SHOULD). List the recorded exceptions with their reasons, apart from the findings.
    State what you ran and what you did not check. If nothing is wrong, say so; do not invent findings.
    

Comments (0)

Sign in to join the conversation.

No comments yet.

Reviews (0)

No reviews yet.