github/awesome-copilot

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 rewri

91Collecting
See how to use itView GitHub source
npx skills add https://github.com/github/awesome-copilot --skill "skills/pester-should-migration"
Automated source guide

Source checked Jul 28, 2026·Refresh due Oct 26, 2026

Reorganized from the pinned upstream SKILL.md

Turn pester-should-migration's source instructions into a guide you can follow

According to the pinned SKILL.md from github/awesome-copilot: Convert classic Pester v5 assertions (Should -Be, space then parameter) to the new Pester v6 Should- assertions (Should-Be, hyphen, no space).

npx skills add https://github.com/github/awesome-copilot --skill "skills/pester-should-migration"
Check the pinned source

Best fit

  • 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.

Bring this context

  • A concrete task that matches the documented purpose of pester-should-migration.
  • The files, examples, or context the task depends on.
  • Your constraints, target environment, and definition of done.

Expected outputs

  • 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, collecti…

Key source sections

Read pester-should-migration through these 5 source sections

Sections are extracted automatically from the pinned SKILL.md and link back to the source.

01

Procedure

Search the target for the classic space-separated syntax (the tell is Should -, or Should followed by -Not):

SKILL.md · Procedure
Case sensitivity. Classic Should -Be is case-insensitive on strings; so isTruthy vs. true. Classic Should -BeTrue / -BeFalse accept any truthy /BeNullOrEmpty has no single equivalent. Pick by intent: $null →
02

Step 1 — Find the classic assertions

Search the target for the classic space-separated syntax (the tell is Should -, or Should followed by -Not):

SKILL.md · 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).
03

Step 2 — Apply the mapping

Most-used conversions (full list in references/assertion-map.md):

SKILL.md · Step 2 — Apply the mapping
Most-used conversions (full list in references/assertion-map.md):
04

Step 3 — Check the behavioral gotchas (do NOT skip)

These do not translate by a plain rename. Read each before converting:

SKILL.md · Step 3 — Check the behavioral gotchas (do NOT skip)
Case sensitivity. Classic Should -Be is case-insensitive on strings; so isTruthy vs. true. Classic Should -BeTrue / -BeFalse accept any truthy /BeNullOrEmpty has no single equivalent. Pick by intent: $null →
05

Step 4 — Verify

Run the suite and confirm it's still green — the new messages differ, but passes must stay passes:

SKILL.md · Step 4 — Verify
Run the suite and confirm it's still green — the new messages differ, but passes must stay passes:If a converted assertion newly fails, re-check the gotchas above (most often 2 truthy/falsy, 3 null-or-empty, or 4 collections).

SkillSignal prompt templates

Provide the task, context, and acceptance criteria

These prompts were written by SkillSignal from the source structure; they are not upstream text.

Task-start prompt

Confirm source fit, inputs, and outputs before acting.

Use pester-should-migration to help me with: [specific task]. Context: [files, data, or background]. Constraints: [environment, scope, and prohibited actions]. Before acting, check the pinned SKILL.md and explain which sections apply, what inputs are still missing, and what you will deliver.

Source-guided execution

Make the Agent explicitly follow the key extracted sections.

Apply the pinned pester-should-migration source to [task]. Pay particular attention to these source sections: “Procedure”, “Step 1 — Find the classic assertions”, “Step 2 — Apply the mapping”, “Step 3 — Check the behavioral gotchas (do NOT skip)”, “Step 4 — Verify”. Preserve the important decision at each step. Mark facts not covered by the source as “needs confirmation” instead of inventing them. Then verify the result against my acceptance criteria: [criteria].

Result-review prompt

Check omissions, permissions, and source drift before delivery.

Review the current pester-should-migration result: (1) does it satisfy the original task; (2) were any applicable steps or limits in the pinned SKILL.md missed; (3) did it perform any unauthorized file, command, network, or data action; and (4) which conclusions remain unverified? List issues first, then fix only what the source or user authorization supports.

