| name | xops-agent |
| description | Automate server O&M, execute batch commands, test network connectivity, transfer files, and manage host assets using the XOps CLI toolkit. Triggers when managing server clusters, performing concurrent tasks across multiple machines, checking network ports, or synchronizing configuration files. |
XOps CLI (IT Operations Automation Tool) Skill Guide
This skill empowers you to manage server clusters, execute batch tasks, and perform network security diagnostics via the XOps command-line tool (xops).
🎯 Environment Self-Check & Bootstrap Installation
Before attempting any operations, please run xops --version to check if the tool is installed.
If you receive a command not found error, instruct the user to execute the following installation command:
curl -sSL https://raw.githubusercontent.com/wentf9/xops-cli/main/install.sh | bash
🎯 Core Capabilities & Precise Command Usage
1. Host & Asset Management (xops host)
Manage the inventory of servers, credentials, and grouping tags.
2. Batch Execution (xops exec)
Run commands or local scripts concurrently across multiple targets.
3. Distributed File Transfer (xops scp)
Transfer files or directories between local and remote hosts.
4. Unified Firewall Management (xops firewall)
Abstracts different firewall backends (firewalld, ufw, iptables, nftables).
- List Rules for a Host:
xops firewall list -H "web-01"
- Manage Ports:
xops firewall port 80,81 -H "web-01" --reload
xops firewall port 80 --remove --proto udp -H "web-01"
xops firewall rule 80 192.168.0.1 -H "web-01"
5. Network & Security Tools
- Smart Ping (Supports ICMP and TCP port checks):
xops ping 1.1.1.1
xops ping 1.1.1.1 443
- Netcat (nc) (Port scanning):
xops nc -l 8080
echo "scan me" | xops nc 127.0.0.1 8080
- DNS Diagnostics:
xops dns "google.com"
- Data Encoding:
xops encode base64 "hello"
xops encode base64 --decode "aGVsbG8="
🛠️ Execution Principles & Safety Guardrails
- Host Verification: Before executing batch tasks on a tag, run
xops host list to verify which hosts will be affected.
- Non-Interactive Preference: Always prefer
xops exec and xops scp over xops ssh or xops tui for automation.
- High-Risk Operations: You MUST obtain explicit user confirmation via
ask_user before running destructive commands (e.g., rm -rf, format, systemctl stop) on multiple hosts.
- Credential Protection: NEVER print or log passwords/keys used in
xops host add commands.