Best for
- 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.
github/awesome-copilot/skills/pester-should-migration/SKILL.md
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 rewri
Decision brief
Convert classic Pester v5 assertions (Should -Be, space then parameter) to the new Pester v6 Should- assertions (Should-Be, hyphen, no space).
Compatibility matrix
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/github/awesome-copilot --skill "skills/pester-should-migration"Inspect the Agent Skill "pester-should-migration" from https://github.com/github/awesome-copilot/blob/9933dcad5be5caeb288cebcd370eeeb2fc2f1685/skills/pester-should-migration/SKILL.md at commit 9933dcad5be5caeb288cebcd370eeeb2fc2f1685. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
Search the target for the classic space-separated syntax (the tell is Should -, or Should followed by -Not):
Search the target for the classic space-separated syntax (the tell is Should -, or Should followed by -Not):
Most-used conversions (full list in references/assertion-map.md):
These do not translate by a plain rename. Read each before converting:
Run the suite and confirm it's still green — the new messages differ, but passes must stay passes:
Permission review
No configured static risk pattern was detected
This is not proof of safety. Runtime behavior, indirect dependencies, and hidden external systems are outside the static scan.
Evidence record
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 91/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 37,126 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Should -* → Should-* MigrationConvert 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 -Bestyle 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 classicShould -Bekeeps working, so adoptingShould-*is independent of any version bump.
Should-* assertions.Should -... calls.Should-* commands do not exist in v5.-Not switch: Should -Not -Be →
Should-NotBe. There is no -Not parameter on the new assertions.$x | Should-Be 1) or from
-Actual (Should-Be -Actual $x -Expected 1). -Because carries over unchanged.Search the target for the classic space-separated syntax (the tell is Should -,
or Should followed by -Not):
Should - # any classic operator
Should -Not - # negated classic operator
Assert-MockCalled # also removed in v6 -> Should-Invoke
Limit the scope to PowerShell test files (*.Tests.ps1, *.ps1).
Most-used conversions (full list in references/assertion-map.md):
| Classic (v5) | New (v6) |
|---|---|
$x | Should -Be 1 | $x | Should-Be 1 |
$x | Should -Not -Be 1 | $x | Should-NotBe 1 |
$x | Should -BeExactly 'A' | $x | Should-BeString 'A' -CaseSensitive |
$x | Should -BeGreaterOrEqual 2 | $x | Should-BeGreaterThanOrEqual 2 |
$x | Should -BeLessOrEqual 2 | $x | Should-BeLessThanOrEqual 2 |
$x | Should -BeLike 'a*' | $x | Should-BeLikeString 'a*' |
$x | Should -Match 're' | $x | Should-MatchString 're' |
$x | Should -BeOfType [int] | $x | Should-HaveType ([int]) |
$x | Should -BeNullOrEmpty | depends — see gotchas (no single equivalent) |
$c | Should -HaveCount 3 | $c | Should-BeCollection -Count 3 |
$c | Should -Contain 2 | $c | Should-ContainCollection 2 |
{ ... } | Should -Throw 'msg' | { ... } | Should-Throw -ExceptionMessage 'msg' |
Should -Invoke Get-Thing | Should-Invoke Get-Thing |
Should -InvokeVerifiable | Should-Invoke -Verifiable |
These do not translate by a plain rename. Read each before converting:
Should -Be is case-insensitive on strings; so is
Should-Be. But classic Should -BeExactly (case-sensitive) has no plain
equivalent — use Should-BeString -CaseSensitive. (Should-Be is never
case-sensitive.) Same pattern for BeLikeExactly → Should-BeLikeString -CaseSensitive
and MatchExactly → Should-MatchString -CaseSensitive.Should -BeTrue / -BeFalse accept any truthy /
falsy value (1, 'x', 0, '', $null, @()). The new Should-BeTrue /
Should-BeFalse are strict (exactly $true / $false). To preserve the old
loose behavior use Should-BeTruthy / Should-BeFalsy. Only use the strict ones
when the value really is a boolean.BeNullOrEmpty has no single equivalent. Pick by intent: $null →
Should-BeNull; empty string → Should-BeEmptyString; empty collection →
Should-BeCollection -Count 0; broad "falsy" → Should-BeFalsy. The negation
Should -Not -BeNullOrEmpty similarly splits into Should-NotBeNull /
Should-NotBeEmptyString / Should-NotBeWhiteSpaceString.Should -Be also compares arrays; the new Should-Be is
a value assertion and errors if -Expected is a collection ("You provided a
collection to the -Expected parameter"). Use Should-BeCollection to compare arrays.
Should -Contain (single-item membership) → Should-ContainCollection. The new
command also takes a collection of expected items and checks they are all present,
in the right order (1, 2, 3 | Should-ContainCollection @(1, 2)). For exact,
whole-collection equality use Should-BeCollection instead.@(1)
as 1 and @() as $null, and a typed collection ([int[]]) is re-collected as
[object[]]. When the exact value or concrete collection type matters (e.g.
Should-HaveType), pass it with -Actual instead of piping.Should-* equivalent. Should -Exist and the Should -FileContentMatch*
family have no new counterpart. Either keep the classic assertion, or rewrite with
PowerShell: Test-Path $p | Should-BeTrue, (Get-Content $p -Raw) | Should-MatchString 're'.Should -BeIn direction. No Should-BeIn. Reverse the operands:
$value | Should -BeIn $collection → $collection | Should-ContainCollection $value
(note the actual/expected swap), or keep the classic form.Run the suite and confirm it's still green — the new messages differ, but passes must stay passes:
Invoke-Pester -Path ./tests
If a converted assertion newly fails, re-check the gotchas above (most often #2 truthy/falsy, #3 null-or-empty, or #4 collections).
Once a suite is fully migrated, switch off the classic syntax so it can't creep back:
$config = New-PesterConfiguration
$config.Should.DisableV5 = $true
With this set, any remaining Should -Be throws and points at the Should-Be form.
Summarize what changed: files touched, count of assertions converted, any classic
assertions intentionally left (e.g. Should -Exist), and any conversions that need
a human decision (truthy/falsy, null-or-empty, collection semantics).
https://pester.dev/docs/commands/Should-Be (swap in any
Should-* name) for exact parameters and examples.https://pester.dev/docs/assertions/should-command (value vs. collection
assertions, pipeline vs. -Actual).https://pester.dev/docs/migrations/v5-to-v6.Alternatives
K-Dense-AI/scientific-agent-skills
Build, inspect, test, and analyze bounded process-based discrete-event simulations with SimPy, including events, resources, interrupts, monitoring, replications, warm-up, and reproducible output analysis.
github/awesome-copilot
Build, scaffold, and deploy Power Automate cloud flows using the FlowStudio MCP server. Your agent constructs flow definitions, wires connections, deploys, and tests — all via MCP without opening the portal. Load this skill when asked to: create a flow, build a new flow, deploy a flow definition, scaffold a Power Automate workflow, construct a flow JSON, update an existing flow's actions, patch a flow definition, add actions to a flow, wire up connections, or generate a workflow definition from
github/awesome-copilot
Apex code quality guardrails for Salesforce development. Enforces bulk-safety rules (no SOQL/DML in loops), sharing model requirements, CRUD/FLS security, SOQL injection prevention, PNB test coverage (Positive / Negative / Bulk), and modern Apex idioms. Use this skill when reviewing or generating Apex classes, trigger handlers, batch jobs, or test classes to catch governor limit risks, security gaps, and quality issues before deployment.
griffinwork40/agent-afk
Release pipeline for already-done local work. Dispatches /ground-state pre-flight, runs the project test suite, drafts a commit message, pushes, and opens a PR with a structured verification summary. Use when local changes are ready to hand off to review — e.g. 'ship this', 'push and open a PR', 'release this work'. Add --verify to trigger an adversarial verifier wave on the diff before a human reads the PR.