Status: Done (2026-03-02)
Priority: High
Component: .claude/skills/powershell-dev/SKILL.md, tools/githooks/pre-commit, tools/githooks/install-hooks.ps1
Summary: As a contributor, I want PSScriptAnalyzer errors (especially missing UTF-8 BOM) caught immediately — both during Claude-assisted editing and at commit time — so that lint failures never reach CI.
Workflow:
- Update
powershell-devskill to instruct Claude to lint.ps1files immediately after editing - Create a git pre-commit hook that checks BOM and runs PSScriptAnalyzer on staged
.ps1files - Register the hook in
install-hooks.ps1
Acceptance Criteria:
-
powershell-devskill has a "Post-Edit Lint Check" section with PSScriptAnalyzer + BOM fix instructions - Pre-commit checklist in skill updated to emphasize lint is mandatory
-
tools/githooks/pre-commitexists and checks BOM + PSScriptAnalyzer on staged.ps1files -
tools/githooks/install-hooks.ps1installspre-commitalongsidecommit-msg - Hook blocks commits when a staged
.ps1file is missing BOM - Hook blocks commits when PSScriptAnalyzer reports Warning/Error
- Hook passes cleanly when all staged
.ps1files are lint-clean -
testrunner.ps1 -LintOnlyruns only linter.Tests.ps1 (no test files) -
-LintOnlycomposes with-Unit,-Integration, and-TestPath - Pre-commit hook uses
testrunner -LintOnlyinstead of direct PSScriptAnalyzer -
powershell-devskill usestestrunner -LintOnlyfor post-edit lint