Agent skill

Validate Changes

by gaelcolas in gaelcolas/Sampler

Run targeted Sampler test scopes to validate changes quickly and safely, then run the full test suite when needed for confidence before PRs.

MITAuto-check passedTesting & QA

Install Validate Changes

skills CLI
$ npx skills add gaelcolas/Sampler --skill validate-changes -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install gaelcolas/Sampler validate-changes --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/gaelcolas/Sampler.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.github/skills/validate-changes .claude/skills/validate-changes && rm -rf skills-src

Use ~/.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/

Facts

Skill name
validate-changes
GitHub stars
244
Token cost
~1.8k tokens
SKILL.md length
693 words
Files
1
Skills in repo
1
Repo updated
First seen
Licence
MIT

At a glance

Run targeted Sampler test scopes to validate changes quickly and safely, then run the full test suite when needed for confidence before PRs.

  • Tasks that involve Test generation
  • SKILL.md covers Purpose, Use this skill when, Inputs and Decision flow, plus 5 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Tasks that involve CI/CD

What it does

Validate Changes is an agent skill from gaelcolas/Sampler. Run targeted Sampler test scopes to validate changes quickly and safely, then run the full test suite when needed for confidence before PRs.

Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Testing & QA, covering Test generation and CI/CD. It works with PowerShell. The repository describes itself as: Module template with build pipeline and examples, including DSC elements. The licence is MIT.

When your agent uses it

  • Tasks that involve Test generation
  • Tasks that involve CI/CD

Example prompts

  • “/validate-changes”

What it can do on your machine

Read from SKILL.md and the folder at commit 6a6aa03. It shows what the files ask for, not the result of running them.

  • Tool permissions

    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.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are powershell).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Validate Changes loads about 1.8k tokens when it runs. Until then it costs about 39 tokens; SKILL.md has 693 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~39
When it runs · the whole SKILL.md, loaded when a task matches
~1.8k

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.

Safety

Auto-check passed

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.

SKILL.md

The full file from gaelcolas/Sampler at commit 6a6aa03, republished under its MIT licence (© gaelcolas). 693 words, ~1,837 tokens.

