Skip to content
Back to skills

Powershell New Module

ASecurity

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.

  • 24 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added November 16, 2026
ai-agentsshellgitperformance

Security analysis

A100/100

Scanned November 18, 2026

npx -y skills add fadwen/ai-powershell-standards --skill powershell-new-module --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Powershell New Module?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Powershell New Module
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/fadwen-powershell-new-module/badge)](https://www.skillsdirectory.com/skills/fadwen-powershell-new-module)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.