ascend/agent-skills/debug

Claude Code and agent skill by ascend/agent-skills

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

结构化远程服务器问题排查流程,支持上下文感知的环境检查和容器内调试

Install

npx vskill@latest install ascend/agent-skills/debug

SKILL.md

ssh-debug

概述

引导agent按结构化流程排查远程服务器问题,避免盲目执行命令。所有远程命令通过connect/scripts/ssh-exec.sh执行。

适用场景

  • 服务异常(进程崩溃、服务不可用)
  • 性能问题(CPU/内存/磁盘/GPU)
  • 部署失败排查
  • 容器内应用调试

流程步骤

1. 确认目标
  • 获取问题描述,确认profile和排查方向
  • 产出:profile名称 + 问题分类
2. 上下文感知环境检查
  • 读取本地工程文件推断依赖,动态生成检查项
  • 基础检查:uptime, df -h, free -m, top -bn1 | head -20
  • 按规则表执行额外检查
  • 产出:环境状态概览
3. 日志分析
  • 定位日志:journalctl -u <service> --since "1h ago", /var/log/
  • 搜索关键词:grep -i "error\|fatal\|exception" <log> | tail -50
  • 容器:docker logs <container> --tail 200

Token优化策略:

  • 日志分析:先用grep搜索错误关键词,找到问题再扩展上下文
  • 大日志文件:只读tail -50,不读全文
  • 环境检查:输出摘要,不粘贴完整命令结果
  • 产出:错误信息摘要
4. 深入排查
  • 根据线索执行针对性命令,每次验证一个假设
  • 检查配置文件、环境变量、依赖版本
  • 产出:根因或最可能原因
5. 总结报告
  • 输出发现(现象、根因、影响)和修复建议
  • 产出:结构化排查报告

上下文感知规则表

检测到的依赖额外检查命令
PyTorch / TensorFlownvidia-smi, GPU显存占用
华为 CANN / MindSporenpu-smi info, NPU状态
Docker / docker-composedocker ps -a, docker stats --no-stream
数据库连接配置连通性测试、活跃连接数

常用排查命令速查

场景命令
进程`ps aux \grep <app>, systemctl status <svc>`
资源df -h, free -m, `top -bn1 \head -20`
日志tail -100 <log>, journalctl -u <svc> --since "1h ago"
网络ss -tlnp, curl -sv localhost:<port>
容器docker logs <c> --tail 100, docker stats --no-stream
GPUnvidia-smi, npu-smi info

容器内调试

profile配置container字段时,ssh-exec.sh自动路由命令到容器内。注意:

  • 容器内工具可能缺失,优先用基础命令(cat, ls, env)
  • 需宿主机信息时,用不带container的profile

Token约束

  • 日志分析:先grep错误关键词,再按需扩展上下文
  • 环境检查:输出摘要而非完整命令结果
  • 深入排查:每次验证一个假设,不批量执行命令
  • 重复信息:不复述已知内容

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
5

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/ascend/agent-skills/debug/badge)](https://verified-skill.com/skills/ascend/agent-skills/debug)

Something wrong with this skill or its page? Tell us.