Create a new PowerShell module with a manifest, a root module, Public and Private folders, a first function, and Pester tests, following this repository's PowerShell standards. Use when asked to create, scaffold, or start a PowerShell module.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Powershell New Module?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/fadwen-powershell-new-module)
---
name: powershell-new-module
description: Create a new PowerShell module with a manifest, a root module, Public and Private folders, a first function, and Pester tests, following this repository's PowerShell standards. Use when asked to create, scaffold, or start a PowerShell module.
---
# Create a new PowerShell module
Read these before writing files, unless they are already loaded:
- `.github/copilot-instructions.md`, or `AGENTS.md` if the repository has no such file (the core rules
and the function template)
- `.github/instructions/powershell-modules.instructions.md`
- `.github/instructions/powershell-version.instructions.md`
## Steps
1. Ask for, or confirm, the module name, what it is for, and whether it must run on Windows PowerShell
5.1. Without a 5.1 requirement, target PowerShell 7.6.
2. Create the layout from the module rules: `ModuleName.psd1`, `ModuleName.psm1`, `Public/`,
`Private/`, and `Tests/`, with the unit tests under `Tests/Unit/` (MOD-01). Add
`Tests/Integration/` and `Tests/Performance/` when the module has such tests, and `Classes/` only
if the module defines a class. Do not create empty folders for things the module does not have.
3. Write the manifest with literal values only. Generate the GUID once with `New-Guid` and paste the
result. Set `PowerShellVersion` and `CompatiblePSEditions` for the target. List exported functions
by name. Take `Author`, `CompanyName`, and the copyright holder from
`.github/powershell-attribution.md` when the project has one (DOC-18), and the project links from
the user or the repository; leave out what you do not know.
4. Write the root module exactly as the module rules show it: a `#Requires -Version` line that
matches the manifest's `PowerShellVersion` (MOD-08), strict mode, then `Classes`, `Private`, and
`Public` dot-sourced in that order, failing the import if a file fails to load.
5. Add the first function with the `powershell-new-function` skill, or follow its steps.
6. Import the module in a new session with `Import-Module ./ModuleName.psd1 -Force`, confirm that
`Get-Command -Module ModuleName` lists exactly the exported functions, and run the tests.
7. Add a `README.md` that follows `.github/instructions/powershell-readme.instructions.md`.
## Report
List the files you created, the target version, and the results of the import check and the tests. Do
not add dependencies or CI workflows unless the user asked for them; mention them as possible next
steps instead. Every module generates its command help with PlatyPS (PLT-10): do that with the
`powershell-module-help` skill, or say that it is still to do.