其他技能
powershell-module-help
Generate, update, validate, or build PowerShell module help with Microsoft.PowerShell.PlatyPS, where help is written as Markdown and shipped as compiled external help. Use when asked to document a module's commands, update help after a parameter change, or fix Get-Help output for a module.
fadwen · 已有静态检查记录
安装与使用
运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。
npx skills add fadwen/ai-powershell-standards --skill powershell-module-help技能说明
name: powershell-module-help description: Generate, update, validate, or build PowerShell module help with Microsoft.PowerShell.PlatyPS, where help is written as Markdown and shipped as compiled external help. Use when asked to document a module's commands, update help after a parameter change, or fix Get-Help output for a module.
Maintain module help with PlatyPS
Read .github/instructions/powershell-platyps.instructions.md first, unless it is already loaded. It
holds the rules and every command used below.
Steps
- Confirm the tool.
Get-Module -ListAvailable Microsoft.PowerShell.PlatyPSmust show version 1.0.3 or later. Do not use the retiredplatyPSmodule or its commands. - Find the state of the module's help: whether
docs/<ModuleName>/exists, which exported commands have a Markdown file, and whether the exported functions carry.EXTERNALHELP. - For a command with no Markdown yet: make sure the function has complete comment-based help, run
New-MarkdownCommandHelpwith-Locale, and only then add.EXTERNALHELPand reduce the comment block to a one-line.SYNOPSIS. The order matters. - For a command whose parameters changed: import the module and run
Update-MarkdownCommandHelp, then update the module page. Do not edit syntax blocks or parameter metadata by hand. - Write the content. Replace every
{{ Fill in ... }}placeholder, put each example's command in a fencedpowershellblock, and describe only what the command does. - Validate with the checks in the PlatyPS rules: structure, leftover placeholders, and relative links.
- Build the compiled help with
Export-MamlCommandHelp, copy it into the module's culture folder, and confirm withGet-Help <Command> -Fullagainst the imported module that the text and the examples appear. Before a release, repeat the check against the packaged module on a case-sensitive file system (PLT-14).
Report
List the Markdown files you created or changed, the result of each validation, and what Get-Help
showed. Mention any command whose description or examples you could not write from the code alone,
and ask the user for the missing facts instead of inventing them.