Paste a stack trace, get the root cause, the one line fix and how to stop it recurring.
git clone --depth 1 https://github.com/botaoishere/error-decoder .claude/skills/error-decoderRestart Claude Code, then paste a stack trace and say "decode this trace".
A stack trace tells you where the program died, which is almost never where the bug is. The top twenty frames are framework internals, the message is a symptom ("undefined is not a function"), and the reflex fix is a null check that hides the real problem until it resurfaces somewhere worse. This skill forces a fixed procedure: find the first frame in your own code, read that file, name the cause, then hand back a minimal diff and one thing that stops it recurring.
Paste a trace. That is the whole interface.
> /error-decoder
TypeError: Cannot read properties of undefined (reading 'email')
at sendWelcome (/app/src/mail/welcome.ts:14:23)
at /app/node_modules/bullmq/dist/cjs/classes/worker.js:471:24
at processTicksAndRejections (node:internal/process/task_queues:95:5)
Root cause: sendWelcome receives a job payload with only { userId }, and
loadUser(userId) returns undefined for users deleted between enqueue and
run, so `user.email` reads off undefined.
Fix:
--- a/src/mail/welcome.ts
+++ b/src/mail/welcome.ts
@@ -11,6 +11,9 @@ export async function sendWelcome(job: Job<WelcomeJob>) {
const user = await loadUser(job.data.userId)
+ if (!user) {
+ // deleted between enqueue and run; nothing to send, do not retry
+ return { skipped: "user-deleted" }
+ }
await mailer.send({ to: user.email, template: "welcome" })
Prevention: make loadUser return `User | null` instead of `User` so the
compiler rejects the unchecked property read.
It skipped the node_modules/bullmq and node:internal frames, landed on welcome.ts:14, and read the file before answering.
- Wrap the symptom in
try/catchso the message stops printing. - Tell you to "make sure the value exists" without saying why it does not.
- Suggest deleting
node_modulesunless the trace actually points at a stale artifact.
The skill ships with a lookup of the fifteen-plus errors that account for most real traces across JS/TS, Python and Go, each mapped to its usual real cause rather than its dictionary definition. EADDRINUSE is a dev server that did not exit. KeyError is an upstream payload that changed shape. nil pointer dereference is an ignored error return. See SKILL.md.
MIT.
