/crashlens:crashlensfrom crashlens
Analyzes stack traces, panics, exceptions, sanitizer reports, segfaults, and core dumps to identify where and why code failed. Groups multiple failures into distinct bugs with stable signatures.
Ships in crashlens. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
crashlens reads a failure (panic, exception, sanitizer report, or core dump + binary) and returns a Markdown bug report: the first frame in the user's code, the crash type with a confidence level, the log lines just before it, what to check next, and a signature that stays the same for the same bug across runs and machines. It never runs the program.
Prefer the MCP tools when they are available (the crashlens plugin provides them):
| Situation | Tool | Key arguments |
|---|---|---|
| Failure output you have (test run, pasted trace) | analyze_failure | text, source_dir |
| A log file | analyze_failure | path, source_dir |
| A native crash | analyze_core_dump | core_path, binary_path, log_path, source_dir |
| Many failures (CI artifacts, crash dir) | analyze_crash_folder | dir, binary_path, source_dir |
Always pass source_dir = the repository root (absolute path): the report then
includes the failing lines and the last commit that touched them. Use absolute paths.
Without the MCP tools, use the CLI (crashlens on PATH, or node <plugin dir>/crashlens.mjs):
<command> 2>&1 | crashlens - --source "$PWD" # failure output piped in
crashlens error.log --source "$PWD" # a saved log
crashlens ./core ./app --source "$PWD" # core dump + the exact binary
crashlens --batch ./crashes ./app # a folder, grouped into bugs
Add --json when you want fields instead of Markdown. Do not pass --ai: you
are already the model reading the report.
2>&1) and give crashlens all of it, including the log lines
before the trace: they show which request or input triggered it. For Rust,
set RUST_BACKTRACE=1 first, or there is no stack. For pytest, add -l
(--showlocals): crashlens then compares what the code read with what the
variables really held.source_dir), then the title
(crash type and where), the "your code" frame, the likely cause and its
confidence, the failing lines and blame, and the log context. Low
confidence means verify before acting.await, a lookup key
that differs in case, a field name the producer spells differently, an
environment string used as a number, a use after free) are static guesses
from the source or the core: confirm one in the code, then fix it where the
value is produced. Do not add a None/undefined/NULL check, a default or
a try/except at the crash site unless a missing value is genuinely
valid there; a guard hides the bug and the next caller hits it.When the user asks what went wrong rather than for a fix, answer from the report: the crash type, the file:line in their code, the cause, and the signature.
Use analyze_crash_folder (or --batch). It groups by signature and ranks bugs
by count, so fix the top one first. Use signatures to say "these 40 CI failures
are 3 bugs", and to confirm a fix removed exactly the bug it targeted.
ulimit -c unlimited then rerun (writes ./core when
/proc/sys/kernel/core_pattern is core); on systemd hosts use
coredumpctl list and coredumpctl dump <pid> -o core.sub_<address> from the unwind tables, and the report shows the whole
crashing function's disassembly. When Ghidra 12.1.x is in GHIDRA_INSTALL_DIR,
REA + Ghidra pseudocode of that function is added automatically (force with
decompile: true / --decompile; it can take minutes on large binaries). Read the load
that produced the bad register in the disassembly or pseudocode (for example
*(param_1 + 8) is a field at offset 8 of the first argument), then follow the
caller: call decompile_function with the caller's sub_<hex> name from the
backtrace to see where that value was set (freed, left NULL, computed as 0).
Label pseudocode as decompiler output, not source.-g. Without them you still get
function+offset, the faulting instruction and the bad register.-fsanitize=address,undefined -g and analyze
the ASan output.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
crash-analysis, stack-trace, debugging, core-dump, bug-signature
npx claudepluginhub mingleiw/crashlens --plugin crashlensOther plugins' skills for the same job