A smart, persistent server health monitoring slash command for Claude Code that learns and remembers your server characteristics.
- Smart Discovery: Automatically identifies server type (web, database, application, mixed)
- Persistent Profiling: Remembers server characteristics for faster subsequent checks
- Optimized Checks: Runs targeted health checks based on server role
- Baseline Tracking: Tracks typical metrics for anomaly detection
- Quick & Full Modes: Fast checks for known servers, comprehensive scans when needed
curl -fsSL https://gist.githubusercontent.com/neilberget/[GIST-ID]/raw/install.sh | bash-
Create directories:
mkdir -p ~/.claude/commands ~/.claude/server-profiles
-
Download and save
check-server.mdto~/.claude/commands/ -
The command is ready to use in Claude Code!
/check-server <hostname>
/check-server play-db # Quick check using saved profile
/check-server play-db --full # Full discovery and comprehensive check
/check-server web-01 # First run will discover and profile
- Detects installed services (nginx, mysql, docker, etc.)
- Identifies server role (web, database, application, mixed)
- Creates a profile in
~/.claude/server-profiles/<hostname>.json - Runs comprehensive health check
- Loads saved profile
- Runs targeted checks specific to server type
- Updates metrics and profile
- Much faster than full discovery
{
"hostname": "play-db",
"type": "database",
"discovered_services": {
"webserver": "none",
"database": "mysql",
"runtime": "none",
"container": "none"
},
"optimized_checks": [
"mysql -e 'SHOW STATUS WHERE Variable_name IN (\"Threads_connected\", \"Slow_queries\");'"
],
"last_checked": "2025-08-22T15:20:00Z",
"typical_metrics": {
"avg_load": 0.10,
"avg_memory_used_gb": 0.7
}
}- Connection count and active queries
- Slow query analysis
- Database-specific performance metrics
- Replication status (if applicable)
- Service status and active connections
- Error rate from access logs
- SSL certificate status
- Disk space on web directories
- Process monitoring
- Runtime-specific checks (PHP-FPM, Node.js, Python)
- Queue sizes and background jobs
- Application logs
- Combines relevant checks from multiple types
- Custom commands based on discovered services
Use --full flag to re-profile a server:
/check-server hostname --full
Edit profiles directly at ~/.claude/server-profiles/<hostname>.json
Add commands to the optimized_checks array in server profiles.
~/.claude/
├── commands/
│ └── check-server.md # Command definition
└── server-profiles/
├── hostname1.json # Server profile
├── hostname2.json # Server profile
└── ...
Ensure the file is at ~/.claude/commands/check-server.md and restart Claude Code.
Verify SSH key authentication is configured for your servers.
Delete profile files in ~/.claude/server-profiles/ to force re-discovery.
Found a bug or want to add a feature? Create an issue or submit a pull request!
MIT License - Feel free to modify and distribute.