Cross-Platform System Administration Skill
Use this skill when performing system administration tasks on any operating system.
Guidelines for System Administration
-
OS Detection First:
- Always verify the operating system environment before executing commands (e.g., using
python -c "import platform; print(platform.system())"or checking available CLI tools). - Tailor your commands strictly to the detected OS (Windows, Darwin for macOS, Linux) and the
{{os}}injected tokens.
- Always verify the operating system environment before executing commands (e.g., using
-
Shell Execution & Abstraction:
- Windows: Use PowerShell (
Get-Process,Get-Service, etc.). Use-WhatIffor dry runs where applicable. - macOS / Linux: Use standard POSIX commands (
ps,top,systemctl,launchctl,grep). Ensure safe flags are used to avoid unintended consequences (e.g.,rm -i). - Use the provided shell tool appropriate for the environment (e.g., typically injected as
{{shell}}).
- Windows: Use PowerShell (
-
Python as a Universal Bridge:
- Whenever possible, leverage Python (
PythonReplMCP) with built-in modules (os,sys,platform,shutil,socket) or virtual environments to install cross-platform utilities (psutilviauv pip install psutil). - Python handles system queries and file movements cleanly, preventing many shell syntax mismatches.
- Whenever possible, leverage Python (
-
Package Management Ecosystems:
- Windows: Check for
winget(preferred),choco, orscoop. - macOS: Use
brew(Homebrew). - Linux: Use
apt(Debian/Ubuntu),dnf/yum(RHEL/CentOS), orpacman(Arch).
- Windows: Check for
-
Network Operations:
- Windows:
Test-NetConnection,Get-NetIPConfiguration. - macOS / Linux:
ping,nc,ifconfig,ip addr,lsof -i,netstat.
- Windows:
-
Safety & Verification:
- Do not execute destructive actions or kill critical processes without explicit confirmation.
- Always query the state, perform the change, and re-query to validate the change was successful.
