Agent skill

Pwsh

by BiFangKNT in BiFangKNT/mtga

在 Windows PowerShell 5.1 与 PowerShell 7 中编写和执行稳定命令,重点处理引号、管道符、原生命令参数传递与跨版本兼容。遇到 --jq/过滤表达式被 PowerShell 误解析、同一命令在 pwsh5 与 pwsh7 行为不一致、或需要为 pwsh7.3+ 增加参数传递适配时使用此 skill。

AGPL-3.0Auto-check passed

Install Pwsh

skills CLI
$ npx skills add BiFangKNT/mtga --skill pwsh -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install BiFangKNT/mtga pwsh --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/BiFangKNT/mtga.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.codex/skills/pwsh .claude/skills/pwsh && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
pwsh
GitHub stars
1.2k
Token cost
~338 tokens
SKILL.md length
101 words
Files
5 (incl. references)
Skills in repo
6
Repo updated
First seen
Licence
AGPL-3.0

At a glance

在 Windows PowerShell 5.1 与 PowerShell 7 中编写和执行稳定命令,重点处理引号、管道符、原生命令参数传递与跨版本兼容。遇到 --jq/过滤表达式被 PowerShell 误解析、同一命令在 pwsh5 与 pwsh7 行为不一致、或需要为 pwsh7.3+ 增加参数传递适配时使用此 skill。

  • Works in 5 steps: 确认目标解释器:先读取… → 选兼容级别:默认按 pwsh5 语法生成;仅在确认 7.x 时使用 7 专属语法。 → 组装参数:优先用变量或数组传参,避免在命令行内堆叠转义。 → …
  • SKILL.md covers Overview, Workflow, Baseline Rules and pwsh7 Adaptation, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Pwsh is an agent skill from BiFangKNT/mtga. 在 Windows PowerShell 5.1 与 PowerShell 7 中编写和执行稳定命令,重点处理引号、管道符、原生命令参数传递与跨版本兼容。遇到 --jq/过滤表达式被 PowerShell 误解析、同一命令在 pwsh5 与 pwsh7 行为不一致、或需要为 pwsh7.3+ 增加参数传递适配时使用此 skill。

Its SKILL.md is about 340 tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files, including reference files (for example `agents/openai.yaml`, `references/pwsh5-baseline.md` and `references/pwsh7-adaptation.md`).

It works with PowerShell. The repository describes itself as: 基于本地代理的方式,绕过 IDE 的固定模型服务商限制. The licence is AGPL-3.0.

Example prompts

  • “/pwsh”

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. 确认目标解释器:先读取 $PSVersionTable.PSVersion,判断是 5.1 还是 7.x。
  2. 选兼容级别:默认按 pwsh5 语法生成;仅在确认 7.x 时使用 7 专属语法。
  3. 组装参数:优先用变量或数组传参,避免在命令行内堆叠转义。
  4. 处理原生命令:当参数被误解析时,先改写引号;必要时使用 --% 或 pwsh7 参数传递设置。
  5. 输出结果:明确命令、兼容前提、以及可能影响行为的版本差异。

What it can do on your machine

Read from SKILL.md and the folder at commit 72669fb. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Pwsh loads about 338 tokens when it runs, and up to ~1.2k if it reads all its reference files. Until then it costs about 43 tokens; SKILL.md has 101 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~43
When it runs · the whole SKILL.md, loaded when a task matches
~338
With references · SKILL.md plus every file in references/, read only if the agent opens them
~1.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from BiFangKNT/mtga at commit 72669fb, republished under its AGPL-3.0 licence (© BiFangKNT). 101 words, ~338 tokens.

Download SKILL.mdSave it as .claude/skills/pwsh/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
name
pwsh
description
在 Windows PowerShell 5.1 与 PowerShell 7 中编写和执行稳定命令,重点处理引号、管道符、原生命令参数传递与跨版本兼容。遇到 `--jq`/过滤表达式被 PowerShell 误解析、同一命令在 pwsh5 与 pwsh7 行为不一致、或需要为 pwsh7.3+ 增加参数传递适配时使用此 skill。

Pwsh

Overview

以“先兼容、后增强”为原则生成 PowerShell 命令。默认先满足 pwsh5 可运行,再按需启用 pwsh7 专属能力。

