SKILL.md
PowerShell Scripts Workflows (scripts/)
When to use
Use this skill when the user asks to:
- Update build/release tooling under
scripts/*.ps1 - Run scripts locally (CI build, version/release ops, formatting, artifact download)
- Ensure scripts continue to use shared modules under
scripts/modules/
Repo conventions
- Scripts are PowerShell Core friendly and generally run via
pwsh. - Prefer importing and using module functions from
scripts/modules/. - Avoid inlining complex logic in scripts if a module is the right home.
Step-by-step procedure
- Identify the script(s) under
scripts/involved in the request. - Find the module imports near the top of the script and prefer calling module functions.
- If logic is reusable across scripts, add it to the appropriate module under
scripts/modules/and call it. - Keep parameter behavior backward compatible where practical.
- Update
scripts/README.mdif flags/behavior change. - Validate:
- pwsh -NoProfile -ExecutionPolicy Bypass -File scripts/test-modules.ps1 - Run the specific script with the safest relevant flags.
Common scripts
scripts/build-ci-local.ps1— local CI build pipelinescripts/manage-version.ps1— version + release automation (rollback-aware)scripts/format-csharp-advanced.ps1— advanced formattingscripts/check-csharp-test-documentation.ps1— test doc coveragescripts/download-latest-artifact.ps1— download CI artifacts
Verification
After modifying scripts or modules, prefer:
pwsh -NoProfile -ExecutionPolicy Bypass -File scripts/test-modules.ps1- Run the most relevant script path end-to-end with safe flags (e.g.,
-WhatIf,-StatusOnly,-SkipTests).
Examples (input → expected output)
Example: Adjust a script to use a shared module
Input: “Stop duplicating prereq checks across scripts.”
Expected output:
- Scripts call
Test-*functions fromCore/Prerequisites.psm1 - No drift between scripts (one source of truth)
scripts/test-modules.ps1still passes
References
- Scripts overview: [scripts/README.md](../../../scripts/README.md)
- Module system: [powershell-module-system](../powershell-module-system/SKILL.md)