jpskill.com
🛠️ 開発・MCP コミュニティ

powershell-7-expert

LinuxやmacOSを含むクロスプラットフォーム環境で、PowerShell 7を用いた高度な自動化スクリプトを開発・実行するSkill。

📜 元の英語説明(参考)

Expert in modern, cross-platform PowerShell Core. Specializes in Linux/macOS automation, parallel processing, REST API integration, and modern scripting patterns. Use for cross-platform automation and modern PowerShell features. Triggers include "PowerShell 7", "PowerShell Core", "pwsh", "ForEach-Object -Parallel", "cross-platform PowerShell".

🇯🇵 日本人クリエイター向け解説

一言でいうと

LinuxやmacOSを含むクロスプラットフォーム環境で、PowerShell 7を用いた高度な自動化スクリプトを開発・実行するSkill。

※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o powershell-7-expert.zip https://jpskill.com/download/6713.zip && unzip -o powershell-7-expert.zip && rm powershell-7-expert.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/6713.zip -OutFile "$d\powershell-7-expert.zip"; Expand-Archive "$d\powershell-7-expert.zip" -DestinationPath $d -Force; ri "$d\powershell-7-expert.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して powershell-7-expert.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → powershell-7-expert フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-17
取得日時
2026-05-17
同梱ファイル
1

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

PowerShell 7 エキスパート

目的

クロスプラットフォームの自動化のために、最新の PowerShell 7+ (PowerShell Core) に関する専門知識を提供します。並列処理、REST API 統合、最新のスクリプトパターン、および新しい言語機能の活用を専門としています。

使用場面

  • クロスプラットフォームの自動化 (Windows、Linux、macOS)
  • ForEach-Object -Parallel を使用した並列処理
  • REST API 統合
  • 最新の PowerShell スクリプトパターン
  • パイプラインチェーン演算子 (&& ||)
  • 三項演算子と null 合体演算子
  • SSH ベースのリモート処理
  • JSON/YAML データ操作

クイックスタート

このスキルを呼び出すのは、以下の場合です。

  • クロスプラットフォームの PowerShell スクリプトを作成する場合
  • PowerShell 7+ 固有の機能を使用する場合
  • 並列処理を実装する場合
  • REST API 統合を構築する場合
  • 5.1 からスクリプトを最新化する場合

このスキルを呼び出さないのは、以下の場合です。

  • レガシーな Windows 専用システム → /powershell-5.1-expert を使用してください
  • GUI 開発 → /powershell-ui-architect を使用してください
  • セキュリティ設定 → /powershell-security-hardening を使用してください
  • モジュール設計 → /powershell-module-architect を使用してください

決定フレームワーク

PowerShell 7 Feature Selection?
├── Parallel Processing
│   ├── Simple iteration → ForEach-Object -Parallel
│   └── Complex workflows → Start-ThreadJob
├── API Integration
│   └── Invoke-RestMethod with modern options
├── Null Handling
│   ├── Default value → ?? operator
│   └── Conditional access → ?. operator
└── Pipeline Control
    └── && and || chain operators

コアワークフロー

1. 並列処理

  1. 並列化可能なワークロードを特定します
  2. ForEach-Object -Parallel を使用します
  3. -ThrottleLimit を適切に設定します
  4. スレッドセーフなデータアクセスを処理します
  5. 結果を集約します
  6. 並列実行からのエラーを処理します

2. REST API 統合

  1. リクエストパラメータを構築します
  2. 認証 (Bearer、OAuth) を処理します
  3. Invoke-RestMethod を使用します
  4. JSON レスポンスを解析します
  5. ページネーションを実装します
  6. 失敗時の再試行ロジックを追加します

3. クロスプラットフォームスクリプト

  1. Windows 固有のパスを避けます
  2. $PSVersionTable と $IsLinux/$IsWindows を使用します
  3. パス区切り文字を正しく処理します
  4. すべてのターゲットプラットフォームでテストします
  5. 互換性のあるモジュールを使用します
  6. プラットフォーム要件を文書化します

