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

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…

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

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

    line 6
  2. Very specific:

    Read the relevant instruction file before building anything.

    line 22
  3. Very specific:

    Run the gates locally before opening a PR.

    line 26
  4. Very specific:

    When you add or rescope a file in .github/instructions/, add or update the matching .claude/rules/powershell-standards/<name>.md so its …

    line 34
  5. Very specific:

    When you add a prompt file, add the matching command.

    line 36

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

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

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.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 launch.
  • Pull requests: branch, commit, and PR conventions live in .github/instructions/pull-requests.instructions.md and 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 two powershell-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, Warning
    • Invoke-Pester from the repository root
    • 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.
  • When you add or rescope a file in .github/instructions/, add or update the matching .claude/rules/powershell-standards/<name>.md so its paths stay identical to applyTo.
  • When you add a prompt file, add the matching command. Tools/Tests/ClaudeMirror.Tests.ps1 fails when either mirror drifts from .github/.

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.