new-feature-module

Create and wire exported PowerShell feature modules for safeguard-ps.

24|35|Updated Sep 14, 2017
One-click install
npx skills add https://github.com/OneIdentity/safeguard-ps --skill new-feature-module
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: new-feature-module
Source: https://github.com/OneIdentity/safeguard-ps/tree/main/.agents/skills/new-feature-module
Command: npx skills add https://github.com/OneIdentity/safeguard-ps --skill new-feature-module

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Creating a new exported PowerShell feature module in safeguard-ps is error-prone because it requires consistent file placement, correct wiring in the module manifest, and disciplined cmdlet implementation patterns.

Core Features & Use Cases

  • Step-by-step module creation checklist: Guides you through adding a new src/<feature>.psm1, wiring it into src/safeguard-ps.psd1 (NestedModules and FunctionsToExport), and updating tests and mappings.
  • Production-ready module/cmdlet templates: Provides a feature-module file template plus reusable patterns for resolve helpers, pipeline support, output typing, and parameter sets.
  • Manifest and compatibility guardrails: Reinforces Windows PowerShell 5.1 compatibility, local helper imports, correct API-call method usage (Invoke-SafeguardMethod), and CI/version constraints.

Quick Start

Use this skill to generate a new feature module file under src, then wire it into src/safeguard-ps.psd1 by appending it to NestedModules and adding only its public cmdlets to FunctionsToExport.

Frequently Asked Questions about new-feature-module

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a new PowerShell feature module to safeguard-ps?▼

To add a new PowerShell feature module, create a src/<feature>.psm1 file, wire it into src/safeguard-ps.psd1 by appending it to NestedModules, and add only its public cmdlets to FunctionsToExport.

What's the best way to implement pipeline-safe cmdlets for Web API integration in PowerShell?▼

Implement pipeline-safe cmdlets by using parameter sets, defining output types, and routing Web API calls through Invoke-SafeguardMethod to maintain strict coding conventions.

Does safeguard-ps module development support Windows PowerShell 5.1 compatibility?▼

Yes, safeguard-ps module development enforces Windows PowerShell 5.1 compatibility, requiring local helper imports and CI-safe versioning constraints to ensure cross-environment execution.

Why does my PowerShell module manifest fail to export new cmdlets correctly?▼

Your PowerShell module manifest fails because new cmdlets must be explicitly added to the FunctionsToExport array in src/safeguard-ps.psd1 alongside registering the feature module in NestedModules.

What are the code standards for resolving helpers in PowerShell psm1 files?▼

Code standards for resolving helpers require using local helper import patterns within your src/<feature>.psm1 file rather than relying on global scope resolution.

When do I need to update the module manifest for a new psm1 file?▼

You need to update the module manifest whenever you add a new psm1 file, ensuring the NestedModules list and FunctionsToExport array reflect the new module and its public cmdlets.