Agent skill
powershell-skill
Execute PowerShell commands on Windows systems with security constraints
Install this agent skill to your Project
npx add-skill https://github.com/hpppm/lab-agent-skills-design/tree/main/skills/examples
SKILL.md
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
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
migrate-to-shoehorn
Migrate test files from `as` type assertions to @total-typescript/shoehorn. Use when user mentions shoehorn, wants to replace `as` in tests, or needs partial test data.
obsidian-vault
Search, create, and manage notes in the Obsidian vault with wikilinks and index notes. Use when user wants to find, create, or organize notes in Obsidian.
handoff
Compact the current conversation into a handoff document for another agent to pick up.
edit-article
Edit and improve articles by restructuring sections, improving clarity, and tightening prose. Use when user wants to edit, revise, or improve an article draft.
setup-pre-commit
Set up Husky pre-commit hooks with lint-staged (Prettier), type checking, and tests in the current repo. Use when user wants to add pre-commit hooks, set up Husky, configure lint-staged, or add commit-time formatting/typechecking/testing.
git-guardrails-claude-code
Set up Claude Code hooks to block dangerous git commands (push, reset --hard, clean, branch -D, etc.) before they execute. Use when user wants to prevent destructive git operations, add git safety hooks, or block git push/reset in Claude Code.
Didn't find tool you were looking for?