omh-native-debugging
它能做什么
它为会崩溃的原生二进制程序(例如段错误或 core dump)规划一次以假设为驱动的调试过程,并推荐使用调试器,而不只是打印语句。适合开发编译型程序的开发者。
适用场景
- ✓当原生程序因段错误或 core dump 而崩溃时。
- ✓当你怀疑编译程序存在内存损坏时。
- ✓当你希望规划调试器会话,而不是凭打印语句猜测时。
技能链接
https://github.com/rlaope/oh-my-hermes/blob/main/agent-skills/omh-native-debugging/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“这个二进制文件在处理第三个请求时出现段错误。请帮我找出原因。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体记录崩溃的事实,提出相互竞争的假设,并规划一次调试器会话,列出要设置的断点和要检查的值。在调试器显示结果之前,它不会宣称原因。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Native Debugging
This is an OMH native-debugging workflow skill, projected for Agent Skills hosts (Claude Code, Codex, Cursor, opencode, OpenClaw, pi).
Why This Exists
native-debugging closes OMH's zero-coverage low-level domain by preparing a hypothesis-driven, DAP-first debugging plan for native binaries, while OMH itself continues to execute nothing.
Do Not Use When
- The failure is a build or CI failure rather than a runtime fault in a binary; use
omh-build-failure-triage. - The subject is an agent or workflow misbehaving rather than a native binary; use
omh-agent-debug. - The wrong result, flaky test, or lost update is in application code such as a Python or TypeScript service and needs its root cause reproduced; use
omh-app-debugging. - The change is Rust source work whose risk is
unsafeor UB discipline; useomh-rust. - The request is to judge whether a fix is verified rather than to find the fault; use
omh-verification-gate.
Examples
Good example:
- Prompt: This binary segfaults on the third request; help me debug it.
- Expected behavior: Prepare native_fault_statement/v1, three competing hypotheses with distinguishing observations, and a debugger_session_plan/v1 naming the DAP adapter, breakpoints, and values to read.
- Why: The request is a runtime fault in a native binary where the plan, not the guess, is what OMH can prepare.
Bad example:
- Prompt: Add some printfs and tell me it is fixed once the crash stops.
- Expected behavior: Name the DAP-driven observation plan, and keep reproduction, root cause, and fix as separate not_observed states.
- Why: A disappearing symptom is not a root cause, and printf-via-rebuild is the fallback rather than the method.
Completion Checklist
- The fault is stated as an observed symptom with a reproduction command, separate from any assumed cause.
- At least three hypotheses span distinct axes and each carries its refuting observation.
- The debugger session plan names the DAP adapter, breakpoints, watchpoints, threads, frames, and values to read.
- The handoff says the executor drives the debugger and OMH executes nothing.
- Reproduction, debugger output, root cause, and fix are reported as separate observed or not_observed states.
- Any print-and-rebuild probe carried the session's probe tag, and an observed search for that tag returns nothing.
Recovery Notes
- If the fault does not reproduce, make reproduction the first hypothesis and plan the observation that would establish it, rather than debugging a fault no one can trigger.
- If no debug adapter or symbols are available, say so, plan the coarser evidence path, and keep root cause unclaimed instead of upgrading a guess.
When to Use
Use when Hermes should prepare low-level debugging of a native binary, crash, or memory fault: competing hypotheses, the distinguishing observation for each, and a DAP-driven evidence plan for the executor.
Strong routing signals: `native-debugging`, `native debugging`, `native binary`, `segfault`, `segmentation fault`, `core dump`, `stack corruption`, `memory corruption`, `heap corruption`, `use after free`, `null pointer dereference`, `stripped binary`, `disassembly`, `lldb`, `gdb`, `dap debugger`, `breakpoint`, `watchpoint`, `backtrace`, `セグメンテーション違反`, `コアダンプ`, `メモリ破壊`, `ヒープ破壊`, `解放後使用`, `逆アセンブル`, `네이티브 디버깅`, `세그폴트`, `코어 덤프`, `메모리 손상`, `역어셈블`, `중단점`, `段错误`, `核心转储`, `内存破坏`, `释放后使用`, `反汇编`, `bantu debug segfault ini`, `analisis core dump`, `telusuri penyebab use after free`, `debug crash pada binary native`, `giúp debug lỗi segfault này`, `phân tích core dump`, `truy nguyên nhân use after free`, `debug crash trên binary native`
Catalog Metadata
Category: verification
Phase: native-debugging
Quality tier: native-debug-evidence-gated
Reasoning demand: standard
Quality bar:
- State the fault as an observed symptom with its reproduction command before naming any cause.
- Load
references/native-debug-loop.mdand follow its hypothesis, observation, and escalation order rather than improvising a search. - Write at least three hypotheses on distinct axes, each with the single observation that would refute it and the exact place to read that observation.
- Plan the debugger session concretely: adapter, breakpoints, watchpoints, threads, frames, and the values read at each stop — the executor should not have to invent the session.
- Prefer debugger-observed state over added print statements; a rebuild-and-print loop is the
常见问题
它会自己运行调试器吗?
它规划会话并请求调试器步骤;在没有观察到结果之前,不会宣称原因。
这是针对网页应用的错误吗?
不是。应用代码错误由应用调试技能负责。
这是针对构建失败的吗?
不是。构建失败由构建失败分诊技能负责。
详情
作者的原始描述
[omh] Native program crashes or corrupts memory: prepare hypothesis-driven debugging of native binaries and instruct the executor to drive a DAP debugger instead of printf. Use when the user says: native-debugging, native debugging, native binary, segfault, segmentation fault, core dump, stack corruption, memory corruption.
repo: rlaope/oh-my-hermes
热度
- GitHub 星标
- 5.1k
- 排名
- #15137
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
omh-accessibility-audit
5.1k帮你的智能体检查某个界面或流程是否存在无障碍问题,例如键盘使用、屏幕阅读器标签、对比度和触控目标大小。
omh-adversarial-consensus
5.1k在你做出决定之前,帮你的智能体从几个独立角度质疑一个技术方案,然后总结哪些观点经得起推敲。
omh-agent-debug
5.1k帮你的智能体找出另一个 AI 智能体为何卡住、陷入循环或偏离任务,并提出最小且安全的恢复方法。
omh-agent-instructions
5.1k帮你的智能体编写或更新指令文件,例如 AGENTS.md 或 CLAUDE.md,告诉 AI 工具如何在项目中工作。