К основному содержанию
скилл CX Codex

powershell-master — скилл для Claude Code: PowerShell 7+ и CI/CD

Скилл для работы со скриптами PowerShell: подсказывает синтаксис cmdlet, модули PSGallery, шаблоны CI/CD и безопасность. Пригодится, когда агент пишет .ps1 или правит пайплайн.

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add JosiahSiegel/claude-plugin-marketplace --skill powershell-master -a claude-code
Открыть на GitHub

Что делает powershell-master

Скилл включается сам, когда задача касается PowerShell: создание и разбор .ps1, поиск и установка модулей, автоматизация Azure, AWS и Microsoft 365, отладка и оптимизация скриптов. Платформы — Windows, Linux и macOS, так что один и тот же скрипт можно довести до рабочего состояния в трёх системах.

Внутри — карта справочников, которые агент подгружает по необходимости: кросс-платформенные шаблоны (определение ОС, кодировки, пути), работа с PSGallery и модулями Az, Microsoft.Graph, PnP и AWS Tools, сборка пайплайнов для GitHub Actions, Azure DevOps и Bitbucket, синтаксис и Pester-тесты, безопасность вроде JEA и Constrained Language Mode. Есть чек-лист перед запуском скрипта: проверка версии, try/catch, валидация параметров, отсутствие алиасов, Join-Path вместо склейки строк.

Одно правило стоит запомнить сразу: на Windows скилл требует обратных слэшей в путях файлов, поэтому D:/repos/project/file.tsx он считает ошибкой. Отдельно оговорено, что новые файлы документации без просьбы пользователя не создаются — правки идут в существующий README. Для проверки скриптов понадобятся Invoke-ScriptAnalyzer и Invoke-Pester.

Какие задачи решает

  • написать кросс-платформенный .ps1 с проверкой версии и обработкой ошибок
  • найти и поставить модуль из PSGallery
  • собрать шаг PowerShell в GitHub Actions или Azure DevOps
  • разобрать чужой скрипт и убрать алиасы
  • закрыть креды и включить Script Block Logging

Примеры запросов агенту

  • Напиши скрипт на PowerShell 7, который собирает отчёт по логам и работает на Windows и Linux
  • Проверь этот .ps1 через Invoke-ScriptAnalyzer и покажи, что чинить
  • Собери job в GitHub Actions, который запускает Pester-тесты на трёх платформах

Как установить powershell-master

1Через Skills CLI (Vercel)

npx skills add JosiahSiegel/claude-plugin-marketplace --skill powershell-master -a claude-code

2Вручную: положить файлы

~/.claude/skills/powershell-master/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/powershell-master/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о powershell-master

Как установить powershell-master в Claude?

Выполните npx skills add JosiahSiegel/claude-plugin-marketplace --skill powershell-master -a claude-code. После этого скилл окажется в ~/.claude/skills/powershell-master/SKILL.md.

Что делает powershell-master?

Даёт агенту справочники по PowerShell 7+, модулям Az, Microsoft.Graph, PnP и AWS Tools, шаблонам CI/CD и безопасности. Активируется сам при любой задаче со скриптами, модулями или cmdlet.

Нужен ли PowerShell 7 или хватит 5.1?

Скилл советует 7+ для кросс-платформенных задач и новых проектов. Windows PowerShell 5.1 остаётся вариантом, когда нужны модули только под Windows или жёсткие требования корпоративной среды.

Исходный текст

SKILL.md · MIT
---
name: powershell-master
description: |
  Complete PowerShell expertise system across ALL platforms (Windows/Linux/macOS).
  PROACTIVELY activate for: (1) ANY PowerShell task (scripts/modules/cmdlets), (2) CI/CD automation (GitHub Actions/Azure DevOps/Bitbucket), (3) Cross-platform scripting, (4) Module discovery and management (PSGallery), (5) Azure/AWS/Microsoft 365 automation, (6) Script debugging and optimization, (7) Best practices and security.
  Provides: PowerShell 7+ features, popular module expertise (Az, Microsoft.Graph, PnP, AWS Tools), PSGallery integration, platform-specific guidance, CI/CD pipeline patterns, cmdlet syntax mastery, and production-ready scripting patterns.
  Ensures professional-grade, cross-platform PowerShell automation following industry standards.
---

# PowerShell Master

## CRITICAL GUIDELINES

### Windows File Path Requirements

**MANDATORY: Always Use Backslashes on Windows for File Paths**

