powershell-module-builder

Convert standalone PowerShell scripts into structured modules with manifests and organized folders.

Updated Feb 8, 2026
One-click install
npx skills add https://github.com/MartiXDev/ai-dev-strategy --skill powershell-module-builder-martixdev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: powershell-module-builder
Source: https://github.com/MartiXDev/ai-dev-strategy/tree/main/custom/PowerShell/skills/powershell-module-builder
Command: npx skills add https://github.com/MartiXDev/ai-dev-strategy --skill powershell-module-builder-martixdev

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Scattered standalone .ps1 scripts are hard to distribute, version, and maintain. This Skill converts them into proper PowerShell modules with a manifest, Public/Private folder organization, and controlled function exports, ready for team sharing or PowerShell Gallery publication. ## Core Features & Use Cases - Module Structure Generation: Creates the standard layout with .psd1 manifest, .psm1 root module, and Public/Private/Tests folders. - Function Organization: Splits multi-function scripts into one file per function and separates exported public functions from internal private helpers. - Manifest & Validation: Generates the module manifest with New-ModuleManifest and validates it using Test-ModuleManifest, Import-Module, and PSScriptAnalyzer. - Use Case: You have an AzureTools.ps1 script mixing user-facing commands with internal helpers. Use this Skill to split it into an AzureTools module where only Get-AzureReport is exported and the helpers stay private. ## Quick Start Convert my standalone PowerShell script AzureTools.ps1 into a proper module with a manifest and Public and Private folders.

Frequently Asked Questions about powershell-module-builder

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

FAQPage Schema
How do I convert a PowerShell script into a module?

Split each function into its own file, place exported functions in a Public folder and helpers in Private, then create a .psm1 root module that dot-sources all files and a .psd1 manifest with New-ModuleManifest listing FunctionsToExport.

What is the difference between Public and Private functions in a PowerShell module?

Public functions are exported via Export-ModuleMember and form the user-facing API, while Private functions are internal helpers loaded by the .psm1 but not exported. Filenames should match function names, one function per file.

How do I create a PowerShell module manifest (.psd1)?

Use New-ModuleManifest with parameters like RootModule, ModuleVersion, Author, Description, PowerShellVersion, and FunctionsToExport. For Gallery publication also include Tags, ProjectUri, and LicenseUri.

How do I test a PowerShell module before publishing?

Run Test-ModuleManifest to validate the manifest, import the module with Import-Module -Force, verify exports with Get-Command -Module, and run Pester tests plus Invoke-ScriptAnalyzer for code quality.

When should I not use this module conversion approach?

This Skill is for converting existing scripts, not designing new modules from scratch. For greenfield module design, use a PowerShell expert agent or design guidance instead of a conversion workflow.