agentleFS
fadwenfadwen/ai-powershell-standards/CLAUDE.md

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…

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
  1. Very specific:

    Always-on rules: .claude/rules/powershell-standards/copilot-instructions.md imports .github/copilot-instructions.md.

    line 7
  2. Very specific:

    Before starting, run git fetch and confirm that the branch is not behind origin/main.

    line 20
  3. Distinctive:

    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 …

    line 23
  4. Very specific:

    When a rule's wording is ambiguous, match the tested templates under standards/examples/ and the worked examples under …

    line 26
  5. Very specific:

    Run the gate before opening a PR.

    line 28
  6. Very specific:

    Keep .github/prompts/, powershell-standards/, and .claude/commands/powershell-standards/ in place.

    line 35

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

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.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 is ** becomes a rule with no paths.
  • Pull requests: branch, commit, and PR conventions are in .github/instructions/powershell-pull-requests.instructions.md and load in every session.
  • Skills: .claude/skills/powershell-* are generated from standards/skills/.
  • AGENTS.md points 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 fetch and confirm that the branch is not behind origin/main.
  • Change a rule in standards/rules/, then run ./Tools/Build-AgentInstructions.ps1 and 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 under powershell-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.ps1 demonstrates 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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.