Structured remote server troubleshooting workflow that follows investigation-only practices until user approval. Use when Claude needs to diagnose issues on remote SSH-accessible servers including k8s clusters, bare metal, and containerized services. Covers service/port access problems, configuration issues, service startup failures, and performance/resource issues. Emphasizes creating helper scripts on remote server, obtaining user approval before fixes, script-based repairs, and generating comprehensive analysis reports.
Provides a structured workflow for troubleshooting issues on remote servers with emphasis on:
Before starting any investigation, gather:
Remote Server Access
Problem Description
Context
CRITICAL: Do NOT make any changes without user approval
Validate the reported issue actually exists:
sshpass -p<password> ssh -o StrictHostKeyChecking=no user@host "echo 'OK'"
ssh user@host "ss -tlnp | grep :<port>"
ssh user@host "systemctl status <service>"
ssh user@host "kubectl get pods -n <namespace>"
If issue cannot be reproduced, inform user and ask clarification.
ssh user@host "mkdir -p ~/troubleshoot-$(date +%Y%m%d)"
Generate and upload investigation scripts. Use scripts/generate_helper.sh.
Common scenarios: service status, ports, config inspection, logs.
Always execute investigation scripts, never modify actions.
Run helper scripts. Document:
Synthesize findings to identify root cause. Consider multiple hypotheses if unclear.
Present to user:
WAIT for user approval before proceeding to repair.
Script the fix procedure. Fix script MUST:
cat fix-script.sh | ssh user@host "bash -s"
Confirm fix resolved the issue:
Use assets/report-template.md to create analysis report.
See references/patterns.md for:
# Service
systemctl status <service>
systemctl is-active <service>
# Port
ss -tlnp | grep :<port>
# Process
ps aux | grep <name>
# Logs
journalctl -u <service> -n 50 --no-pager
tail -f /var/log/<service>.log
# K8s
kubectl get pods -n <namespace>
kubectl describe pod <name> -n <namespace>
kubectl logs <pod> -n <namespace>
generate_helper.sh - Generate investigation helper scriptsgenerate_fix.sh - Generate fix script templatesnpx skills add iceleaf916/remote-troubleshoot下载完整 Skill 目录,包含 SKILL.md 及所有相关文件
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer