ai-powershell-standards
CLAUDE.md24 starsChanged 3 days agoMITView on GitHub
PowerShell standards shared by GitHub Copilot, Claude Code, and Codex. The rules live once, under standards/, and Tools/Build-AgentInstructions.ps1 generates every file that an agent reads. Nothing under .github/, .claude/, or .agents/ is edited by hand, apart from the Pester guides. - Always-on rules: .claude/rules/powershell-standards/copilot-instructions.md imports .github/copilot-instructions.md. A rule with no paths loads at launch, like this file. - Scoped rules: the other files in .claude/rules/powershell-standards/ import .github/instructions/powershell-*.instructions.md and carry the same globs as each file's applyTo. A topic whose glob…
In this repository33 other files it gives its agents.
- AGENTS.mdAGENTS.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-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
The file
We split this CLAUDE.md into the rules it gives an agent
6 rules. About 0 are common, 1 is distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 7
Always-on rules: .claude/rules/powershell-standards/copilot-instructions.md imports .github/copilot-instructions.md.
- Very specific: line 20
Before starting, run git fetch and confirm that the branch is not behind origin/main.
- Distinctive: line 23
Test a claim about PowerShell, Pester, or a tool on PowerShell 7.6 and Windows PowerShell 5.1 before writing it into a rule, and say what …
- Very specific: line 26
When a rule's wording is ambiguous, match the tested templates under standards/examples/ and the worked examples under …
- Very specific: line 28
Run the gate before opening a PR.
- Very specific: line 35
Keep .github/prompts/, powershell-standards/, and .claude/commands/powershell-standards/ in place.
≈ “Common” is an estimate: at least 1 in 5 of the 28,633 CLAUDE.md 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
AI PowerShell Standards
PowerShell standards shared by GitHub Copilot, Claude Code, and Codex. The rules live once, under
standards/, and Tools/Build-AgentInstructions.ps1 generates every file that an agent reads.
Nothing under .github/, .claude/, or .agents/ is edited by hand, apart from the Pester guides.
- Always-on rules:
.claude/rules/powershell-standards/copilot-instructions.mdimports.github/copilot-instructions.md. A rule with nopathsloads at launch, like this file. - Scoped rules: the other files in
.claude/rules/powershell-standards/import.github/instructions/powershell-*.instructions.mdand carry the same globs as each file'sapplyTo. A topic whose glob is**becomes a rule with nopaths. - Pull requests: branch, commit, and PR conventions are in
.github/instructions/powershell-pull-requests.instructions.mdand load in every session. - Skills:
.claude/skills/powershell-*are generated fromstandards/skills/. AGENTS.mdpoints Codex to the core. GitHub Copilot reads it too, which is why it does not repeat the rules.
Working in this repository
- Before starting, run
git fetchand confirm that the branch is not behindorigin/main. - Change a rule in
standards/rules/, then run./Tools/Build-AgentInstructions.ps1and commit the sources and the generated files together. - Test a claim about PowerShell, Pester, or a tool on PowerShell 7.6 and Windows PowerShell 5.1 before writing it into a rule, and say what was measured. Test a claim about PowerShell 7.7 on PowerShell 7.7 as well.
- When a rule's wording is ambiguous, match the tested templates under
standards/examples/and the worked examples underpowershell-standards/Examples/. - Run the gate before opening a PR. CI runs the same script from
.github/workflows/quality-gates-pr.yml:./Tools/Invoke-QualityGate.ps1(PowerShell 7.6, PSScriptAnalyzer 1.25.0, Pester 6.2.0)markdownlint-cli2 "**/*.md" "!**/docs/*/*.md"using.markdownlint.json(120-column lines)
Templates/is scaffolding and stays out of coverage.Documentation/Anti-Patterns/Test-QualityGates.ps1demonstrates violations on purpose. Do not "fix" either.- Keep
.github/prompts/,powershell-standards/, and.claude/commands/powershell-standards/in place. Consuming repositories that run an earlier sync workflow copy those folders, and their sync fails when one is missing.
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.

