AgentStack
SKILL verified MIT Self-run

Server Admin Skill

skill-z5research-server-admin-skill-server-admin-skill · by Z5Research

A Claude skill from Z5Research/server-admin-skill.

No reviews yet
0 installs
2 views
0.0% view→install

Install

$ agentstack add skill-z5research-server-admin-skill-server-admin-skill

✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access Used
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

Are you the author of Server Admin Skill? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Server Admin Skill

> Universal Server Administration Skill for AI Agents | Version 1.0.1


Overview

This skill enables AI agents to manage Linux servers efficiently, including:

  • System monitoring and maintenance
  • Service deployment (Nginx, Docker, Node.js)
  • User and permission management
  • Troubleshooting and diagnostics
  • Security hardening
  • Multi-agent collaboration framework

🆕 Version 1.0.1 Updates

  • Added Server Management Regulations template for multi-agent collaboration
  • Added Operation Log framework for tracking all agent actions
  • Added Port Registry system for port allocation management
  • Added Agent Registry template for managing multiple agents

Configuration

Before using this skill, configure the following parameters:

# config.yaml (local, not committed)
server:
  host: YOUR_SERVER_IP
  user: YOUR_ADMIN_USER
  password: YOUR_PASSWORD  # Or use SSH key

paths:
  web_root: /www/wwwroot/
  nginx_config: /etc/nginx/
  backup_dir: /www/backup/

agent:
  name: YOUR_AGENT_NAME
  user: YOUR_AGENT_USER  # e.g., z6
  web_dir: /www/wwwroot/YOUR_AGENT_USER/
  port_range: 3000-3199

Login Methods

Admin Login

# Password authentication
ssh YOUR_ADMIN_USER@YOUR_SERVER_IP

# SSH key authentication (recommended)
ssh -i ~/.ssh/YOUR_KEY YOUR_ADMIN_USER@YOUR_SERVER_IP

Agent Login (Restricted)

# Agent uses dedicated account with limited permissions
ssh -i ~/.skills/YOUR_SKILL/agent_key YOUR_AGENT_USER@YOUR_SERVER_IP

System Monitoring

Resource Monitoring

htop                          # Interactive process viewer
df -h                         # Disk usage
free -h                       # Memory usage
uptime                        # System uptime
cat /proc/cpuinfo             # CPU info

Service Status

systemctl status nginx        # Nginx status
systemctl status docker       # Docker status
docker ps -a                  # Container list
netstat -tlnp                 # Listening ports

Log Analysis

# System logs
sudo tail -f /var/log/syslog

# Nginx logs
sudo tail -f /var/log/nginx/access.log
sudo tail -f /var/log/nginx/error.log

# Docker logs
docker logs -f CONTAINER_NAME

# Systemd service logs
sudo journalctl -u SERVICE_NAME -f

Nginx Management

Common Commands

sudo nginx -t                 # Test configuration
sudo systemctl reload nginx   # Reload configuration
sudo systemctl restart nginx  # Restart service
sudo nginx -T                 # View full configuration

Site Configuration Template

# /etc/nginx/sites-available/YOUR_APP.conf
server {
    listen 80;
    server_name YOUR_DOMAIN;

    location /YOUR_APP/ {
        alias /www/wwwroot/YOUR_APP/;
        index index.html;
        try_files $uri $uri/ /YOUR_APP/index.html;
    }

    location /YOUR_APP/api/ {
        proxy_pass http://127.0.0.1:YOUR_PORT/api/;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade;
    }
}

Enable Site

sudo ln -sf /etc/nginx/sites-available/YOUR_APP.conf /etc/nginx/sites-enabled/
sudo nginx -t && sudo systemctl reload nginx

Docker Management

Common Commands

docker ps -a                  # List containers
docker images                 # List images
docker logs -f NAME           # View logs
docker exec -it NAME sh       # Enter container
docker restart NAME           # Restart container
docker stop NAME              # Stop container
docker rm NAME                # Remove container

Deployment

# Build and save image (local)
docker build -t APP_NAME:VERSION .
docker save APP_NAME:VERSION | gzip > APP_NAME.tar.gz