When using Edit or Write tools on Windows, you MUST use backslashes (`\`) in file paths, NOT forward slashes (`/`).

Examples:
- WRONG: `D:/repos/project/file.tsx`
- CORRECT: `D:\repos\project\file.tsx`

This applies to:
- Edit tool file_path parameter
- Write tool file_path parameter
- All file operations on Windows systems

### Documentation Guidelines

NEVER create new documentation files unless explicitly requested by the user.

- **Priority**: Update existing README.md files rather than creating new documentation
- **Repository cleanliness**: Keep repository root clean - only README.md unless user requests otherwise
- **Style**: Documentation should be concise, direct, and professional - avoid AI-generated tone
- **User preference**: Only create additional .md files when user specifically asks for documentation

---

Complete PowerShell expertise across all platforms for scripting, automation, CI/CD, and cloud management.

---

## When to Activate

PROACTIVELY activate for ANY PowerShell-related task:

- **PowerShell Scripts** - Creating, reviewing, optimizing any .ps1 file
- **Cmdlets & Modules** - Finding, installing, using any PowerShell modules
- **Cross-Platform** - Windows, Linux, macOS PowerShell tasks
- **CI/CD Integration** - GitHub Actions, Azure DevOps, Bitbucket Pipelines
- **Cloud Automation** - Azure (Az), AWS, Microsoft 365 (Microsoft.Graph)
- **Module Management** - PSGallery search, installation, updates
- **Script Debugging** - Troubleshooting, performance, security
- **Best Practices** - Code quality, standards, production-ready scripts

---

## Reference Map

Detailed material lives in `references/`. Load only what the current task needs.

| Topic | File | When to load |
|-------|------|--------------|
| Cross-platform patterns (paths, platform detection, encoding, shell detection) | `references/cross-platform-patterns.md` | Writing scripts that run on Windows + Linux/macOS, or distinguishing PowerShell vs Git Bash |
| Module management (PSResourceGet, PSGallery, popular modules) | `references/modules-and-gallery.md` | Installing/finding modules, Az 14.5.0, Microsoft.Graph 2.32.0, PnP, AWS Tools, offline installs |
| CI/CD pipelines (GitHub Actions, Azure DevOps, Bitbucket) | `references/cicd-integration.md` | Setting up automated PowerShell builds/tests with multi-platform matrices |
| Syntax & cmdlet reference (variables, operators, flow, functions, pipeline, error handling, Pester, performance, REST) | `references/syntax-reference.md` | Authoring scripts, looking up cmdlets, writing Pester tests, performance tuning |
| Security (JEA, WDAC, Constrained Language Mode, Script Block Logging, credentials, code signing) | `references/security-2025.md` | Production security hardening, credential management, audit logging |

---

## PowerShell Overview

### PowerShell Versions & Platforms

**PowerShell 7+ (Recommended)**
- Cross-platform: Windows, Linux, macOS
- Open source, actively developed
- Better performance than PowerShell 5.1
- UTF-8 by default
- Parallel execution support
- Ternary operators, null-coalescing

**Windows PowerShell 5.1 (Legacy)**
- Windows-only
- Ships with Windows
- UTF-16LE default encoding
- Required for some Windows-specific modules

**Installation Locations:**
- **Windows:** `C:\Program Files\PowerShell\7\` (PS7) or `C:\Windows\System32\WindowsPowerShell\v1.0\` (5.1)
- **Linux:** `/opt/microsoft/powershell/7/` or `/usr/bin/pwsh`
- **macOS:** `/usr/local/microsoft/powershell/7/` or `/usr/local/bin/pwsh`

---

## Core Workflow

1. **Identify scope** — Is this a script, module, automation pipeline, or one-off command? Note target platform(s).
2. **Check version & modules** — `$PSVersionTable.PSVersion`, `Get-Module -ListAvailable`. Confirm PowerShell 7+ unless legacy required.
3. **Load the relevant reference(s)** from the Reference Map above. Avoid loading material you do not need.
4. **Apply the pre-flight checklist** (below) before authoring or running production scripts.
5. **Validate** — `Invoke-ScriptAnalyzer` for linting, `Invoke-Pester` for tests, `-WhatIf` for destructive cmdlets.

---

## Pre-Flight Checklist for Scripts

Before running any PowerShell script, ensure:

1. **Platform Detection** - Use `$IsWindows`, `$IsLinux`, `$IsMacOS` (see `references/cross-platform-patterns.md`)
2. **Version Check** - `#Requires -Version 7.0` if needed
3. **Module Requirements** - `#Requires -Modules` specified
4. **Error Handling** - `try/catch` blocks in place
5. **Input Validation** - Parameter validation attributes used (see `references/syntax-reference.md`)
6. **No Aliases** - Full cmdlet names in scripts
7. **Path Handling** - Use `Join-Path` or `[IO.Path]::Combine()`
8. **Encoding Specified** - UTF-8 for cross-platform
9. **Credentials Secure** - Never hardcoded (see `references/security-2025.md`)
10. **Verbose Logging** - `Write-Verbose` for debugging

---

## Quick Decision Guide

**Use PowerShell 7+ when:**
- Cross-platform compatibility needed
- New projects or scripts
- Performance is important
- Modern language features desired

**Use Windows PowerShell 5.1 when:**
- Windows-specific modules required (WSUS, GroupPolicy legacy)
- Corporate environments with strict version requirements
- Legacy script compatibility needed

**Choose Azure CLI when:**
- Simple one-liners needed
- JSON output preferred
- Bash scripting integration

**Choose PowerShell Az module when:**
- Complex automation required
- Object manipulation needed
- PowerShell scripting expertise available
- Reusable scripts and modules needed

---

## Minimal Script Skeleton

```powershell
#Requires -Version 7.0

<#
.SYNOPSIS
    Brief description
.DESCRIPTION
    Detailed description
.PARAMETER Name
    Parameter description
.EXAMPLE
    PS> .\script.ps1 -Name "John"
#>

[CmdletBinding()]
param(
    [Parameter(Mandatory=$true)]
    [ValidateNotNullOrEmpty()]
    [string]$Name
)

$ErrorActionPreference = "Stop"
Set-StrictMode -Version Latest

try {
    Write-Verbose "Starting script"
    # ... main logic ...
    Write-Verbose "Script completed successfully"
}
catch {
    Write-Error "Script failed: $_"
    exit 1
}
finally {
    # Cleanup
}
```

Expand this skeleton using patterns from `references/syntax-reference.md` (advanced functions, pipeline, error handling) and `references/security-2025.md` (input validation, credential handling).

---

## Additional Resources

- PowerShell Docs: https://learn.microsoft.com/powershell
- PowerShell Gallery: https://www.powershellgallery.com
- Az Module Docs: https://learn.microsoft.com/powershell/azure
- Microsoft Graph Docs: https://learn.microsoft.com/graph/powershell

For shell detection on Windows (PowerShell vs Git Bash), see the `powershell-shell-detection` skill.

---

Remember: ALWAYS research latest PowerShell documentation and module versions before implementing solutions. The PowerShell ecosystem evolves rapidly, and best practices are updated frequently.

© JosiahSiegel · MIT · JosiahSiegel/claude-plugin-marketplace

Похожие скиллы

Всё по теме «DevOps и инфраструктура» →
powershell-7-expert VoltAgent Community Пишет кроссплатформенные сценарии PowerShell 7+ и автоматизирует инфраструктуру Azure, Entra и GitHub Actions. Помогает перевести старые скрипты на синтаксис .NET 6/7. 256установок azure-pipelines MicrosoftDocs Скилл с экспертизой по Azure Pipelines: разбор сбоев, YAML-шаблоны, агенты, service connections, секреты Key Vault и деплой в Kubernetes. CX Codex +1 430установок azure-devops devops-skills Скилл помогает агенту писать и править YAML-пайплайны Azure DevOps: сборка, тесты, деплой в Azure. Пригодится, если CI/CD живёт в Azure Pipelines. CX Codex +1 325установок windows-builder hashicorp Скилл для сборки Windows-образов в Packer через WinRM и PowerShell-провижены. Пригодится, когда нужны AMI, образы Azure или шаблоны VMware. CX Codex +1 2 700установок terraform-engineer https://github.com/Jeffallan Скилл для написания и управления инфраструктурой через Terraform. Помогает проектировать модули, настраивать удалённое состояние, валидировать код и применять изменения безопасно. CX Codex +1 5 400установок cloud-architect https://github.com/Jeffallan Скилл для проектирования облачных архитектур в AWS, Azure и GCP: схема с резервом, план миграции, расчёт стоимости и стратегия восстановления после сбоя. CX Codex +1 4 700установок

Из того же набора11

tailwindcss-advanced-layouts Набор готовых рецептов для Tailwind CSS v4. Помогает собирать сложные сетки на CSS Grid, Flexbox-раскладки и контейнерные запросы прямо в коде компонентов. CX Codex +1 8 100установок tailwindcss-animations Скилл по анимациям и переходам Tailwind CSS: встроенные утилиты, свои @keyframes, reduced-motion, Framer Motion. CX Codex +1 2 400установок tailwindcss-mobile-first Скилл для ИИ-агента, который подсказывает, как верстать адаптивные интерфейсы на Tailwind CSS v4 по принципу mobile-first. Пригодится, когда нужно разложить брейкпоинты, типографику и сетки по полочкам. CX Codex +1 2 100установок docker-best-practices Скилл по Docker: подсказывает, как писать Dockerfile, выбирать базовый образ и настраивать контейнеры для продакшена. CX Codex +1 938установок git-master Скилл по Git для ИИ-агентов: подсказывает команды, страхует опасные операции и разбирает конфликты. Пригодится, когда агент лезет в историю репозитория. CX Codex +1 787установок tailwindcss-advanced-design-systems Скилл для сборки дизайн-системы на Tailwind v4: токены в @theme, цветовые шкалы, типографика, тени и тёмная тема. CX Codex +1 655установок docker-security-guide Скилл для ИИ-агента, который проверяет Docker-конфигурации на уязвимости и подсказывает, как закрыть дыры. CX Codex +1 595установок tailwindcss-responsive-darkmode Скилл по Tailwind CSS: адаптивная вёрстка, тёмная тема, переключение на лету и защита от вспышки нестилизованного контента. CX Codex +1 476установок

Спонсоры проекта

Компании, которые помогают держать аналитику открытой