Workflow

  1. 确认目标解释器:先读取 $PSVersionTable.PSVersion,判断是 5.1 还是 7.x。
  2. 选兼容级别:默认按 pwsh5 语法生成;仅在确认 7.x 时使用 7 专属语法。
  3. 组装参数:优先用变量或数组传参,避免在命令行内堆叠转义。
  4. 处理原生命令:当参数被误解析时,先改写引号;必要时使用 --% 或 pwsh7 参数传递设置。
  5. 输出结果:明确命令、兼容前提、以及可能影响行为的版本差异。

Baseline Rules

  • 将 pwsh5 视为最低兼容基线。
  • 在 PowerShell 中向 --jq 或类似参数传入含 | 的表达式时,必须使用单引号字符串。
  • 需要变量拼接时,先构造变量再传参,不在命令行直接拼复杂引号。
  • 文件读写显式指定编码,避免依赖不同版本默认值。

pwsh7 Adaptation

  • 仅在确认 PowerShell 7.3+ 时考虑 $PSNativeCommandArgumentPassing 影响。
  • 旧脚本因参数传递行为变化失败时,按需临时切换 Legacy,任务完成后恢复原值。
  • 使用 pwsh7 专属语法(如 ??、||、&&、ForEach-Object -Parallel)前先做版本判断。

Failure Handling

  1. 出现 | 被吃掉:检查表达式是否被单引号包裹。
  2. 原生命令参数异常:先改为变量传参,再评估 --% 或 $PSNativeCommandArgumentPassing。
  3. 跨版本结果不同:回显版本号与关键变量值后,再给出兼容改写命令。

Output Format

  1. Plan: 要解决的 PowerShell 兼容问题。
  2. Commands: 可直接执行的命令(必要时分 5.1 与 7.x 两套)。
  3. Result: 关键输出与版本信息。
  4. Compat: 是否依赖 pwsh7 特性,及回退方案。

Reference

按需加载,不要一次性读取全部细节:

  • 通用兼容基线:references/pwsh5-baseline.md
  • --jq 与引号规则:references/quoting-jq.md
  • pwsh7 增量适配:references/pwsh7-adaptation.md

© BiFangKNT, AGPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 4 other files (references) in .codex/skills/pwsh of BiFangKNT/mtga.

  • SKILL.md
  • agents/openai.yaml
  • references/pwsh5-baseline.md
  • references/pwsh7-adaptation.md
  • references/quoting-jq.md

Open the folder on GitHubat commit 72669fb

Compare with similar skills

Pwsh next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Pwsh compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Pwsh this skillBiFangKNT/mtga1.2k—~338Automated safety check: PassAGPL-3.0
Pester Failure AnalysisPowerShell/PowerShell56k—~5.1kAutomated safety check: PassMIT
Copilot Session Failure Analysisdotnet/maui23k—~3.4kAutomated safety check: PassMIT
Windows App SDK Issue Triage Reportmicrosoft/WindowsAppSDK4.7k—~3.4kAutomated safety check: PassApache-2.0
Evaluate PR Testsdotnet/maui23k—~2.9kAutomated safety check: PassMIT
Translation ReviewDevolutions/UniGetUI26k—~1.3kAutomated safety check: PassMIT

Similar skills

  • Pester Failure Analysis

    PowerShell/PowerShell

    Investigates failing Pester tests in PowerShell CI jobs by following a six-step workflow from pull request status to documented fix recommendations.

    56k GitHub stars~5.1k tokensUpdated today
    Testing & QAAuto-check passed
  • Mines local Copilot CLI session logs for dotnet/maui to rank costly or failing runs, tag recurring failure modes, propose repo edits and emit guard evals.

    23k GitHub stars~3.4k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Official

    Generates GitHub Feature Area Status reports for the Windows App SDK repository, scoring issues so teams can see what needs attention in each area.

    4.7k GitHub stars~3.4k tokensUpdated today
    DevelopmentAuto-check passed
  • Official

    Reviews the tests added in a pull request for fix coverage, quality, edge cases and test type, and recommends lighter test types where they would do.

    23k GitHub stars~2.9k tokensUpdated today
    Testing & QAAuto-check passed
  • Translation Review

    Devolutions/UniGetUI

    Reviews UniGetUI .json language files for localization quality, detects parity issues, English-equal entries, wrong-script content, and cross-language outliers, then generates a dataset for…

    26k GitHub stars~1.3k tokensUpdated today
    Frontend & DesignAuto-check passed
  • Pebrel Runtime

    Kuddev/pebrel

    Control the live Pebrel terminal workspace from Codex or Claude Code.

    3.2k GitHub stars~3.5k tokensUpdated 2 days ago
    DevelopmentAuto-check passed

