diff --git a/.agents/skills/pester-test-authoring/SKILL.md b/.agents/skills/pester-test-authoring/SKILL.md new file mode 100644 index 0000000..f395675 --- /dev/null +++ b/.agents/skills/pester-test-authoring/SKILL.md @@ -0,0 +1,23 @@ +--- +name: pester-test-authoring +description: Use when writing or updating Pester tests for PowerShell scripts and modules, including behavior, error, and edge-case coverage. +--- + +# Pester Test Authoring + +Use this skill when adding confidence to PowerShell code changes with focused tests. + +## Workflow + +1. Write `Describe` blocks per script/function responsibility. +2. Cover happy path, invalid input, and edge cases. +3. Assert output shape and values, not only text formatting. +4. Keep tests deterministic by controlling randomness and external dependencies. +5. Ensure tests communicate intent through readable test names. + +## Output Checklist + +- Core behavior has direct tests. +- Error handling paths are explicitly asserted. +- Tests are deterministic and do not depend on external state. +- New tests fail before fix and pass after fix. diff --git a/.agents/skills/powershell-module-design/SKILL.md b/.agents/skills/powershell-module-design/SKILL.md new file mode 100644 index 0000000..2698b8d --- /dev/null +++ b/.agents/skills/powershell-module-design/SKILL.md @@ -0,0 +1,23 @@ +--- +name: powershell-module-design +description: Use when creating or evolving reusable PowerShell modules with public/private function boundaries and maintainable exports. +--- + +# PowerShell Module Design + +Use this skill when organizing code into reusable modules. + +## Workflow + +1. Separate public and private functions clearly. +2. Keep exported function names verb-noun and consistent with approved verbs. +3. Design functions to compose through the pipeline and object output. +4. Keep module entry points small; move logic into testable functions. +5. Export only stable commands and avoid leaking helper functions. + +## Output Checklist + +- Module surface area is intentionally limited. +- Function naming and signatures are consistent. +- Commands return useful objects for downstream automation. +- Exports match intended public API. diff --git a/.agents/skills/powershell-script-cli/SKILL.md b/.agents/skills/powershell-script-cli/SKILL.md new file mode 100644 index 0000000..245ba73 --- /dev/null +++ b/.agents/skills/powershell-script-cli/SKILL.md @@ -0,0 +1,23 @@ +--- +name: powershell-script-cli +description: Use when creating or refactoring standalone PowerShell scripts with robust parameters, pipeline support, and predictable output. +--- + +# PowerShell Script CLI + +Use this skill when building command-line PowerShell scripts intended for direct execution. + +## Workflow + +1. Define a `param()` block with clear parameter names, types, defaults, and validation attributes. +2. Support pipeline input where it improves usability (`ValueFromPipeline`, `process`). +3. Keep side effects explicit and return objects unless plain text output is required. +4. Handle invalid input early and fail with actionable error messages. +5. Verify behavior using representative examples and edge cases. + +## Output Checklist + +- Parameters are discoverable and validated. +- Script behavior is deterministic for same inputs. +- Error paths are tested with invalid or missing input. +- Output format is intentional (objects vs formatted strings). diff --git a/.claude/commands/pester.md b/.claude/commands/pester.md new file mode 100644 index 0000000..cd4250d --- /dev/null +++ b/.claude/commands/pester.md @@ -0,0 +1,15 @@ +--- +description: Write or improve Pester tests for PowerShell scripts and modules, including behavior and failure-path assertions. +argument-hint: "[test scope]" +allowed-tools: Read, Write, Edit, Glob, Grep, Bash(pwsh:*) +--- + +# Pester Test Workflow + +Use this command to create reliable tests for PowerShell code. + +1. Add `Describe`/`Context` blocks aligned with script or function responsibilities. +2. Cover normal behavior, edge cases, and invalid inputs. +3. Assert object values and types when possible, not only string output. +4. Keep tests deterministic by controlling randomness and dependencies. +5. Run test commands and iterate until failures are resolved. diff --git a/.claude/commands/ps-module.md b/.claude/commands/ps-module.md new file mode 100644 index 0000000..777d2b4 --- /dev/null +++ b/.claude/commands/ps-module.md @@ -0,0 +1,15 @@ +--- +description: Design or refactor a PowerShell module with clean public/private boundaries and stable exported commands. +argument-hint: "[module goal]" +allowed-tools: Read, Write, Edit, Glob, Grep, Bash(pwsh:*) +--- + +# PowerShell Module Workflow + +Use this command when creating or improving reusable modules. + +1. Organize code into public and private functions. +2. Use consistent verb-noun names and stable signatures for exports. +3. Keep exported commands focused and composable through object output. +4. Avoid leaking helper functions into the public API. +5. Verify exports and example usage after changes. diff --git a/.claude/commands/ps-script.md b/.claude/commands/ps-script.md new file mode 100644 index 0000000..eea9f69 --- /dev/null +++ b/.claude/commands/ps-script.md @@ -0,0 +1,15 @@ +--- +description: Create or refactor a PowerShell script with robust parameters, pipeline-friendly design, and predictable output. +argument-hint: "[script goal]" +allowed-tools: Read, Write, Edit, Glob, Grep, Bash(pwsh:*) +--- + +# PowerShell Script Workflow + +Use this command to build or improve a standalone `.ps1` script. + +1. Define a typed `param()` block with validation and clear defaults. +2. Support pipeline usage where practical and keep logic in `begin/process/end` when needed. +3. Prefer returning objects over pre-formatted text unless explicitly required. +4. Add clear input validation and actionable errors. +5. Validate behavior with examples, including edge and failure paths. diff --git a/.github/skills/pester-test-authoring/SKILL.md b/.github/skills/pester-test-authoring/SKILL.md new file mode 100644 index 0000000..f395675 --- /dev/null +++ b/.github/skills/pester-test-authoring/SKILL.md @@ -0,0 +1,23 @@ +--- +name: pester-test-authoring +description: Use when writing or updating Pester tests for PowerShell scripts and modules, including behavior, error, and edge-case coverage. +--- + +# Pester Test Authoring + +Use this skill when adding confidence to PowerShell code changes with focused tests. + +## Workflow + +1. Write `Describe` blocks per script/function responsibility. +2. Cover happy path, invalid input, and edge cases. +3. Assert output shape and values, not only text formatting. +4. Keep tests deterministic by controlling randomness and external dependencies. +5. Ensure tests communicate intent through readable test names. + +## Output Checklist + +- Core behavior has direct tests. +- Error handling paths are explicitly asserted. +- Tests are deterministic and do not depend on external state. +- New tests fail before fix and pass after fix. diff --git a/.github/skills/powershell-module-design/SKILL.md b/.github/skills/powershell-module-design/SKILL.md new file mode 100644 index 0000000..2698b8d --- /dev/null +++ b/.github/skills/powershell-module-design/SKILL.md @@ -0,0 +1,23 @@ +--- +name: powershell-module-design +description: Use when creating or evolving reusable PowerShell modules with public/private function boundaries and maintainable exports. +--- + +# PowerShell Module Design + +Use this skill when organizing code into reusable modules. + +## Workflow + +1. Separate public and private functions clearly. +2. Keep exported function names verb-noun and consistent with approved verbs. +3. Design functions to compose through the pipeline and object output. +4. Keep module entry points small; move logic into testable functions. +5. Export only stable commands and avoid leaking helper functions. + +## Output Checklist + +- Module surface area is intentionally limited. +- Function naming and signatures are consistent. +- Commands return useful objects for downstream automation. +- Exports match intended public API. diff --git a/.github/skills/powershell-script-cli/SKILL.md b/.github/skills/powershell-script-cli/SKILL.md new file mode 100644 index 0000000..245ba73 --- /dev/null +++ b/.github/skills/powershell-script-cli/SKILL.md @@ -0,0 +1,23 @@ +--- +name: powershell-script-cli +description: Use when creating or refactoring standalone PowerShell scripts with robust parameters, pipeline support, and predictable output. +--- + +# PowerShell Script CLI + +Use this skill when building command-line PowerShell scripts intended for direct execution. + +## Workflow + +1. Define a `param()` block with clear parameter names, types, defaults, and validation attributes. +2. Support pipeline input where it improves usability (`ValueFromPipeline`, `process`). +3. Keep side effects explicit and return objects unless plain text output is required. +4. Handle invalid input early and fail with actionable error messages. +5. Verify behavior using representative examples and edge cases. + +## Output Checklist + +- Parameters are discoverable and validated. +- Script behavior is deterministic for same inputs. +- Error paths are tested with invalid or missing input. +- Output format is intentional (objects vs formatted strings).