# Upload and load (server)
scp APP_NAME.tar.gz USER@SERVER:/tmp/
ssh USER@SERVER "docker load  backup.sql

# Restore
mysql -u root -p DATABASE  APP.tar.gz
scp APP.tar.gz USER@SERVER:/tmp/

# 3. Load and run on server
ssh USER@SERVER "docker load < /tmp/APP.tar.gz && docker run -d --name APP -p PORT:8080 APP:VERSION"

# 4. Configure Nginx proxy
# Add location block to Nginx config

Troubleshooting

Common Issues

| Symptom | Check | Solution | |---------|-------|----------| | 502 Bad Gateway | docker ps | Restart container | | 403 Forbidden | ls -la | Fix permissions | | 404 Not Found | nginx -T | Check location config | | Disk Full | df -h | Clean up logs/cache | | Memory Low | free -h | Kill processes or add swap | | Connection Refused | netstat -tlnp | Check service/port |

Diagnostic Commands

# Network connectivity
ping DOMAIN
curl -I URL
telnet HOST PORT

# Process analysis
ps aux | grep PROCESS
lsof -i :PORT

# Disk analysis
du -sh /path/*
find /path -size +100M

# Permission check
namei -l /path/to/file

Security Checklist

  • [ ] Disable password authentication for SSH
  • [ ] Use SSH keys for all logins
  • [ ] Configure firewall (ufw/iptables)
  • [ ] Keep packages updated (apt update && apt upgrade)
  • [ ] Use non-root users for services
  • [ ] Enable HTTPS (Let's Encrypt)
  • [ ] Set up log rotation
  • [ ] Configure fail2ban
  • [ ] Regular backups
  • [ ] Monitor resources

File Structure

/path/to/skill/
├── SKILL.md              # This file
├── config.yaml           # Local configuration (not committed)
├── agent_key             # SSH key for agent user
├── agent_key.pub         # Public key
├── templates/            # Configuration templates
│   ├── nginx.conf.template
│   └── docker-compose.yml.template
└── scripts/              # Utility scripts
    ├── deploy.sh
    └── backup.sh

Best Practices

DO

  • Store passwords in local config.yaml (never commit)
  • Use SSH keys instead of passwords
  • Test Nginx config before reload
  • Monitor disk space regularly
  • Keep backups of important data
  • Document all changes

DON'T

  • Commit credentials to version control
  • Run services as root
  • Ignore security warnings
  • Skip testing before deployment
  • Leave unused ports open

Multi-Agent Collaboration

Management Regulations

When multiple AI agents share a server, establish clear rules:

| Priority | Rule | Description | |----------|------|-------------| | 🔴 P0 | No Sensitive Data | Never expose passwords, API keys, SSH keys in public docs | | 🔴 P0 | Notify Before Action | Log major operations (delete, config change, restart) | | 🔴 P0 | Dedicated Accounts | Each agent uses its own account with minimal permissions | | 🟡 P1 | Port Registration | Register new ports before use to avoid conflicts | | 🟡 P1 | Naming Convention | Service name: [agent]-[app]-[type] | | 🟡 P1 | Regular Backups | Backup important data to /www/backup/ | | 🟢 P2 | Log All Actions | Record operations in shared log for traceability | | 🟢 P2 | Resource Cleanup | Remove unused services, containers, files |

Port Allocation

| Agent | Port Range | Notes | |-------|------------|-------| | Agent-A | 3000-3099 | Primary agent | | Agent-B | 3100-3199 | Secondary agent | | Shared | 8080-8099 | Common services pool |

Operation Log Format

Time | Agent | Type | Action | Status

Types: deploy config create update delete

Example Template

See examples/server-management-regulations.html for a complete multi-agent management dashboard including:

  • Management rules
  • Agent registry
  • Port allocation
  • Operation log
  • Quick links

Version History

| Version | Date | Changes | |---------|------|---------| | 1.0.1 | 2026-03-27 | Added multi-agent collaboration framework | | 1.0.0 | 2026-03-27 | Initial release |


This skill is open source and can be customized for any AI agent.

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet — be the first.

Versions

  • v0.1.0 Imported from the upstream source.