ベストプラクティス

  • 簡潔な条件式には三項演算子を使用します
  • デフォルト値には null 合体演算子を活用します
  • CPU バウンドなタスクには ForEach-Object -Parallel を使用します
  • クロスプラットフォームでは WinRM よりも SSH リモート処理を優先します
  • クロスプラットフォームのパスには Join-Path を使用します
  • すべてのターゲットオペレーティングシステムでテストします

アンチパターン

アンチパターン 問題点 正しいアプローチ
ハードコードされたバックスラッシュ Linux/macOS で動作しない Join-Path または /
Windows 専用のコマンドレット クロスプラットフォームで失敗する 利用可能性を確認する
過剰な並列化 スレッドのオーバーヘッド ThrottleLimit を調整する
$Error の無視 サイレントな失敗 適切なエラー処理
WinRM の前提 クロスプラットフォームではない SSH リモート処理
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

PowerShell 7 Expert

Purpose

Provides expertise in modern PowerShell 7+ (PowerShell Core) for cross-platform automation. Specializes in parallel processing, REST API integration, modern scripting patterns, and leveraging new language features.

When to Use

  • Cross-platform automation (Windows, Linux, macOS)
  • Parallel processing with ForEach-Object -Parallel
  • REST API integrations
  • Modern PowerShell scripting patterns
  • Pipeline chain operators (&& ||)
  • Ternary expressions and null coalescing
  • SSH-based remoting
  • JSON/YAML data manipulation

Quick Start

Invoke this skill when:

  • Writing cross-platform PowerShell scripts
  • Using PowerShell 7+ specific features
  • Implementing parallel processing
  • Building REST API integrations
  • Modernizing scripts from 5.1

Do NOT invoke when:

  • Legacy Windows-only systems → use /powershell-5.1-expert
  • GUI development → use /powershell-ui-architect
  • Security configuration → use /powershell-security-hardening
  • Module design → use /powershell-module-architect

Decision Framework

PowerShell 7 Feature Selection?
├── Parallel Processing
│   ├── Simple iteration → ForEach-Object -Parallel
│   └── Complex workflows → Start-ThreadJob
├── API Integration
│   └── Invoke-RestMethod with modern options
├── Null Handling
│   ├── Default value → ?? operator
│   └── Conditional access → ?. operator
└── Pipeline Control
    └── && and || chain operators

Core Workflows

1. Parallel Processing

  1. Identify parallelizable workload
  2. Use ForEach-Object -Parallel
  3. Set -ThrottleLimit appropriately
  4. Handle thread-safe data access
  5. Aggregate results
  6. Handle errors from parallel runs

2. REST API Integration

  1. Construct request parameters
  2. Handle authentication (Bearer, OAuth)
  3. Use Invoke-RestMethod
  4. Parse JSON response
  5. Implement pagination
  6. Add retry logic for failures

3. Cross-Platform Script

  1. Avoid Windows-specific paths
  2. Use $PSVersionTable and $IsLinux/$IsWindows
  3. Handle path separators correctly
  4. Test on all target platforms
  5. Use compatible modules
  6. Document platform requirements

Best Practices

  • Use ternary operator for concise conditionals
  • Leverage null-coalescing for defaults
  • Use ForEach-Object -Parallel for CPU-bound tasks
  • Prefer SSH remoting over WinRM for cross-platform
  • Use Join-Path for cross-platform paths
  • Test on all target operating systems

Anti-Patterns

Anti-Pattern Problem Correct Approach
Hardcoded backslashes Breaks on Linux/macOS Join-Path or /
Windows-only cmdlets Cross-platform failure Check availability
Over-parallelization Thread overhead Tune ThrottleLimit
Ignoring $Error Silent failures Proper error handling
Assuming WinRM Not cross-platform SSH remoting