Agent skill · Testing & QA

pester-migration

Pester migration skill for upgrading PowerShell Pester test suites across major versions — v3→v4, v4→v5, and v5→v6. Covers the Discovery/Run two-phase model, moving setup into BeforeAll, $PSScriptRoot vs $MyInvocation, mock changes (Assert-MockCalled → Should -Invoke, removed fall-through), Invoke-Pester parameters → PesterConfiguration, data-driven -ForEach/-TestCases, and the v6 breaking changes. Use when the user asks to upgrade, migrate, or modernize Pester tests, fix *.Tests.ps1 files that broke after bumping the Pester version, or convert legacy Should / Invoke-Pester syntax.

GitHub68,948★ · +463/wk · 2 repos on radarProfile →
copilotMIT
Install
npx skills add github/awesome-copilot --skill pester-migration --agent copilot

Same command for any agent — swap --agent for claude-code, codex, cursor.

Facts
Files in the skill folder: 4
SKILL.md size: 8 KB
Bundled scripts: none
Path: skills/pester-migration/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 37,432 · +281 this week
Language: Python

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Pester Migration Pester is the test framework for PowerShell. Test files end in `*.Tests.ps1` and use `Describe` / `Context` / `It` blocks with `Should` assertions. This skill upgrades an existing suite from one major Pester version to the next and gets it green again. > **Mental model:** each major jump has a different character. **v3→v4** is mostly a syntax > rename. **v4→v5** is a *fundamental runtime change* (the Discovery/Run split) and is the hard > one. **v5→v6** is largely backwards-compatible — a handful of previously-deprecated things now > throw. Migrate **one major at a time**; never skip a version. Detailed, symptom-driven guides live in `references/` — load the one(s) for the jump you are doing. ## References | Reference | When to load | |---|---| | [v3-to-v4.md](references/v3-to-v4.md) | `Should Be` → `Should -Be`, `Contain` → `FileContentMatch`, `Assert-VerifiableMocks` → `Assert-VerifiableMock`, array-assertion edge cases. | | [v4-to-v5.md](references/v4-to-v5.md) | The big one. Discovery/Run phases, `BeforeAll` setup, `$PSScriptRoot`, `BeforeDiscovery`, `-ForEach`, mock scoping, `Should -Throw` wildcards, `Invoke-Pester` → `New-PesterConfiguration`. | | [v5-to-v

What's inside
Steps it walks through
  1. References
  2. Step 0 — Detect where you are and where you're going
  3. Migration workflow
  4. What actually changes (scope per jump)
  5. Quick cheat sheets
  6. v4 → v5 (most common fixes)
  7. v5 → v6 (most common fixes)
  8. Safety rules
Ships with 3 files
  • references/v3-to-v4.md
  • references/v4-to-v5.md
  • references/v5-to-v6.md
More from awesome-copilot
All skills →
About this skill
What does the pester-migration skill do?

Pester migration skill for upgrading PowerShell Pester test suites across major versions — v3→v4, v4→v5, and v5→v6. Covers the Discovery/Run two-phase model, moving setup into BeforeAll, $PSScriptRoot vs $MyInvocation, mock changes (Assert-MockCalled → Should -Invoke, removed fall-through), Invoke-Pester parameters → PesterConfiguration, data-driven -ForEach/-TestCases, and the v6 breaking changes. Use when the user asks to upgrade, migrate, or modernize Pester tests, fix *.Tests.ps1 files that broke after bumping the Pester version, or convert legacy Should / Invoke-Pester syntax.

How do I install it?

Run `npx skills add github/awesome-copilot --skill pester-migration --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From github/awesome-copilot, a repository with 37,432 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going