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.
A skill your agent uses when writing or running PowerShell on Windows, especially native programs, quoted paths, escaping, pwsh, Start-Process, file operations, or shell troubleshooting.
$ npx skills add Misaka-Mikoto-Tech/agent-skills --skill powershell-safe-invocation -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install Misaka-Mikoto-Tech/agent-skills powershell-safe-invocation --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/Misaka-Mikoto-Tech/agent-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/powershell-safe-invocation .claude/skills/powershell-safe-invocation && rm -rf skills-srcUse ~/.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/
Install the "powershell-safe-invocation" agent skill from https://github.com/Misaka-Mikoto-Tech/agent-skills/tree/main/skills/powershell-safe-invocation into .claude/skills/powershell-safe-invocation/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "powershell-safe-invocation", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/Misaka-Mikoto-Tech/agent-skills/tree/main/skills/powershell-safe-invocationType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add Misaka-Mikoto-Tech/agent-skills --skill powershell-safe-invocation -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install Misaka-Mikoto-Tech/agent-skills powershell-safe-invocation --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Misaka-Mikoto-Tech/agent-skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/powershell-safe-invocation .agents/skills/powershell-safe-invocation && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "powershell-safe-invocation" agent skill from https://github.com/Misaka-Mikoto-Tech/agent-skills/tree/main/skills/powershell-safe-invocation into .agents/skills/powershell-safe-invocation/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "powershell-safe-invocation", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add Misaka-Mikoto-Tech/agent-skills --skill powershell-safe-invocation -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install Misaka-Mikoto-Tech/agent-skills powershell-safe-invocation --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Misaka-Mikoto-Tech/agent-skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/powershell-safe-invocation .cursor/skills/powershell-safe-invocation && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "powershell-safe-invocation" agent skill from https://github.com/Misaka-Mikoto-Tech/agent-skills/tree/main/skills/powershell-safe-invocation into .cursor/skills/powershell-safe-invocation/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "powershell-safe-invocation", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/Misaka-Mikoto-Tech/agent-skills.git --path skills/powershell-safe-invocation--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add Misaka-Mikoto-Tech/agent-skills --skill powershell-safe-invocation -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install Misaka-Mikoto-Tech/agent-skills powershell-safe-invocation --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Misaka-Mikoto-Tech/agent-skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/powershell-safe-invocation .gemini/skills/powershell-safe-invocation && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "powershell-safe-invocation" agent skill from https://github.com/Misaka-Mikoto-Tech/agent-skills/tree/main/skills/powershell-safe-invocation into .gemini/skills/powershell-safe-invocation/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "powershell-safe-invocation", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install Misaka-Mikoto-Tech/agent-skills powershell-safe-invocationInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add Misaka-Mikoto-Tech/agent-skills --skill powershell-safe-invocation -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/Misaka-Mikoto-Tech/agent-skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/powershell-safe-invocation .github/skills/powershell-safe-invocation && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "powershell-safe-invocation" agent skill from https://github.com/Misaka-Mikoto-Tech/agent-skills/tree/main/skills/powershell-safe-invocation into .github/skills/powershell-safe-invocation/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "powershell-safe-invocation", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add Misaka-Mikoto-Tech/agent-skills --skill powershell-safe-invocation -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install Misaka-Mikoto-Tech/agent-skills powershell-safe-invocation --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Misaka-Mikoto-Tech/agent-skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/powershell-safe-invocation .opencode/skills/powershell-safe-invocation && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "powershell-safe-invocation" agent skill from https://github.com/Misaka-Mikoto-Tech/agent-skills/tree/main/skills/powershell-safe-invocation into .opencode/skills/powershell-safe-invocation/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "powershell-safe-invocation", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
powershell-safe-invocationA skill your agent uses when writing or running PowerShell on Windows, especially native programs, quoted paths, escaping, pwsh, Start-Process, file operations, or shell troubleshooting.
Powershell Safe Invocation is an agent skill from Misaka-Mikoto-Tech/agent-skills. Use when writing or running PowerShell on Windows, especially native programs, quoted paths, escaping, pwsh, Start-Process, file operations, or shell troubleshooting.
Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file (for example `reference.md`).
It works with PowerShell. The repository describes itself as: Reusable AI agent skills for Codex, including a PowerShell skill for safe Windows command invocation and optional MCP utilities. The licence is MIT.
2 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 711abaf. It shows what the files ask for, not the result of running them.
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.
Shell commands in SKILL.md call:
pwshpythonFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Powershell Safe Invocation loads about 1.8k tokens when it runs. Until then it costs about 48 tokens; SKILL.md has 795 words of instructions outside code blocks.
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.
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.
The full file from Misaka-Mikoto-Tech/agent-skills at commit 711abaf, republished under its MIT licence (© Misaka-Mikoto-Tech). 795 words, ~1,836 tokens.
.claude/skills/powershell-safe-invocation/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.Use PowerShell 7 through pwsh.exe unless Windows PowerShell 5.1 is explicitly required.
When the active shell is uncertain, verify:
$PSVersionTable.PSVersion
$PSNativeCommandArgumentPassingDo not assume installing PowerShell 7 makes powershell.exe use PowerShell 7:
pwsh.exe = PowerShell 7powershell.exe = Windows PowerShell 5.1Never construct one large command string when arguments can be passed separately.
Use:
$exe = 'C:\Path With Spaces\tool.exe'
$argList = @(
'--input'
'C:\Data Folder\input.json'
'--flag'
)
& $exe @argList
$exitCode = $LASTEXITCODE
if ($exitCode -ne 0) {
throw "$exe failed with exit code $exitCode"
}Rules:
&.$LASTEXITCODE immediately.$args as your own argument array name; it is a PowerShell automatic variable. Use names like $argList or $nativeArgs.Invoke-Expression.cmd.exe /c layer merely to launch an executable.\" escaping in PowerShell.Use hashtable splatting for PowerShell cmdlets:
$params = @{
LiteralPath = 'C:\Data[1]\input.txt'
Destination = 'C:\Output'
Force = $true
ErrorAction = 'Stop'
}
Copy-Item @paramsUse -LiteralPath for concrete paths when the cmdlet supports it. For cmdlets that expose only -Path, such as New-Item, use -Path; when unsure, check Get-Command <cmdlet> -Syntax.
Do not use $LASTEXITCODE to test a PowerShell cmdlet. Use terminating errors:
$ErrorActionPreference = 'Stop'Wrap expressions passed as parameter values in parentheses or assign them first: use Select-Object -Index (100..120), not -Index 100..120.
Do not pipe directly from statement syntax such as foreach (...) { ... } | ...; assign the statement output first or use the pipeline cmdlet ForEach-Object.
Avoid deeply quoted commands such as:
cmd.exe /c pwsh.exe -Command "..."For multiline code, nested quotes, JSON, XML, regular expressions, pipelines, redirection, or non-ASCII paths:
.ps1 file.pwsh.exe -NoLogo -NoProfile -NonInteractive -File script.ps1Prefer -File over -Command for anything beyond a short, simple expression.
Do not add -ExecutionPolicy Bypass unless execution policy is actually blocking a trusted script.
When you must pass a script through -Command from an outer PowerShell process, remember that the outer shell expands $variables first. Use an outer single-quoted script string when the inner script contains $p, $env:..., $PSVersionTable, or similar:
pwsh.exe -NoLogo -NoProfile -Command '$p = "C:\Data Folder\input.txt"; Test-Path -LiteralPath $p'If the command has to cross multiple interpreters or wrappers, stop and write a .ps1 file instead of stacking more quoting.
python - <<'PY'; PowerShell parses < differently. Use a temporary script file or a PowerShell here-string piped to the program.ConvertTo-Json; do not hand-escape JSON.@', and close with '@ alone at the start of a line.PowerShell 7 defaults to UTF-8 without BOM for text output; Windows PowerShell 5.1 defaults vary by cmdlet.
utf8).Console.InputEncoding or Console.OutputEncoding by default. Set them only for a confirmed terminal or native-program encoding mismatch; $OutputEncoding instead controls PowerShell text sent to native programs.For normal foreground execution, use:
& $exe @argListUse Start-Process only for elevation, new/hidden windows, detached launch, or shell behavior.
Start-Process -ArgumentList joins values into a command-line string and is not a reliable structured-argument API. Prefer ProcessStartInfo.ArgumentList when exact argument boundaries matter.
When a separate process is required and arguments are complex, use:
$psi = [System.Diagnostics.ProcessStartInfo]::new()
$psi.FileName = $exe
$psi.UseShellExecute = $false
foreach ($arg in $argList) {
$psi.ArgumentList.Add($arg)
}
$process = [System.Diagnostics.Process]::Start($psi)
$process.WaitForExit()
if ($process.ExitCode -ne 0) {
throw "Process failed with exit code $($process.ExitCode)"
}Before recursive delete, move, or overwrite:
Mapped drives are per user/session. If Test-Path X:\... fails under an automation or sandbox account but works interactively, check the current identity with whoami and inspect Get-PSDrive. If the mapping is not visible, ask the user for the UNC path, establish the mapping for the same account, or switch the task to a current-user/full-access execution mode when the platform supports it.
PowerShell 5.1 and PowerShell 7 can expose the same command with different parameters or command types. Verify syntax in the active shell before relying on version-specific parameters:
$PSVersionTable.PSVersion
Get-Command Format-Hex -Syntax
Get-Command Get-FileHash -SyntaxFor example, Format-Hex -Count is available in PowerShell 7 but not in Windows PowerShell 5.1. In 5.1, use pipeline limiting instead:
Format-Hex -LiteralPath 'C:\Data\buffer.bin' | Select-Object -First 2If command discovery behaves strangely, inspect $env:PSModulePath and Get-Module -ListAvailable <ModuleName> before assuming the cmdlet is missing.
Choose the simplest safe option:
& $exe @argList..ps1 file with pwsh.exe -File.ProcessStartInfo.ArgumentList.Start-Process when its special behavior is required.cmd.exe /c only when cmd semantics are required.Invoke-Expression only as a tightly controlled last resort.For uncommon cases and complete examples, read reference.md.
© Misaka-Mikoto-Tech, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 1 other file in skills/powershell-safe-invocation of Misaka-Mikoto-Tech/agent-skills.
Open the folder on GitHubat commit 711abaf
We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in Misaka-Mikoto-Tech/agent-skills, which our catalogue first saw on October 7, 2026.
Powershell Safe Invocation 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Powershell Safe Invocation this skillMisaka-Mikoto-Tech/agent-skills | 275 | 1 repos | ~1.8k | Automated safety check: Pass | MIT | |
| Pester Failure AnalysisPowerShell/PowerShell | 56k | — | ~5.1k | Automated safety check: Pass | MIT | |
| Copilot Session Failure Analysisdotnet/maui | 23k | — | ~3.4k | Automated safety check: Pass | MIT | |
| Windows App SDK Issue Triage Reportmicrosoft/WindowsAppSDK | 4.7k | — | ~3.4k | Automated safety check: Pass | Apache-2.0 | |
| Evaluate PR Testsdotnet/maui | 23k | — | ~2.9k | Automated safety check: Pass | MIT | |
| Translation ReviewDevolutions/UniGetUI | 26k | — | ~1.3k | Automated safety check: Pass | MIT |
PowerShell/PowerShell
Investigates failing Pester tests in PowerShell CI jobs by following a six-step workflow from pull request status to documented fix recommendations.
dotnet/maui
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.
microsoft/WindowsAppSDK
Generates GitHub Feature Area Status reports for the Windows App SDK repository, scoring issues so teams can see what needs attention in each area.
dotnet/maui
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.
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…
Kuddev/pebrel
Control the live Pebrel terminal workspace from Codex or Claude Code.
Misaka-Mikoto-Tech/agent-skills
A skill your agent uses when an agent needs to inspect or control a real Unity Editor through Locus, especially when Unity MCP is unavailable, named-pipe discovery is needed, C must be executed, or…
Misaka-Mikoto-Tech/agent-skills
Get content from Bilibili videos: official subtitles, danmaku (density/peaks/sample), comments.
Works with
A skill your agent uses when writing or running PowerShell on Windows, especially native programs, quoted paths, escaping, pwsh, Start-Process, file operations, or shell troubleshooting. Powershell Safe Invocation is an agent skill from Misaka-Mikoto-Tech/agent-skills. Use when writing or running PowerShell on Windows, especially native programs, quoted paths, escaping, pwsh, Start-Process, file operations, or shell troubleshooting.
Powershell Safe Invocation fits situations like: running PowerShell on Windows; especially native programs; file operations; shell troubleshooting.
Run `npx skills add Misaka-Mikoto-Tech/agent-skills --skill powershell-safe-invocation -a claude-code`. Or copy the skill folder (skills/powershell-safe-invocation in Misaka-Mikoto-Tech/agent-skills) into .claude/skills/powershell-safe-invocation in your project. Claude Code loads it when a task matches its description.
Run `npx skills add Misaka-Mikoto-Tech/agent-skills --skill powershell-safe-invocation -a codex`. Or copy the skill folder (skills/powershell-safe-invocation in Misaka-Mikoto-Tech/agent-skills) into .agents/skills/powershell-safe-invocation in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Misaka-Mikoto-Tech/agent-skills --skill powershell-safe-invocation -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/powershell-safe-invocation, .gemini/skills/powershell-safe-invocation, .github/skills/powershell-safe-invocation and .opencode/skills/powershell-safe-invocation in your project.
Going by SKILL.md and its folder, Powershell Safe Invocation needs the command-line tools its instructions call (pwsh and python). Our summary lists: Python 3.
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.
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.
Powershell Safe Invocation is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.8k tokens (SKILL.md is roughly 7.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Powershell Safe Invocation: 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.
Misaka-Mikoto-Tech (a GitHub user) maintains it in Misaka-Mikoto-Tech/agent-skills, which has 275 GitHub stars. The repository holds 3 skills in this directory. The repository was last updated on September 21, 2026.
Source: Misaka-Mikoto-Tech/agent-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.