crash-investigation
Investigate system crashes, OOM kills, and unresponsive episodes. Analyzes previous boot logs, identifies memory hogs, tallies per-process-group consumption…
от eltmon★ 36 звёзд на GitHub
Установить crash-investigation в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Crash Investigation
Post-crash forensic analysis for developer workstations running AI agents, containers, and k8s workloads.
When to Use
- System was unresponsive and required a hard reset
- OOM killer was active (processes were killed unexpectedly)
- CPU was pegged at 100% for an extended period
- System rebooted unexpectedly
- Agents were running overnight and the machine froze
Investigation Workflow
Work through each phase in order. Collect all evidence before drawing conclusions.
Phase 1: Establish Timeline
Determine when the crash happened and how long the previous session ran.
# List recent boots — the previous boot (-1) is the crashed session
journalctl --list-boots | tail -5
# Check reboot history
last -x reboot shutdown | head -10
Record:
- Previous boot start: when the session began
- Previous boot end: when the crash/reset occurred
- Duration: how long it ran before crashing
Phase 2: Check for OOM Kills
OOM (Out of Memory) kills are the most common cause of system freezes on dev machines.
# All OOM events from the crashed boot
journalctl -b -1 --no-pager | grep -E "oom-kill|Out of memory|Killed process" | head -30
# Memory pressure and related failures
journalctl -b -1 --since "<LAST_FEW_HOURS>" --no-pager | \
grep -iE "oom|out.of.memory|killed process|enomem|cannot allocate|memory pressure" | tail -50
If OOM kills are found, note:
- First OOM kill timestamp — this is when trouble started
- Which processes were killed and in what order
- Whether the right processes were killed (OOM killer picks by
oom_score_adj, not by actual memory usage)
Phase 3: Identify Memory Hogs
When the OOM killer fires, the kernel dumps a full process table. This is the most valuable evidence.
# Find the process table dump from the first OOM event
# Look for lines with [pid] format — these are the process listings
journalctl -b -1 --since "<FIRST_OOM_TIME>" --until "<FIRST_OOM_TIME + 1min>" --no-pager | \
grep "kernel:" | grep -P "\[\s*\d+\]" | head -80
Tally Memory by Process Group
For each major process type, sum the RSS (resident memory) column. The OOM dump format is:
[ pid ] uid tgid total_vm rss rss_anon rss_file rss_shmem pgtables_bytes swapents oom_score_adj name
RSS is field $11 when parsed with awk from the full journalctl line. Values are in pages (4 KB each).
# Tally for a specific process name (replace PROCNAME)
journalctl -b -1 --since "<OOM_TIME>" --until "<OOM_TIME + 1min>" --no-pager | \
grep "kernel:" | grep -P "\bPROCNAME\b" | \
awk '{rss=$11; total+=rss} END {printf "%s: %d processes, RSS: %.1f GB\n", "PROCNAME", NR, total*4/1024/1024}'
Common process groups to check:
claude— Claude Code CLI processesnode— Node.js (includes vitest workers, MCP servers, dev servers)vitest— Test runner workers (often named "node (vitest N)")java— JVMs (Spring Boot, Minecraft, Solr, k3s pods)python— Python servicesbeam.smp— Erlang/RabbitMQgrafana,prometheus— Monitoring stackpostgres— Database
Compare the total against system RAM:
# System RAM
free -h
# CPU count (vitest/jest default to this many workers)
nproc
Phase 4: Analyze the Death Spiral
Check the final minutes/hours of the crashed boot for cascading failures.
# Last 100 log entries before the crash
journalctl -b -1 --since "<LAST_10_MINUTES>" --no-pager | tail -100
Look for these indicators:
- "Under memory pressure, flushing caches" — system is thrashing
- "SYN_DROPPED event" on input devices — kernel dropping mouse/keyboard events (explains unresponsiveness)
- "Can't keep up!" from game servers or other real-time processes
- "Watchdog timeout" on systemd services — services frozen
- Services crash-looping (e.g., fwupd, journald restarting repeatedly)
- DNS timeouts — networking breaking down under load
Phase 5: Check Agent and Workspace State
After understanding what caused the crash, assess what work was in progress.
Agent States
# List all agents and their last state
for agent_dir in ~/.overdeck/agents/*/; do
agent=$(basename "$agent_dir")
state=$(cat "$agent_dir/state.json" 2>/dev/null | python3 -c "import sys,json; d=json.load(sys.stdin); print(f'{d.get(\"state\",\"unknown\")} @ {d.get(\"lastActivity\",\"?\")}')" 2>/dev/null || echo "no state")
echo "$agent: $state"
done
Workspace Git Status
# For each workspace, check for uncommitted work and branch status
for ws in /path/to/project/workspaces/*/; do
echo "=== $(basename $ws) ==="
for repo in "$ws"*/; do
if [ -d "$repo/.git" ]; then
echo " $(basename $repo):"
echo " Branch: $(git -C "$repo" branch --show-current 2>/dev/null)"
echo " Uncommitted: $(git -C "$repo" status --short 2>/dev/null | wc -l) files"
echo " Ahead of main: $(git -C "$re
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
- 01
Bash - 02
Read - 03
Grep - 04
Glob
FAQ
Что делает скилл crash-investigation?
Investigate system crashes, OOM kills, and unresponsive episodes. Analyzes previous boot logs, identifies memory hogs, tallies per-process-group consumption, checks agent and workspace state, and produces a recovery summary. Use after a hard reset, freeze, or reboot caused by resource exhaustion.
Как установить скилл crash-investigation?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл crash-investigation запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
AnthropicGuide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
academy-guide
AnthropicStop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
internal-comms
AnthropicA set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
skill-development
AnthropicThis skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…