PowerShell naming conventions and organization best practices. Covers Verb-Noun functions, variable naming, module structure, and documentation standards.
Provides PowerShell naming conventions and organization best practices. Claude will use this when creating or reviewing PowerShell scripts to ensure proper Verb-Noun function naming, camelCase variables, and correct module structure.
/plugin marketplace add theflysurfer/claude-skills-marketplace/plugin install theflysurfer-claude-skills-marketplace@theflysurfer/claude-skills-marketplaceThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Ce document définit les conventions de nommage et d'organisation pour les projets PowerShell, garantissant cohérence, maintenabilité et scalabilité.
PowerShell-Project/
├── Core/ # Scripts essentiels et infrastructure
├── Modules/ # Modules PowerShell organisés
├── Scripts/ # Scripts par domaine fonctionnel
│ ├── Administration/ # Scripts d'administration système
│ ├── Development/ # Outils de développement
│ ├── Network/ # Scripts réseau
│ ├── Security/ # Scripts sécurité
│ └── Utilities/ # Utilitaires génériques
├── Config/ # Fichiers de configuration
├── Templates/ # Templates et modèles
├── Tests/ # Tests automatisés
├── Docs/ # Documentation
└── Resources/ # Ressources (JSON, XML, etc.)
Format : Verb-Noun-Context.ps1
# CORRECT
Get-SystemInfo.ps1
Set-EnvironmentPath.ps1
Start-ServiceMonitor.ps1
Remove-TempFiles.ps1
Test-NetworkConnectivity.ps1
Backup-UserProfiles.ps1
# ÉVITER
get_system_info.ps1 # snake_case
systemInfo.ps1 # camelCase
SystemInformationScript.ps1 # trop long
sys-info.ps1 # pas descriptif
GetSysInfo.ps1 # PascalCase sans tiret
Format : ModuleName.psm1 (PascalCase)
# CORRECT
SystemAdministration.psm1
NetworkUtilities.psm1
SecurityTools.psm1
DatabaseConnector.psm1
# ÉVITER
system_admin.psm1
networkUtils.psm1
security-tools.psm1
Format : Verb-Noun (verbes approuvés PowerShell)
# CORRECT - Verbes approuvés
function Get-UserPermissions { }
function Set-NetworkConfiguration { }
function Start-BackupProcess { }
function Stop-RunningServices { }
function Test-DatabaseConnection { }
function New-SecurityPolicy { }
function Remove-TempDirectories { }
function Update-SystemConfiguration { }
# ÉVITER - Verbes non-standard
function Fetch-UserData { } # Utiliser Get-
function Configure-Network { } # Utiliser Set-
function Launch-Application { } # Utiliser Start-
function Destroy-TempFiles { } # Utiliser Remove-
Données :
Get-, Set-, Clear-, Copy-, Move-, Remove-Lifecycle :
New-, Start-, Stop-, Restart-, Suspend-, Resume-Diagnostic :
Test-, Trace-, Measure-, Debug-, Repair-Sécurité :
Block-, Grant-, Revoke-, Protect-, Unprotect-Changements :
Add-, Update-, Install-, Uninstall-, Register-, Unregister-Format : camelCase
# CORRECT
$userName = "admin"
$connectionString = "Server=localhost"
$maxRetryCount = 3
$isConfigurationValid = $true
$systemServices = Get-Service
# ÉVITER
$UserName = "admin" # PascalCase pour locales
$connection_string = "..." # snake_case
$max-retry-count = 3 # kebab-case
Format : PascalCase avec préfixe explicite
# CORRECT
$Global:ApplicationSettings = @{}
$Global:ModuleConfiguration = @{}
$Global:SystemEnvironment = @{}
$Script:ModulePrivateData = @{}
# ÉVITER
$Global:settings = @{} # camelCase pour globales
$appConfig = @{} # sans préfixe Global
Format : UPPER_CASE
# CORRECT
$env:POWERSHELL_PROFILE_LOADED = "1"
$env:APPLICATION_LOG_LEVEL = "INFO"
$env:DATABASE_CONNECTION_TIMEOUT = "30"
Format : PascalCase
function Get-UserInformation {
[CmdletBinding()]
param(
[Parameter(Mandatory = $true)]
[string]$UserName,
[Parameter(Mandatory = $false)]
[string]$DomainName = "localhost",
[switch]$IncludeGroups,
[ValidateRange(1, 100)]
[int]$MaxResults = 50
)
}
Format : [Domaine][Action] (2-4 caractères)
# Navigation
Set-Alias -Name "nf" -Value "Navigate-ToFolder"
Set-Alias -Name "nh" -Value "Navigate-ToHome"
# Recherche
Set-Alias -Name "sf" -Value "Search-Files"
Set-Alias -Name "sc" -Value "Search-Content"
# Système
Set-Alias -Name "ss" -Value "Show-SystemStatus"
Set-Alias -Name "sl" -Value "Show-SystemLogs"
Format : UPPER_CASE avec préfixe de module
$MODULE_VERSION = "1.0.0"
$DEFAULT_TIMEOUT = 30
$MAX_RETRY_ATTEMPTS = 3
$LOG_LEVEL_DEBUG = "DEBUG"
<#
.SYNOPSIS
Description courte et précise du script (max 80 caractères)
.DESCRIPTION
Description détaillée du script, de son fonctionnement et de ses objectifs.
Explique les dépendances, les prérequis et les effets de bord.
.PARAMETER ParameterName
Description détaillée du paramètre et de son utilisation
.EXAMPLE
Script-Name -Parameter "Value"
Description du résultat attendu
.NOTES
Author: Nom de l'auteur
Version: X.Y.Z
Created: YYYY-MM-DD
Last Updated: YYYY-MM-DD
Dependencies: Liste des dépendances requises
#>
Verb-Noun# Obtenir la liste complète des verbes approuvés
Get-Verb | Sort-Object Verb | Format-Table -AutoSize
# Vérifier si un verbe est approuvé
$verb = "Configure"
if ($verb -notin (Get-Verb).Verb) {
Write-Warning "Verbe non-standard: $verb"
Write-Host "Verbes suggérés: Set, Update, Install"
}
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.