Download SKILL.mdSave it as .claude/skills/validate-changes/SKILL.md (or your agent's skills folder).
name
validate-changes
description
Run targeted Sampler test scopes to validate changes quickly and safely, then run the full test suite when needed for confidence before PRs.
argument-hint
What files or areas did you change, and how much validation do you want?

Validate Changes with Sampler Tests

Purpose

Run the right Sampler test scope for a change, fast first and broad only when needed.

Use this skill when

  • You changed PowerShell functions under Sampler/Public or Sampler/Private.
  • You changed PowerShell classes and enums under Sampler/Classes or Sampler/Enum.
  • You changed templates under Sampler/Templates.
  • You changed build logic under .build/tasks or build.yaml.
  • You need a confidence check before opening or updating a PR.

Inputs

  • changed_paths: list of changed files or folders.
  • target_test: optional single test file path for focused validation.
  • run_quality_gate: optional boolean to run HQRM checks.

Decision flow

Mandatory: every command in this skill must be invoked through ./build.ps1. Do not run Invoke-Pester directly, do not call Build-Module directly, and do not manually prepend anything to PSModulePath. Running ./build.ps1 -ResolveDependency -Tasks noop (or any other -Tasks invocation) is what bootstraps dependencies and wires PSModulePath for the current shell so the freshly built module is the one being tested. Direct test/build invocations bypass that setup and may report false results against a stale or incomplete artifact.

  1. Bootstrap dependencies if needed.
  • Command:
powershell
./build.ps1 -ResolveDependency -Tasks noop
  1. Pick the smallest useful test scope first.
  • If target_test is provided, run only that test file:
powershell
./build.ps1 -Tasks test -PesterPath '<target_test>' -CodeCoverageThreshold 0
  • Else if changes are only in a specific function area, run a focused unit test file in tests/Unit/**.
  1. Expand based on change type.
  • If any file under Sampler/Templates/** changed: run template integration tests:
powershell
./build.ps1 -Tasks test -PesterPath 'tests/Integration/PlasterTemplates' -CodeCoverageThreshold 0
  • If build/task wiring changed (.build/tasks/**, build.yaml, build.ps1): run default test workflow:
powershell
./build.ps1 -Tasks test
  1. Run broad integration only when needed.
  • For cross-template or workflow-impacting changes:
powershell
./build.ps1 -Tasks test -PesterPath 'tests/Integration' -CodeCoverageThreshold 0
  1. Optional release-quality gate.
  • If run_quality_gate is true, run:
powershell
./build.ps1 -Tasks hqrmtest

Running these commands without hanging

Always tee ./build.ps1 output to output\agentic\ — this subfolder is excluded from the Clean task so logs survive between builds. Create it first, then stream:

powershell
$null = New-Item -Path 'output\agentic' -ItemType Directory -Force

./build.ps1 -Tasks test -PesterPath '<paths>' -CodeCoverageThreshold 0 2>&1 |
    Tee-Object -FilePath 'output\agentic\test.log'

# Then poll/inspect the log without re-running:
Get-Content output\agentic\test.log -Tail 20
Select-String -Path output\agentic\test.log -Pattern 'Build (FAILED|succeeded)'

Clean up when done: Remove output\agentic once investigation is complete:

powershell
Remove-Item -Path 'output\agentic' -Recurse -Force -ErrorAction 'Ignore'

When invoked through the powershell tool, prefer mode="async" with Tee-Object and poll periodically — never tail with | Select -Last N against a still-running build.

Diagnosing failures from XML output

Test failures are recorded in machine-readable XML under output/testResults/. Always read those files instead of grepping the build log — they tell you which tests failed and why.

  • The build summary's "N errors" count is not a reliable pass/fail signal. ./build.ps1 prints a final line like Build completed with errors. 98 tasks, 8 errors, 3 warnings, but this count reflects everything written to the PowerShell error stream during the run — including caught/non-terminating errors that scripts intentionally handle (for example, Add-Sample and New-SamplerPipeline write to $Error internally while probing dynamic parameters, even though they catch and continue). A non-zero error count here does not mean any test failed. Always confirm actual failures via the NUnit/HQRM result files below before reporting a failure to the user.

  • Pester (-Tasks test) writes NUnit XML at output/testResults/NUnitXml_<ProjectName>_<Version>.<OS>.PSv.<PSVersion>.xml. Each failing assertion is a <test-case result="Failure"> node with the assertion message under <failure><message>:

    powershell
    $latest = Get-ChildItem output\testResults\NUnitXml_*.xml |
        Sort-Object LastWriteTime -Descending | Select-Object -First 1
    [xml]$x = Get-Content $latest.FullName
    $x.SelectNodes('//test-case[@result="Failure"]') | ForEach-Object {
        "==FAIL==`n$($_.name)`n$($_.failure.message)`n"
    }
  • HQRM (-Tasks hqrmtest) writes a CliXml-serialized Pester run object at output/testResults/DscTestObject_DscTest_<ProjectName>_<Version>.<OS>.PSv.<PSVersion>.xml. This is not NUnit XML — XPath against <test-case> returns nothing. Look for <S N="Result">Failed</S> and read surrounding context, or grep DisplayErrorMessage for the assertion text:

    powershell
    $f = Get-ChildItem output\testResults\DscTestObject_DscTest_*.xml |
        Sort-Object LastWriteTime -Descending | Select-Object -First 1
    $lines = Get-Content $f.FullName
    foreach ($h in Select-String -Path $f.FullName -Pattern '"Result">Failed')
    {
        "===line $($h.LineNumber)==="
        $lines[($h.LineNumber - 1)..($h.LineNumber + 20)] -join "`n"
    }
    Select-String -Path $f.FullName -Pattern 'DisplayErrorMessage'

    Skip aggregate Result=Failed nodes (run/container totals) — real test failures sit alongside an <S N="ItemType">Test</S>, an ErrorRecord, and a ScriptBlock.

  • Always pick the latest result file (Sort-Object LastWriteTime -Descending); each invocation rewrites these XML files.

  • When reporting a failure to the user, quote the XML's assertion message — do not paraphrase the build-log tail.

Show full SKILL.md (133 more words)Show less

Completion checks

  • All selected test commands exit successfully.
  • For template changes: corresponding integration tests pass.
  • For public/private function changes: relevant unit tests pass.
  • If behavior is user-visible: ensure CHANGELOG.md has an Unreleased entry.
  • Before declaring work complete on any PR-bound change, run the full ./build.ps1 -Tasks test suite (not just focused tests). Focused tests validate the changed scope; the full suite catches HQRM, ScriptAnalyzer, help quality, and test-coverage regressions that focused runs skip. A focused run passing is a necessary but not sufficient condition for readiness.

Report format

Return a short summary with:

  • Commands run
  • Pass/fail per scope
  • Any failing test file paths
  • Suggested next command (if failures occurred)

Example prompts

  • "Validate my edits in Sampler/Public/New-SampleModule.ps1 quickly."
  • "I changed Sampler/Templates/Sampler/plasterManifest.xml; run the right tests."
  • "Run full validation for my current branch, including HQRM."

© gaelcolas, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .github/skills/validate-changes of gaelcolas/Sampler.

Open the folder on GitHubat commit 6a6aa03

Compare with similar skills

Validate Changes 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.

Validate Changes compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Validate Changes this skillgaelcolas/Sampler244—~1.8kAutomated safety check: PassMIT
Azsdk Common Pipeline AnalysisAzure/azure-sdk-tools134—~1.2kAutomated safety check: PassMIT
Run Testsrunceel/ReactiveProperty944—~3.6kAutomated safety check: PassMIT
MAUI UI Test Shard Rebalancerdotnet/maui23k—~995Automated safety check: PassMIT
MAUI Helix Unit Test Runnerdotnet/maui23k—~1.4kAutomated safety check: PassMIT
Dokan Run Test Suitegetdokan/dokan288—~4.7kAutomated safety check: NotesNone

Similar skills

  • Azsdk Common Pipeline Analysis

    Azure/azure-sdk-tools

    Official

    Analyze Azure SDK CI/CD pipeline failures into a structured diagnosis, and define the required output format.

    134 GitHub stars~1.2k tokensUpdated today
    Testing & QAAuto-check passed
  • Run Tests

    runceel/ReactiveProperty

    Runs .NET tests with dotnet test. An agent skill from runceel/ReactiveProperty.

    944 GitHub stars~3.6k tokensUpdated 1 mo ago
    Testing & QAAuto-check passed
  • Official

    Splits a slow .NET MAUI UI-test category into method-level CI shards sized from historical Azure DevOps timings so each job fits a target duration.

    23k GitHub stars~995 tokensUpdated today
    Testing & QAAuto-check passed
  • Official

    Submits .NET MAUI unit tests to Helix queues from a local machine and monitors job status and per-work-item logs with PowerShell scripts.

    23k GitHub stars~1.4k tokensUpdated today
    Testing & QAAuto-check passed
  • Dokan Run Test Suite

    getdokan/dokan

    Execute the Dokan Playwright test suite (E2E + API), locally or via GitHub Actions.

    288 GitHub stars~4.7k tokensUpdated today
    Testing & QAAuto-check: notes
  • Blue Team

    gaasher/Agent-Loop-Skills

    A skill your agent uses when the user has concrete failing cases in code or a guardrail/classifier/filter/prompt/API they own — a red-team failure catalogue OR a CI/CD test-failure report (failing…

    174 GitHub stars~3.6k tokensUpdated 3 mo ago
    Testing & QAAuto-check passed

Works with

Categories

Questions about Validate Changes

What does Validate Changes do?

Run targeted Sampler test scopes to validate changes quickly and safely, then run the full test suite when needed for confidence before PRs. Validate Changes is an agent skill from gaelcolas/Sampler. Run targeted Sampler test scopes to validate changes quickly and safely, then run the full test suite when needed for confidence before PRs.

When should I use Validate Changes?

Validate Changes fits situations like: tasks that involve Test generation; tasks that involve CI/CD.

How do I install Validate Changes in Claude Code?

Run `npx skills add gaelcolas/Sampler --skill validate-changes -a claude-code`. Or copy the skill folder (.github/skills/validate-changes in gaelcolas/Sampler) into .claude/skills/validate-changes in your project. Claude Code loads it when a task matches its description.

How do I install Validate Changes in Codex?

Run `npx skills add gaelcolas/Sampler --skill validate-changes -a codex`. Or copy the skill folder (.github/skills/validate-changes in gaelcolas/Sampler) into .agents/skills/validate-changes in your project. Codex loads it when a task matches its description.

Can I use Validate Changes in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add gaelcolas/Sampler --skill validate-changes -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/validate-changes, .gemini/skills/validate-changes, .github/skills/validate-changes and .opencode/skills/validate-changes in your project.

What does Validate Changes need to run?

SKILL.md names no scripts, command-line tools or credentials: Validate Changes is instructions for the agent only.

Does Validate Changes access the network?

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.

Is Validate Changes safe to install?

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.

What licence does Validate Changes use?

Validate Changes is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Validate Changes use?

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.

What are the alternatives to Validate Changes?

Skills that share tags, products or a category with Validate Changes: Azsdk Common Pipeline Analysis (Azure/azure-sdk-tools, 134 stars), Run Tests (runceel/ReactiveProperty, 944 stars), MAUI UI Test Shard Rebalancer (dotnet/maui, 23k stars) and MAUI Helix Unit Test Runner (dotnet/maui, 23k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Validate Changes?

gaelcolas (a GitHub user) maintains it in gaelcolas/Sampler, which has 244 GitHub stars. The repository was last updated on October 6, 2026.

Source: gaelcolas/Sampler on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.