Powershell skill

From zeenie-ai/OpenCompany · View interactive version

Powershell skill is an AI agent skill from the GitHub repository zeenie-ai/OpenCompany. Windows PowerShell commands and patterns for process management, file operations, and system administration.

How to use this skill

Skill file

PowerShell Skill (Windows)

Use this skill when the host system is Windows. Commands run via the process_manager tool (which has full PATH access).

Detect Windows

Before using PowerShell commands, verify the OS:

{"operation": "start", "name": "os-check", "command": "powershell -Command \"$env:OS\""}

If output contains Windows_NT, use this skill. Otherwise use the bash skill.

Process Manager parses an executable and arguments; it does not itself evaluate PowerShell grammar. Keep PowerShell syntax inside the explicit powershell -Command argument. Declare server listener ports; inspect the owner before stopping a process on a port.

Common Patterns

Run a PowerShell command

{"operation": "start", "name": "ps-cmd", "command": "powershell -NoProfile -Command \"Get-Process | Sort-Object CPU -Descending | Select-Object -First 10\""}

Install packages

{"operation": "start", "name": "npm-install", "command": "npm install express"}
{"operation": "start", "name": "pip-install", "command": "pip install flask"}

Start a dev server

{"operation": "start", "name": "dev-server", "command": "npm run dev", "ports": [3000]}

Check what's running on a port

{"operation": "start", "name": "port-check", "command": "powershell -Command \"Get-NetTCPConnection -LocalPort 3000 -ErrorAction SilentlyContinue | Select-Object OwningProcess\""}

List files recursively

{"operation": "start", "name": "find-files", "command": "powershell -Command \"Get-ChildItem -Recurse -Filter *.py | Select-Object FullName\""}

Environment variables

{"operation": "start", "name": "env", "command": "powershell -Command \"$env:PATH -split ';'\""}

Kill a process by port

{"operation": "start", "name": "kill-port", "command": "powershell -Command \"Stop-Process -Id (Get-NetTCPConnection -LocalPort 8080).OwningProcess -Force\""}

Download a file

{"operation": "start", "name": "download", "command": "powershell -Command \"Invoke-WebRequest -Uri 'https://example.com/file.zip' -OutFile 'file.zip'\""}

Key Differences from Bash

| Task | Bash | PowerShell |

|------|------|------------|

| List files | ls -la | Get-ChildItem or dir |

| Find files | find . -name "*.py" | Get-ChildItem -Recurse -Filter *.py |

| Environment | echo $PATH | $env:PATH |

| Process list | ps aux | Get-Process |

| Kill process | kill -9 PID | Stop-Process -Id PID -Force |

| Download | curl -O url | Invoke-WebRequest -Uri url -OutFile file |

| Grep | grep pattern file | Select-String -Pattern pattern -Path file |

Guidelines

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.