Agent skill · software engineering · github
pester-should-migration
Experimental (preview) Pester skill for migrating classic Should -Be (v5) assertion syntax to the new Should-* (v6) assertions (note the hyphen, no space), e.g. `Should -Be` -> `Should-Be`, `Should -Not -Be` -> `Should-NotBe`. Tracks Pester 6, which is still a release candidate, so this guidance may change; verified against Pester 6.0.0-rc2. Use when converting Pester v5 assertions to Pester v6 Should-* operators, modernizing a Pester test suite, or when a user asks to migrate, convert, or rewrite `Should -...` calls in .Tests.ps1 / PowerShell files.
Why this skill is useful
Provides specific command mappings and procedures for migrating Pester v5 assertions to v6 that the AI wouldn't reliably generate on its own.
What it needs
About 4k tokens when loaded. Last updated 2026-08-07. 37,534 stars on the source repository.
What this skill does
Pester Should - → Should- Migration Convert classic Pester v5 assertions (Should -Be, space then parameter) to the new Pester v6 Should- assertions (Should-Be, hyphen, no space). Status: experimental / preview. Verified against Pester 6.0.0-rc2. The classic Should -Be style still works in v6, so migrate incrementally and keep the suite green. Companion skill. This skill covers the optional move to the new Should- operators. To upgrade a suite across major Pester versions (v3→v4→v5→v6 — the runtime, mocks, and config), use the separate pester-migration skill. In v6 the classic Should -Be keeps working, so adopting Should- is independent of any version bump. When to Use Modernizing a Pester suite to the v6 Should- assertions. A user asks to migrate / convert / rewrite Should -... calls. You want clearer, type-aware failure messages from the new assertions. Know This First Both syntaxes work side by side in Pester v6. Migration is optional and can be done one test (or one file) at a time. Nothing breaks if you leave some classic. Requires Pester v6+. The Should- commands do not exist in v5. Negation is a separate command, not a -Not switch: Should -Not -Be → Should-NotBe. There is no -Not parameter on the new assertions. The actual value still comes from the pipeline ($x Should-Be 1) or from -Actual (Should-Be -Actual $x -Expected 1). -Because carries over unchanged. Most renames are mechanical, but several have behavior changes you must check by hand — see Gotchas. Procedure Step 1 — Find the classic assertions Search the target for the classic space-separated syntax (the tell is Should -, or Should followed by -Not): Limit the scope to PowerShell test files (.Tests.ps1, .ps1). …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills github/pester-should-migration