# crashlens 崩溃分诊工具

> 崩溃分诊工具，将 Linux 核心转储、运行时 panic、异常堆栈和 sanitizer 报告整理为 Markdown 缺陷报告，指出崩溃类型、首个用户代码帧和稳定签名。核心转储分析通过 REA 命令行读取崩溃记录与二进制布局，并可调用 REA 的 Ghidra 引擎为无符号函数生成伪代码；附带的 Claude Code 插件包含技能与只读 MCP 工具。它是围绕 REA 的调试集成，不是重建案例，诊断准确性仍为作者报告。

- 类型：集成
- 目标：二进制
- 类别：REA 社区集成
- 关联：REA 社区集成
- 来源复核于：2026-10-18
- 收录于：2026-10-19
- 原始资源：<https://github.com/mingleiw/crashlens>
- 一手来源：<https://github.com/mingleiw/crashlens/blob/7188611a506e058a8f4937acf3dfd3035545f2d1/README.md>
- 目录页面：<https://awesomerea.org/zh/resources/crashlens-rea-crash-triage/>
- 记录 JSON：<https://awesomerea.org/resources/crashlens-rea-crash-triage/record.json>
- 英文版：[English](https://awesomerea.org/resources/crashlens-rea-crash-triage/index.md)

## 使用条件与局限

- 软件包 0.1.0 与插件 0.2.0 仍是早期原型。panic、堆栈及 ASan／LSan／UBSan 文本输入只需 Node.js 22.19+ 或 24.11+。核心转储需要 Linux x86-64、Python 3、rea-agents，以及通过 REA_PWNTOOLS_PYTHON 指定的 pwntools 环境；gdb、objdump 以及 Ghidra 12.1.x 与 JDK 21 为可选项。Windows minidump 与 macOS 崩溃报告仍在路线图中。
- 需提供核心转储及发生崩溃的同一二进制；crashlens 比对 GNU build ID，不一致时发出警告。rea-agents 6.4.0 及以上为可选对等依赖，作者只说明可配合固定的 6.4.0 使用。
- 插件的 MCP 服务定义了四个只读工具：analyze_failure、analyze_core_dump、decompile_function 与 analyze_crash_folder。伪代码属于反编译器输出，崩溃类型是附带置信度的启发式判断。
- 不会运行被分析的程序；gdb 打开核心文件时关闭脚本自动加载与 debuginfod。可选的 --ai 参数会把报告（包括代码片段和日志行）发送至 Anthropic API；本地网页应用只监听 127.0.0.1 并要求会话令牌。核心转储可能含有机密信息，报告也会包含本地路径和寄存器值。
- CI 在 Node 22 与 24 上运行类型检查和单元测试，另有一项使用最新版 rea-agents 的空指针解引用端到端检查；“七类中找出六类根因”的说法未公开对话记录。
- 采用 MIT，并通过公开命令行使用同为 MIT 许可的 REA；Ghidra、Anthropic API 及被分析程序适用各自条款。

## 一手来源

1. <https://github.com/mingleiw/crashlens/blob/7188611a506e058a8f4937acf3dfd3035545f2d1/README.md>
2. <https://github.com/mingleiw/crashlens/blob/7188611a506e058a8f4937acf3dfd3035545f2d1/plugin/skills/crashlens/SKILL.md>
3. <https://github.com/mingleiw/crashlens/blob/7188611a506e058a8f4937acf3dfd3035545f2d1/docs/prompts/crash-triage.md>
4. <https://github.com/mingleiw/crashlens/blob/7188611a506e058a8f4937acf3dfd3035545f2d1/src/rea.ts>
5. <https://github.com/mingleiw/crashlens/blob/7188611a506e058a8f4937acf3dfd3035545f2d1/src/mcp.ts>
6. <https://github.com/mingleiw/crashlens/blob/7188611a506e058a8f4937acf3dfd3035545f2d1/package.json>
7. <https://github.com/mingleiw/crashlens/blob/7188611a506e058a8f4937acf3dfd3035545f2d1/plugin/.claude-plugin/plugin.json>
8. <https://github.com/mingleiw/crashlens/blob/7188611a506e058a8f4937acf3dfd3035545f2d1/.github/workflows/ci.yml>
9. <https://github.com/mingleiw/crashlens/blob/7188611a506e058a8f4937acf3dfd3035545f2d1/test/e2e.test.ts>
10. <https://github.com/mingleiw/crashlens/blob/7188611a506e058a8f4937acf3dfd3035545f2d1/LICENSE>
11. <https://x.com/rae1101x/status/2111052456151154858>

## 同分区更多条目：智能体与 MCP

- [REA 工作区模板](https://awesomerea.org/zh/resources/rea-workspace-template/index.md) · 集成
- [REA Reconstruction Companion 重建配套技能](https://awesomerea.org/zh/resources/rea-reconstruction-companion/index.md) · 集成
- [App X-Ray](https://awesomerea.org/zh/resources/app-xray-rea-evidence-reports/index.md) · 集成
- [Hex-Rays IDA MCP](https://awesomerea.org/zh/resources/hex-rays-ida-mcp/index.md) · 集成
- [GhidraMCP](https://awesomerea.org/zh/resources/ghidramcp/index.md) · 集成
- [Binary Ninja MCP（官方）](https://awesomerea.org/zh/resources/binary-ninja-official-mcp/index.md) · 集成

## 关于此条目

说明已依据一手来源复核。
原创说明采用 MIT 许可；外部项目、论文与素材保留各自的权利和许可。
