From kagents
PowerShell Core module design — .psd1/.psm1 manifests, Public/Private/Handlers folder structure, dot-sourcing order, CmdletBinding, Set-StrictMode, cross-platform rules (no Write-Host, Join-Path), PSScriptAnalyzer. USE FOR: structuring new PowerShell modules, implementing cross-platform functions, writing CI scripts. DO NOT USE FOR: PowerShell tests (use pester-patterns) or GitHub Actions workflows (use github-actions-patterns).
npx claudepluginhub grexyloco/k.agents --plugin kagentsThis skill uses the workspace's default tool permissions.
```powershell
Expert guidance for Next.js Cache Components and Partial Prerendering (PPR). **PROACTIVE ACTIVATION**: Use this skill automatically when working in Next.js projects that have `cacheComponents: true` in their next.config.ts/next.config.js. When this config is detected, proactively apply Cache Components patterns and best practices to all React Server Component implementations. **DETECTION**: At the start of a session in a Next.js project, check for `cacheComponents: true` in next.config. If enabled, this skill's patterns should guide all component authoring, data fetching, and caching decisions. **USE CASES**: Implementing 'use cache' directive, configuring cache lifetimes with cacheLife(), tagging cached data with cacheTag(), invalidating caches with updateTag()/revalidateTag(), optimizing static vs dynamic content boundaries, debugging cache issues, and reviewing Cache Component implementations.
Guides building MCP servers enabling LLMs to interact with external services via tools. Covers best practices, TypeScript/Node (MCP SDK), Python (FastMCP).
Share bugs, ideas, or general feedback.
#Requires -Version 7.4
Set-StrictMode -Version Latest
$ErrorActionPreference = 'Stop'
ModuleName/
├── ModuleName.psd1 # Manifest
├── ModuleName.psm1 # Root Module (Dot-Sourcing)
├── Functions/
│ ├── Public/ # Exportierte Functions
│ └── Private/
│ └── Handlers/ # Sub-Kategorie für Spezialisten
├── Tests/
│ ├── ModuleName.Feature.Tests.ps1
│ └── FunctionName.Tests.ps1
├── .github/
│ ├── scripts/ # CI-Hilfsscripts
│ ├── workflows/
│ └── linters/
└── action.yml # GitHub Action Interface (optional)
Handlers → Private → Public (Abhängigkeitsrichtung):
$script:ModuleRoot = $PSScriptRoot
$handlerFunctions = @(Get-ChildItem -Path (Join-Path $script:ModuleRoot 'Functions' 'Private' 'Handlers') -Filter '*.ps1' -ErrorAction SilentlyContinue)
foreach ($file in $handlerFunctions) {
try { . $file.FullName; Write-Verbose "Loaded handler: $($file.BaseName)" }
catch { Write-Error "Failed to load '$($file.Name)': $_"; throw }
}
# dann Private, dann Public analog
Write-Host → Write-Output, Write-Verbose, Write-Information"$root\sub" → Join-Path $root 'sub'$env:USERPROFILE → $env:HOME\r\n → [Environment]::NewLineGet-WmiObject → Get-CimInstance-Encoding utf8$null -eq $variable (nicht umgekehrt)if ($env:GITHUB_OUTPUT) {
"output-name=$value" | Out-File -FilePath $env:GITHUB_OUTPUT -Append
}
[CmdletBinding()], Parameter-Validation.SYNOPSIS, .DESCRIPTION, .PARAMETER, .EXAMPLEShouldProcess bei destruktiven Operationen[PSCustomObject]@{ Passed = $true; Skipped = $false; Message = '...' }