Output checklist

Verify each item before delivery

The task matches the purpose documented in the SKILL.md.

The source section “Procedure” has been checked.

The source section “Step 1 — Find the classic assertions” has been checked.

The source section “Step 2 — Apply the mapping” has been checked.

The source section “Step 3 — Check the behavioral gotchas (do NOT skip)” has been checked.

Inputs, constraints, and acceptance criteria are explicit.

Unverified facts, compatibility, and outcome claims are clearly marked.

Any file, command, network, or data action has been reviewed.

Choose a different workflow

When another Skill is the better fit

simpy

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.

A separate implementation from K-Dense-AI/scientific-agent-skills; compare its source, maintenance signals, and permission requirements.

Open source detail

flowstudio-power-automate-build

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

A separate implementation from github/awesome-copilot; compare its source, maintenance signals, and permission requirements.

Open source detail

salesforce-apex-quality

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.

A separate implementation from github/awesome-copilot; compare its source, maintenance signals, and permission requirements.

Open source detail

FAQ

What does pester-should-migration do?

Convert classic Pester v5 assertions (Should -Be, space then parameter) to the new Pester v6 Should- assertions (Should-Be, hyphen, no space).

How do I start using pester-should-migration?

The catalog detected this source-specific install command: npx skills add https://github.com/github/awesome-copilot --skill "skills/pester-should-migration". Inspect the command and pinned source before running it.

Which Agent platforms does it declare?

No dedicated Agent platform is declared in the pinned source record.

Repository stars
37,126
Repository forks
4,654
Quality
91/100
Source repository last pushed

Quality breakdown

Based on traceable docs and repository signals; stars are not treated as quality.

91/100
Documentation28/30
Specificity21/25
Maintenance20/20
Trust signals22/25

Compare before choosing

Related Agent Skills and source variants

These links are selected from shared tasks, functions, stacks, platforms, and same-name variants. Compare the source owner, documentation, permissions, and maintenance signals.

simpy by k-dense-ai

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.

flowstudio-power-automate-build by github

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

salesforce-apex-quality by github

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.

ship by griffinwork40

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.

writing-skills by obra

Use when creating new skills, editing existing skills, or verifying skills work before deployment

View original Skill.mdThis page is parsed directly from the repository SKILL.md without editorial rewriting. Collected: Jul 28, 2026 · about 5 min

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 -BeShould-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):

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).

Step 2 — Apply the mapping

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 -BeNullOrEmptydepends — 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-ThingShould-Invoke Get-Thing
Should -InvokeVerifiableShould-Invoke -Verifiable

Step 3 — Check the behavioral gotchas (do NOT skip)

These do not translate by a plain rename. Read each before converting:

  1. Case sensitivity. Classic 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 BeLikeExactlyShould-BeLikeString -CaseSensitive and MatchExactlyShould-MatchString -CaseSensitive.
  2. Truthy vs. true. Classic 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.
  3. BeNullOrEmpty has no single equivalent. Pick by intent: $nullShould-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.
  4. Collections. Classic 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.
  5. Pipeline unwrapping. The pipeline unwraps input: a value assertion sees @(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.
  6. No 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'.
  7. 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.

Step 4 — Verify

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).

Step 5 — (Optional) Enforce the new style

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.

Output

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).

Reference

  • references/assertion-map.md — full operator-by-operator table with before/after examples and workarounds.
  • Live command reference: https://pester.dev/docs/commands/Should-Be (swap in any Should-* name) for exact parameters and examples.
  • Concepts: https://pester.dev/docs/assertions/should-command (value vs. collection assertions, pipeline vs. -Actual).
  • v5→v6 upgrade guide: https://pester.dev/docs/migrations/v5-to-v6.
Skill path
skills/pester-should-migration/SKILL.md
Commit SHA
9933dcad5be5
Repository license
MIT
Data collected