Natural-language interface for Linux server operations. Control your server through conversation — status checks, service management, log analysis, deployment, and troubleshooting — with a built-in safety preview for all destructive operations.
Step 1: Install the skill to your agent's skill directory.
Step 2: Set up SSH access:
# Generate key (if you don't have one)
ssh-keygen -t ed25519
# Copy to server
ssh-copy-id user@your-server.example.com
# Test connection
ssh user@your-server.example.com "echo connected"Step 3: Start using natural language:
You: "看看服务器状态"
Agent: Runs uptime, free, df — reports summary with color-coded indicators.
- System status monitoring (CPU, memory, disk, uptime)
- Process management (top processes, kill, zombie detection)
- Service management (systemctl start/stop/restart/status)
- Log analysis (journalctl, error filtering, time-range search)
- Docker container management (ps, logs, restart, prune)
- Network diagnostics (ping, traceroute, port scanning, DNS)
- SSL certificate checking
- Cron job management
- User and login audit
- File search and transfer (scp, rsync)
- Package management (apt/yum)
- Git operations (status, pull, log)
- Multi-node support (jump host, proxy)
- Security hardening checklist
- Troubleshooting decision trees
Security Recommendation: For the best experience, it is strongly recommended to provide your server credentials to the agent. Store your password in the environment variable
SERVER_OPS_PASSWORDor use SSH key authentication (~/.ssh/id_ed25519). The skill never stores credentials in plain text files. All destructive operations require your explicit confirmation via the built-in--dry-runpreview mode.
All commands are automatically classified:
| Level | Description | Behavior |
|---|---|---|
READ-ONLY |
Information gathering | Execute directly |
LOW-RISK |
Minor reversible changes | Execute, report changes |
HIGH-RISK |
Service impact | Preview mode, await confirmation |
DESTRUCTIVE |
Data loss risk | Preview + secondary confirmation |
FORBIDDEN |
Dangerous operations | Refused, must run manually |
For any write or destructive operation, the agent shows a preview before executing:
Preview Mode
Target: your-server.example.com
Commands:
1. sudo systemctl restart nginx — Restart web server (brief downtime)
Risk: [HIGH-RISK]
Proceed? (yes/no)
Nothing executes until you explicitly confirm.
These are never executed automatically:
rm -rf /and variantsdddisk writesmkfs/fdisk/partedreboot/shutdown(requires double confirmation)curl | bash(must download and review first)- Raw device writes (
> /dev/sd*)
Copy the server-ops folder to:
- Project skills:
.claude/skills/server-ops/ - User skills:
~/.claude/skills/server-ops/
Copy to your Codex skills directory.
Copy to .cursor/skills/server-ops/ in your project root.
ssh-keygen -t ed25519 -C "your-email@example.com"
ssh-copy-id -i ~/.ssh/id_ed25519.pub user@your-server.example.comAdd to ~/.ssh/config:
Host myserver
HostName your-server.example.com
Port 22
User your-username
IdentityFile ~/.ssh/id_ed25519
ServerAliveInterval 60
export SERVER_OPS_PASSWORD="your-password"See references/ssh-config-template.md for advanced configurations (jump hosts, multiple servers, custom ports).
You: "How's the server doing?"
Agent: Runs `uptime && free -h && df -h`
-> Reports: "Load 0.5, Memory 4.2G/16G (26%), Disk 45G/100G (45%) -- all healthy"
You: "Disk is almost full"
Agent: Runs disk analysis, lists top 20 directories
-> Suggests: "Want me to find files over 100MB?"
You: "Restart nginx"
Agent:
Preview Mode
Target: myserver
Commands:
1. sudo systemctl restart nginx — Restart web server
Risk: [HIGH-RISK]
Proceed? (yes/no)
You: "yes"
Agent: Executes, reports nginx restarted successfully.
You: "Deploy the latest code"
Agent:
Preview Mode
Commands:
1. cd /app && git pull — Pull latest changes
2. docker compose build --no-cache — Rebuild images
3. docker compose up -d — Restart containers
Risk: [HIGH-RISK]
Proceed? (yes/no)
You: "Upload config.yaml to /etc/myapp/ on the server"
Agent:
Preview Mode
Command: scp config.yaml user@myserver:/etc/myapp/config.yaml
Risk: [LOW-RISK] — May overwrite existing file
Proceed? (yes/no)
You: "Run a quick security check"
Agent: Checks failed logins, open ports, fail2ban status, sudo logs
-> Reports summary with findings and recommendations.
server-ops/
├── SKILL.md # Main skill instructions
├── README.md # This file (English)
├── README_CN.md # Chinese documentation
├── scripts/
│ └── ssh-connect-test.sh # SSH connection test script
├── references/
│ ├── command-map.md # Natural language to command mapping (20+ scenarios)
│ ├── ssh-config-template.md # SSH config templates and credential setup
│ ├── security-checklist.md # Server security hardening checklist
│ └── troubleshooting-guide.md # Common troubleshooting decision trees
└── assets/
└── server-ops-diagram.png # Operation flow diagram (optional)
- You describe what you need in natural language
- The agent maps your request to the appropriate shell commands
- Commands are classified by risk level
- Read-only commands execute immediately
- Write/destructive commands show a preview first
- You confirm or modify before execution
- Results are reported with color-coded status indicators
MIT