en un clic
powershell
// PowerShell cmdlet conventions for this project. Apply when writing or reviewing any .ps1 or module file.
// PowerShell cmdlet conventions for this project. Apply when writing or reviewing any .ps1 or module file.
Autonomously optimize any Claude Code skill by running it repeatedly, scoring outputs against binary evals, mutating the prompt, and keeping improvements. Based on Karpathy's autoresearch methodology. Use when: optimize this skill, improve this skill, run autoresearch on, make this skill better, self-improve skill, benchmark skill, eval my skill, run evals on. Outputs: an improved SKILL.md, a results log, and a changelog of every mutation tried.
Workflow for generating conventional commit messages following the Conventional Commits specification. MUST be invoked every time a commit is created. Guides construction of standardized commit messages with correct type, scope, description, body, and footer.
Go coding standards and conventions for this project. Apply when writing, reviewing, or refactoring any Go source file.
Enforce Vale prose checks on any user-facing text the agent creates or edits — comments, documentation, status messages, release notes, READMEs, or any explanatory content that users will read. Always use this skill when producing or changing prose, even when Vale is not explicitly requested.
Markdown formatting rules for this project. Apply when writing or editing any .md or .mdx file, including documentation and website content.
| name | powershell |
| description | PowerShell cmdlet conventions for this project. Apply when writing or reviewing any .ps1 or module file. |
Verb-Noun Format:
Parameter Names:
Variable Names:
Alias Avoidance:
function Get-UserProfile {
[CmdletBinding()]
param(
[Parameter(Mandatory)]
[string]$Username,
[Parameter()]
[ValidateSet('Basic', 'Detailed')]
[string]$ProfileType = 'Basic'
)
process {
# Logic here
}
}
Standard Parameters:
Path, Name, Force)Parameter Names:
Type Selection:
Switch Parameters:
function Set-ResourceConfiguration {
[CmdletBinding()]
param(
[Parameter(Mandatory)]
[string]$Name,
[Parameter()]
[ValidateSet('Dev', 'Test', 'Prod')]
[string]$Environment = 'Dev',
[Parameter()]
[switch]$Force,
[Parameter()]
[ValidateNotNullOrEmpty()]
[string[]]$Tags
)
process {
# Logic here
}
}
Pipeline Input:
ValueFromPipeline for direct object inputValueFromPipelineByPropertyName for property mappingOutput Objects:
Pipeline Streaming:
PassThru Pattern:
-PassThru switch for object return-PassThrufunction Update-ResourceStatus {
[CmdletBinding()]
param(
[Parameter(Mandatory, ValueFromPipeline, ValueFromPipelineByPropertyName)]
[string]$Name,
[Parameter(Mandatory)]
[ValidateSet('Active', 'Inactive', 'Maintenance')]
[string]$Status,
[Parameter()]
[switch]$PassThru
)
begin {
Write-Verbose "Starting resource status update process"
$timestamp = Get-Date
}
process {
# Process each resource individually
Write-Verbose "Processing resource: $Name"
$resource = [PSCustomObject]@{
Name = $Name
Status = $Status
LastUpdated = $timestamp
UpdatedBy = $env:USERNAME
}
# Only output if PassThru is specified
if ($PassThru) {
Write-Output $resource
}
}
end {
Write-Verbose "Resource status update process completed"
}
}
ShouldProcess Implementation:
[CmdletBinding(SupportsShouldProcess = $true)]ConfirmImpact level$PSCmdlet.ShouldProcess() for system changesShouldContinue() for additional confirmationsMessage Streams:
Write-Verbose for operational details with -VerboseWrite-Warning for warning conditionsWrite-Error for recoverable errors that allow execution to continuethrow for fatal errors that stop executionWrite-Host except for user interface textError Handling Pattern:
Non-Interactive Design:
Read-Host in scriptsfunction Remove-UserAccount {
[CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = 'High')]
param(
[Parameter(Mandatory, ValueFromPipeline)]
[ValidateNotNullOrEmpty()]
[string]$Username,
[Parameter()]
[switch]$Force
)
begin {
Write-Verbose "Starting user account removal process"
$ErrorActionPreference = 'Stop'
}
process {
try {
# Validation
if (-not (Test-UserExists -Username $Username)) {
Write-Error "User account '$Username' not found"
return
}
# Confirmation
$shouldProcessMessage = "Remove user account '$Username'"
if ($Force -or $PSCmdlet.ShouldProcess($Username, $shouldProcessMessage)) {
Write-Verbose "Removing user account: $Username"
# Main operation
Remove-ADUser -Identity $Username -ErrorAction Stop
Write-Warning "User account '$Username' has been removed"
}
}
catch [Microsoft.ActiveDirectory.Management.ADException] {
Write-Error "Active Directory error: $_"
throw
}
catch {
Write-Error "Unexpected error removing user account: $_"
throw
}
}
end {
Write-Verbose "User account removal process completed"
}
}
Comment-Based Docs: Include comment-based documentation for any public-facing function or cmdlet. Inside the function,
add a <# ... #> block with at least:
.SYNOPSIS Brief description.DESCRIPTION Detailed explanation.EXAMPLE sections with practical usage.PARAMETER descriptions.OUTPUTS Type of output returned.NOTES Additional informationConsistent Formatting:
Pipeline Support:
Avoid Aliases: Use full cmdlet names and parameters
Where-Object instead of ? or whereForEach-Object instead of %Get-ChildItem instead of ls or dirfunction New-Resource {
[CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = 'Medium')]
param(
[Parameter(Mandatory = $true,
ValueFromPipeline = $true,
ValueFromPipelineByPropertyName = $true)]
[ValidateNotNullOrEmpty()]
[string]$Name,
[Parameter()]
[ValidateSet('Development', 'Production')]
[string]$Environment = 'Development'
)
begin {
Write-Verbose "Starting resource creation process"
}
process {
try {
if ($PSCmdlet.ShouldProcess($Name, "Create new resource")) {
# Resource creation logic here
Write-Output ([PSCustomObject]@{
Name = $Name
Environment = $Environment
Created = Get-Date
})
}
}
catch {
Write-Error "Failed to create resource: $_"
}
}
end {
Write-Verbose "Completed resource creation process"
}
}