More from BiFangKNT/mtga

  • Ast Grep

    BiFangKNT/mtga

    Write and debug ast-grep rules for structural code search and rewrite.

    1.2k GitHub stars~802 tokensUpdated 3 mo ago
    Auto-check passed
  • Trae Native Debug

    BiFangKNT/mtga

    Maintain, debug, and recover MTGA's Trae native custom-model route.

    1.2k GitHub stars~920 tokensUpdated 3 mo ago
    Auto-check passed
  • Gh CLI

    BiFangKNT/mtga

    使用 GitHub CLI (gh) 执行非交互式 GitHub 协作与自动化任务(PR、Issue、Actions、Release、API 查询/修改)。当用户要求“用 gh 命令完成任务”、需要结构化 JSON 输出(--json/--jq)、批量处理 PR/Issue(如“批量 review 多个 PR”)、按策略合并(如“检查通过后自动 squash 合并”)时使用此 skill。

    1.2k GitHub stars~599 tokensUpdated 3 mo ago
    Auto-check passed
  • Tauri

    BiFangKNT/mtga

    构建、调试与发布 Tauri v2 应用的工程化工作流。覆盖项目初始化(create-tauri-app)、前端与 Rust 命令通信([tauri::command] + invoke)、状态管理、Capabilities 权限建模、插件接入、跨平台构建与问题排查。当用户需求涉及“创建 Tauri 项目”“把 Web 前端接到 Rust…

    1.2k GitHub stars~466 tokensUpdated 3 mo ago
    Auto-check passed
  • Uv

    BiFangKNT/mtga

    在 Windows/macOS/Linux 上使用 uv 执行 Python 运行、依赖同步、锁文件管理、Python 版本管理与工具命令(uv run、uv sync、uv lock、uv python、uv tool)。当任务涉及“用 uv 运行脚本/命令”“临时依赖(--with)”“锁文件一致性(--locked/--frozen)”“跨平台…

    1.2k GitHub stars~541 tokensUpdated 3 mo ago
    Auto-check passed

Works with

Questions about Pwsh

What does Pwsh do?

在 Windows PowerShell 5.1 与 PowerShell 7 中编写和执行稳定命令,重点处理引号、管道符、原生命令参数传递与跨版本兼容。遇到 --jq/过滤表达式被 PowerShell 误解析、同一命令在 pwsh5 与 pwsh7 行为不一致、或需要为 pwsh7.3+ 增加参数传递适配时使用此 skill。. Pwsh is an agent skill from BiFangKNT/mtga.

How do I install Pwsh in Claude Code?

Run `npx skills add BiFangKNT/mtga --skill pwsh -a claude-code`. Or copy the skill folder (.codex/skills/pwsh in BiFangKNT/mtga) into .claude/skills/pwsh in your project. Claude Code loads it when a task matches its description.

How do I install Pwsh in Codex?

Run `npx skills add BiFangKNT/mtga --skill pwsh -a codex`. Or copy the skill folder (.codex/skills/pwsh in BiFangKNT/mtga) into .agents/skills/pwsh in your project. Codex loads it when a task matches its description.

Can I use Pwsh in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add BiFangKNT/mtga --skill pwsh -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/pwsh, .gemini/skills/pwsh, .github/skills/pwsh and .opencode/skills/pwsh in your project.

What does Pwsh need to run?

SKILL.md names no scripts, command-line tools or credentials: Pwsh is instructions for the agent only.

Does Pwsh access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Pwsh safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Pwsh use?

Pwsh is published under the AGPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Pwsh use?

About 338 tokens (SKILL.md is roughly 1.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 854 tokens, read only when the agent opens those files.

What are the alternatives to Pwsh?

Skills that share tags, products or a category with Pwsh: Pester Failure Analysis (PowerShell/PowerShell, 56k stars), Copilot Session Failure Analysis (dotnet/maui, 23k stars), Windows App SDK Issue Triage Report (microsoft/WindowsAppSDK, 4.7k stars) and Evaluate PR Tests (dotnet/maui, 23k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Pwsh?

BiFangKNT (a GitHub user) maintains it in BiFangKNT/mtga, which has 1,170 GitHub stars. The repository holds 6 skills in this directory. The repository was last updated on June 18, 2026.

Source: BiFangKNT/mtga on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.