跳到正文
Skillpedia
通用编程95k · #1307

terminal-recovery

它能做什么

这个技能引导 AI 修复失败、超时或输出异常的命令。适合运行命令、并希望得到清晰诊断而非反复重试的人。

适用场景

  • ✓当某个命令失败,而错误信息不够清楚的时候。
  • ✓当一个长时间运行的命令超时,或不再输出有用信息的时候。
  • ✓当命令看似成功,但结果看起来仍不对的时候。

技能链接

https://github.com/odysseus-dev/odysseus/blob/dev/resources/skills/agent/terminal-recovery/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/odysseus-dev/odysseus/blob/dev/resources/skills/agent/terminal-recovery/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“构建命令一直报一个我看不懂的错误。请找出原因并修复。”

每周 5 个新技能,1 分钟读完。

工作原理

AI 读取退出状态和两个输出流,然后检查可能的原因,例如缺少工具或路径错误。它每次只改变一个条件,并运行能够验证该想法的最小范围命令。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

When to Use

Use when a command fails, times out, produces incomplete output, or behaves differently from what the task requires.

Procedure

  1. Read the command, exit status, standard output, and standard error before choosing a response.
  2. Confirm the working directory, relevant files, executable availability, permissions, and environment assumptions with minimal read-only probes.
  3. Classify the failure as syntax, missing dependency, wrong path, permissions, resource pressure, timeout, service state, or task logic.
  4. Change one relevant condition and retry the narrowest command that can test the diagnosis.
  5. For a long-running command, use the returned session identifier to poll or provide input instead of launching duplicates.
  6. After recovery, run the original acceptance check and inspect the resulting files or service state.

Pitfalls

  • Do not rerun an unchanged failing command repeatedly.
  • Do not install packages or change global configuration before confirming they are missing and necessary.
  • Do not launch a second server or training job before checking for an existing process and port or device conflicts.
  • Do not treat partial output or a zero exit status as proof that the requested state was produced.

Verification

  • The diagnosed cause is supported by command output or environment state.
  • The corrected command exits as expected.
  • The requested artifact, process, or state passes an independent acceptance check.
常见问题

它会一直重试同一个命令吗?

不会。该技能说明,不要反复重新运行一个未改变的失败命令。

它会自行安装软件吗?

该技能说明,在安装任何东西或更改全局设置之前,要先确认某个软件包缺失且确实需要。

它如何确认修复有效?

它会重新运行最初的检查,并检查生成的文件或服务状态。

详情

作者的原始描述

Recover from failed terminal commands using evidence-driven diagnosis and bounded retries

repo: odysseus-dev/odysseus

热度

GitHub 星标
95k
排名
#1307
许可证
AGPL-3.0
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能