powershell-ci-pipeline
Skill24 starsChanged 5 days agoMITView on GitHub
Add or fix a CI workflow for a PowerShell project that runs PSScriptAnalyzer and Pester with a coverage gate. Use when asked to set up, create, or repair CI, GitHub Actions, or quality gates for PowerShell code.
In this repository33 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .claude/rules/powershell-standards/copilot-instructions.mdCopilot instructions
- .github/copilot-instructions.mdCopilot instructions
- powershell-ci-pipelineSkill
- powershell-credential-scanSkill
- powershell-loggingSkill
- powershell-module-helpSkill
- powershell-new-functionSkill
- powershell-new-moduleSkill
- powershell-performance-reviewSkill
- powershell-reviewSkill
- powershell-security-reviewSkill
- powershell-write-testsSkill
- powershell-ci-pipelineSkill
- powershell-credential-scanSkill
- powershell-loggingSkill
- powershell-module-helpSkill
- powershell-new-functionSkill
- powershell-new-moduleSkill
- powershell-performance-reviewSkill
- powershell-reviewSkill
- powershell-security-reviewSkill
- powershell-write-testsSkill
- powershell-credential-scanSkill
- powershell-loggingSkill
- powershell-module-helpSkill
- powershell-new-functionSkill
- powershell-new-moduleSkill
- powershell-performance-reviewSkill
- powershell-reviewSkill
- powershell-security-reviewSkill
- powershell-write-testsSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 2 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Read .github/instructions/powershell-cicd.instructions.md first, unless it is already loaded.
- Distinctive: line 13
Look at what exists: workflow files, a build script, the test folder, and the module manifest.
- Distinctive: line 18
Add the pull request workflow from the CI rules: install PSScriptAnalyzer and Pester at fixed versions, run PSScriptAnalyzer and fail on …
- Very specific: line 20
Put the test gate in a script in the repository, Tests/Invoke-Tests.ps1 unless the project keeps its build scripts elsewhere, so that …
- Very specific: line 26
If the repository has no PSScriptAnalyzerSettings.psd1, offer to add the one shown in the CI rules.
- Very specific: line 28
If the repository has no .gitattributes file, add one that contains * text=auto eol=lf (CIC-11), so that the tests see the same line …
- Very specific: line 30
If the module ships compiled help, add the help checks from .github/instructions/powershell-platyps.instructions.md.
- Very specific: line 38
Do not add publishing, signing, or deployment steps unless the user asked for them.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Set up CI for a PowerShell project
Read .github/instructions/powershell-cicd.instructions.md first, unless it is already loaded. It
holds the rules, a pull request workflow, and a publishing workflow.
Steps
- Look at what exists: workflow files, a build script, the test folder, and the module manifest. Extend an existing workflow instead of adding a second one that does the same job.
- Establish what the project supports from its manifest and
#requireslines: PowerShell 7.6 only, or also Windows PowerShell 5.1, and which operating systems. Build the job list from that. Do not add a version or operating system the project does not claim to support. - Add the pull request workflow from the CI rules: install PSScriptAnalyzer and Pester at fixed versions, run PSScriptAnalyzer and fail on findings, and run the test gate.
- Put the test gate in a script in the repository,
Tests/Invoke-Tests.ps1unless the project keeps its build scripts elsewhere, so that developers can run the same check locally. Use the runner in.github/instructions/pester-supporting-docs/test-execution.md, and pass-CodeCoveragein the job that holds the coverage gate; the alternative is the minimal gate in.github/instructions/powershell-pester.instructions.md, which takes no parameters. Set its test path and coverage paths to the project's real folders. - If the repository has no
PSScriptAnalyzerSettings.psd1, offer to add the one shown in the CI rules. Adding it can surface many layout findings in existing code, so say that first. - If the repository has no
.gitattributesfile, add one that contains* text=auto eol=lf(CIC-11), so that the tests see the same line endings on every runner. - If the module ships compiled help, add the help checks from
.github/instructions/powershell-platyps.instructions.md. - Validate the workflow file's syntax, and run the gate script locally if you can.
Report
Say which files you added or changed, what each job runs, and what you were able to run locally. A
workflow is not verified until it has run on the CI system; say so, and do not claim that it passes.
Do not add publishing, signing, or deployment steps unless the user asked for them. When the
project has no credential scan (CIC-23), say so and name the powershell-credential-scan skill. Do
not add a scan unasked: it uses the project's CI time, and the user chooses the scanner.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

