ai-powershell-standards
CLAUDE.md19 starsChanged 2 months agoMITView on GitHub
Enterprise PowerShell standards shared by GitHub Copilot and Claude Code. The standards live under .github/ and are the single source of truth. Nothing under .claude/ restates them. - Always-on standards: .claude/rules/powershell-standards/copilot-instructions.md imports .github/copilot-instructions.md. A rule with no paths loads at launch, like CLAUDE.md. - Scoped standards: .github/instructions/*.instructions.md, loaded per file type by the other rules in .claude/rules/powershell-standards/. Each uses the same globs as its instruction file's applyTo, except that applyTo: '**' becomes a rule with no paths, which loads at…
In this repository2 other files it gives its agents.
- .claude/rules/powershell-standards/copilot-instructions.mdCopilot instructions
- .github/copilot-instructions.mdCopilot instructions
The file
We split this CLAUDE.md into the rules it gives an agent
5 rules. About 0 are common, 0 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
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 6
Always-on standards: .claude/rules/powershell-standards/copilot-instructions.md imports .github/copilot-instructions.md.
- Very specific: line 22
Read the relevant instruction file before building anything.
- Very specific: line 26
Run the gates locally before opening a PR.
- Very specific: line 34
When you add or rescope a file in .github/instructions/, add or update the matching .claude/rules/powershell-standards/<name>.md so its …
- Very specific: line 36
When you add a prompt file, add the matching command.
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 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
Enterprise PowerShell standards shared by GitHub Copilot and Claude Code. The standards live under
.github/ and are the single source of truth. Nothing under .claude/ restates them.
- Always-on standards:
.claude/rules/powershell-standards/copilot-instructions.mdimports.github/copilot-instructions.md. A rule with nopathsloads at launch, like CLAUDE.md. - Scoped standards:
.github/instructions/*.instructions.md, loaded per file type by the other rules in.claude/rules/powershell-standards/. Each uses the same globs as its instruction file'sapplyTo, except thatapplyTo: '**'becomes a rule with nopaths, which loads at launch. - Pull requests: branch, commit, and PR conventions live in
.github/instructions/pull-requests.instructions.mdand load in every session. - Prompts: each file in
.github/prompts/has a command in.claude/commands/powershell-standards/that attaches it, for example/powershell-standards:create-test. - The sync workflow mirrors
.github/,powershell-standards/, and the twopowershell-standards/folders under.claude/rules/and.claude/commands/into consuming projects. Anything an instruction file links to must live under one of those. Link to the rest of this repository by absolute GitHub URL.
Working in this repository
- Read the relevant instruction file before building anything. When its wording is ambiguous, match
the worked examples under
powershell-standards/Examples/, which pass every gate and are mirrored into consuming projects by the sync workflow. - Target PowerShell 7.6 (LTS) with Windows PowerShell 5.1 compatibility. Tests are Pester 6.2.
- Run the gates locally before opening a PR. CI runs the same checks from
.github/workflows/quality-gates-pr.yml:./Tools/Test-StandardsCompliance.ps1 -Path .Invoke-ScriptAnalyzer -Path . -Recurse -Severity Error, WarningInvoke-Pesterfrom the repository rootmarkdownlint-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.- When you add or rescope a file in
.github/instructions/, add or update the matching.claude/rules/powershell-standards/<name>.mdso itspathsstay identical toapplyTo. - When you add a prompt file, add the matching command.
Tools/Tests/ClaudeMirror.Tests.ps1fails when either mirror drifts from.github/.
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.

