SKILL

powershell-windows

PowerShell Windows patterns. Critical pitfalls, operator syntax, error handling.

Target: Target not categorized. Automatically collected · unverified.

Excerpt from the author’s documentation

Extracted from a fixed version of SKILL.md in its original language. This is the author’s documentation; installation, compatibility and runtime results have not been verified by this site.

Read the original English text

Topics in the source

  • PowerShell Windows Patterns
  • 1. Operator Syntax Rules
  • CRITICAL: Parentheses Required
  • 2. Unicode/Emoji Restriction
  • CRITICAL: No Unicode in Scripts
  • 3. Null Check Patterns
  • Always Check Before Access
  • 4. String Interpolation

Critical patterns and pitfalls for Windows PowerShell. -- | ❌ Wrong | ✅ Correct | |----------|-----------| | if (Test-Path "a" -or Test-Path "b") | if ((Test-Path "a") -or (Test-Path "b")) | | if (Get-Item $x -and $y -eq 5) | if ((Get-Item $x) -and ($y -eq 5)) | Rule: Each cmdlet call MUST be in parentheses when using logical operators. -- | Purpose | ❌ Don't Use | ✅ Use | |---------|-------------|--------| | Success | ✅ ✓ | [OK] [+] | | Error | ❌ ✗ 🔴 | [!] [X] | | Warning | ⚠️ 🟡 | [] [WARN] | | Info | ℹ️ 🔵 | [i] [INFO] | | Progress | ⏳ | [...] | Rule: Use ASCII characters only in PowerShell scripts. -- | ❌ Wrong | ✅ Correct | |----------|-----------| | $array.Count -gt 0 | $array -and $array.Count -gt 0 | | $text.Length | if ($text) { $text.Length } | -- | ❌ Wrong | ✅ Correct | |----------|-----------| | "Value: $($obj.prop.sub)" | Store in variable first | Pattern: -- | Value | Use | |-------|-----| | Stop | Development (fail fast) | | Continue | Production scripts | | SilentlyContinue | When errors expected | Don't return inside try block Use finally for cleanup Return after try/catch -- | Pattern | Use | |---------|-----| | Literal path | C:\Users\User\file.txt | | Variable

This is an excerpt. Refer to the complete source and its current requirements.

Source repository
davila7/claude-code-templates
Source file
cli-tool/components/skills/development/powershell-windows/SKILL.md
Fixed revision
21be197f100a12b8d0dd9a211cc244c8179f84d3
Read the complete original documentation ↗

Requirements

  • Only the author’s Skill metadata is included. Read the full instructions to check dependencies, licensing and conditions of use.

A small first task

先阅读原作者说明,再决定是否在自己的 AI 工具中使用。

Instructions for your AI tool

Author documentation is not live verification by this site. Without evidence, we do not mark a resource as compatible, safe or free.

Sources and evidence

This record was collected automatically. Its documentation, suitability and runtime behavior have not been manually verified.

Author: davila7/claude-code-templates · original repository metadata. Documentation review: Not reviewed. Last source check: 2026-11-09T14:01:44.621Z.

Categories are inferred from names, descriptions and paths. They do not establish compatibility.

License and attribution

MIT. Third-party content and copyright remain with their authors. Refer to the original license and terms.

Original license ↗

Synchronization, copying and user-reported success do not mark a resource as runtime-tested.

Limitations and notes

  • Collecting metadata does not mean this site has installed, adapted, runtime-tested or security-reviewed the resource.