wch887292/feihong-code/self-heal

Claude Code and agent skill by wch887292/feihong-code

Trust tier 3
  • community
Source check pending

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

系统化自我修复错误(只读诊断 + 定向修复):对编译失败、运行时异常、路径穿越、权限拒绝、模型报错等错误分类、定位根因并给出可验证的修复方案。触发词:修复错误、自愈、self-heal、报错、修复 bug、错误排查。

Install

npx vskill@latest install wch887292/feihong-code/self-heal

SKILL.md

The same SKILL.md was published earlier as wch887292/feihong-code/self-heal.

/self-heal 技能:系统化自我修复错误

主动式技能:任务执行出错时自动进入自愈循环,先诊断后修复,修复后必须验证。

适用场景

  • 工具调用返回失败(shell 报错、文件读写失败、网络错误)
  • 编译/构建失败(tsc、npm run build、语法错误、缺失模块)
  • 运行时异常(TypeError、ReferenceError、未定义变量)
  • 权限/路径问题(EACCES、路径穿越、目录不存在)
  • 模型 API 报错(限流、超时、鉴权失败)

工作流

1. 收集错误(完整信息优先)
  • 抓取完整错误输出(截断前 30 行 + 尾部 10 行,中间省略)
  • 记录:触发动作、错误码、涉及文件/命令、复现步骤
  • 不要只贴一行摘要——根因常藏在堆栈中段
2. 分类错误(对照规则表)

按关键词识别错误类别,优先级从高到低:

  • 编译错误:error ts / syntax error / cannot find module / 编译 / tsc
  • 运行时错误:TypeError / ReferenceError / is not a function / 未定义
  • 路径穿越:path traversal / outside workspace / ../
  • 超时:timeout / ETIMEDOUT / 超时
  • 权限拒绝:permission denied / EACCES / EPERM / 权限
  • 模型错误:rate limit / 429 / 5xx / api error / 限流
  • 无法归类的标记为 unknown,转人工排查
3. 定位根因(勘察优先)
  • 读取报错指向的文件/命令上下文,先理解再动手
  • 检查:变量是否定义、路径是否正确、依赖是否安装、权限是否足够
  • 用 read_file / list_files 勘察,必要时用 shell 复现最小化用例
4. 制定修复方案
  • 给出最小改动方案(一行能修绝不重写整个函数)
  • 方案需包含:改哪个文件、改什么、为什么这样改
  • 若无法确定根因,先输出诊断结论 + 2-3 个假设,选最可能的验证
5. 执行修复
  • 按方案修改,遵守项目既有风格与署名规范
  • 修复后立即验证:重跑失败的命令 / 编译 / 相关测试
6. 验证通过才算完成
  • 重跑原失败操作,确认不再报错
  • 若仍失败:回到第 3 步重新定位(最多 3 轮),3 轮后如实报告剩余问题,不伪造成功

输出格式

【/self-heal】错误诊断
类别: <compile-error|runtime-error|timeout|...>
根因: <一句话结论>
修复: <改了什么 / 建议怎么改>
验证: <重跑结果,成功或仍失败的证据>
状态: ✅ 已修复 | ⚠️ 部分修复 | ❌ 需人工介入

纪律

  • 修复后必须验证,禁止「改完不跑就说修好」
  • 不盲目重试同一失败命令(先诊断,再动手)
  • 不删改无关代码;涉及删除/覆盖前先确认
  • 3 轮自愈失败即如实上报,不编造成功结果
  • 根因不明时优先输出诊断与假设,而非猜测性改动

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

Repository stars
2
7-day trend score
5

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

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

  • Claude Code
  • Grok Build (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/wch887292/feihong-code/self-heal/badge)](https://verified-skill.com/skills/wch887292/feihong-code/self-heal)

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