powershell-skill
Execute PowerShell commands on Windows systems with security constraints
When & Why to Use This Skill
The powershell-skill is a specialized Claude agent tool designed for the secure execution of PowerShell commands on Windows environments. It empowers AI agents to perform automated system diagnostics, file system management, and real-time service monitoring while maintaining strict security boundaries through whitelisted cmdlets and execution constraints.
Use Cases
- System Diagnostics & Auditing: Automatically gathering hardware specifications, OS details, and system configurations using Get-ComputerInfo for IT support.
- Infrastructure Monitoring: Checking the status of critical Windows services and active processes to ensure system health and uptime.
- Automated File Management: Querying directory structures, verifying file existence, and managing local storage paths during automated workflows.
- IT Runbook Automation: Executing routine administrative tasks such as time-sync checks and system environment queries to streamline technical support operations.
| name | powershell-skill |
|---|---|
| description | Execute PowerShell commands on Windows systems with security constraints |
| version | 1.0.0 |
| author | Agent Skills Template |
Purpose
This skill allows the agent to execute safe PowerShell commands for:
- System information gathering (Get-ComputerInfo, Get-Process)
- File system queries (Get-ChildItem, Test-Path)
- Date/time operations (Get-Date)
- Service status checks (Get-Service)
When to Use
- User requests system information
- Need to check file existence or directory contents
- Querying running processes or services
- Getting current date, time, or location
Instructions
- Validate Intent: Ensure the user's request is safe and appropriate
- Review Security: Check security.md for constraints before execution
- Use Allowed Cmdlets: Only use cmdlets from the whitelist
- Explain Actions: Tell the user what command you're running and why
- Handle Errors: If execution fails, explain the error clearly
Parameters
command(string, required): The PowerShell command to executetimeout(int, optional): Maximum execution time in seconds (default: 10)
Example Usage
from skills.powershell import execute
# Get current date
result = execute('Get-Date')
if result['success']:
print(result['output'])
# List directory contents
result = execute('Get-ChildItem -Path C:\\Users')
Additional Context
- See reference.md for PowerShell cmdlet documentation
- See security.md for security boundaries and constraints