agentleFS
bt2gobt2go/error-decoder/SKILL.md

error-decoder

Skill0 starsChanged 3 months agoMITView on GitHub

Turn a stack trace into root cause, minimal fix and one prevention step. Use when the user pastes a stack trace, an exception, a crash log, a red terminal block, or asks "why is this failing".

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. duncan-buildroom/freeskills★ 65same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

The file

We split this skill into the rules it gives an agent

8 rules. About 0 are common, 5 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Do not answer from the trace text alone.

    line 23
  2. Very specific:

    Never suggest wrapping the symptom in try/except, try/catch, or if err != nil { return nil } to make the message go away.

    line 40
  3. Distinctive:

    Never say "make sure the value exists" without saying why it does not exist right now.

    line 42
  4. Distinctive:

    If you cannot say why, you have not finished step 2.

    line 43
  5. Very specific:

    Never suggest ?. or || {} as the fix when the real question is why the value was absent.

    line 44
  6. Very specific:

    Do not recommend deleting node_modules, clearing caches, or restarting unless the trace itself points at a stale artifact.

    line 46
  7. Distinctive:

    If the trace is truncated and the answer depends on the missing part, say exactly which part you need instead of guessing.

    line 48
  8. Distinctive:

    No preamble. Start with the root cause line.

    line 50

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

error-decoder

You are decoding a stack trace. Produce four things and nothing else: the root cause, the minimal fix, one prevention step, and (only if genuinely uncertain) the one command that would confirm it.

Procedure

  1. Find the first frame in the user's own code. Walk the trace from the top and skip any frame whose path contains node_modules/, site-packages/, dist/, .venv/, /usr/lib/, GOROOT, webpack-internal, or a runtime internal marker like internal/process. The first frame that survives is the crime scene. If every frame is vendor code, the crime scene is the last user frame that called into the vendor, so keep walking until you find one.
  2. Read that file. Actually open it at the reported line, plus the ten lines above. Do not answer from the trace text alone. If the line number is off by a build step (bundled or transpiled output), find the source file it maps to first.
  3. State the root cause in one sentence. A cause, not a restatement. "user is undefined because getUser() returns early on a 404 without throwing" is a cause. "user is undefined" is a restatement.
  4. Give the minimal fix as a diff. Unified diff, only the lines that change. Fix the place where the bad value is produced, not the place where it explodes, unless the explosion site is genuinely where the wrong assumption lives.
  5. Give exactly one prevention step. A test that would have caught it, a type that makes the state unrepresentable, or a guard at the boundary where the data enters. One. Pick the cheapest one that actually holds.

Rules

  • Never suggest wrapping the symptom in try/except, try/catch, or if err != nil { return nil } to make the message go away. Swallowing is not fixing.
  • Never say "make sure the value exists" without saying why it does not exist right now. If you cannot say why, you have not finished step 2.
  • Never suggest ?. or || {} as the fix when the real question is why the value was absent. Optional chaining is a fine fix only when absent is a legitimate state.
  • Do not recommend deleting node_modules, clearing caches, or restarting unless the trace itself points at a stale artifact.
  • If the trace is truncated and the answer depends on the missing part, say exactly which part you need instead of guessing.
  • No preamble. Start with the root cause line.

Output shape

Root cause: <one sentence>

Fix:
<unified diff>

Prevention: <one concrete step>

Decoder table

The usual real cause, not the dictionary definition.

ErrorLanguageUsual real cause
undefined is not a functionJS/TSImport shape mismatch: default vs named, or CommonJS require of an ESM module returning { default: fn }.
Cannot read properties of undefined (reading 'x')JS/TSAn async call was not awaited, or a lookup by id missed and returned undefined instead of throwing.
Cannot read properties of null (reading 'x')JS/TSDOM query ran before the node existed, or an ORM findFirst legitimately found nothing.
ECONNREFUSED 127.0.0.1:5432anyThe dependency is not running, or it is running in a container and the host should be the service name, not localhost.
EADDRINUSE :::3000NodeA previous dev server did not exit. Also fires when two workers both bind in cluster mode.
MaxListenersExceededWarningNodeA listener is attached inside a function that runs per request or per render, and nothing removes it.
ERR_REQUIRE_ESMNodeThe dependency went ESM-only in a major version and the project is still CommonJS.
Hydration failed because the server rendered HTML didn't matchReact/NextNon deterministic render: Date.now(), Math.random(), localStorage, or a browser-only branch running during SSR.
Maximum update depth exceededReactAn effect sets state that is also in its dependency array, or a new object/array literal is passed as a dep every render.
CORS No 'Access-Control-Allow-Origin' headerbrowserThe request is hitting the wrong origin (port, protocol, or a proxy that is bypassed), or the preflight OPTIONS returns a 404 or a redirect.
ModuleNotFoundError: No module named 'x'PythonTwo interpreters: installed into system Python, running the venv (or the reverse). Also a package installed under a different distribution name than the import name.
ImportError: cannot import name 'x' from partially initialized modulePythonCircular import. Two modules import each other at module level.
KeyError: 'x'PythonAn upstream payload changed shape or the key is present only on some branches of a response. Almost never a typo in production code.
TypeError: 'NoneType' object is not subscriptablePythonA function without an explicit return on one path fell off the end and returned None.
sqlite3.OperationalError: database is lockedPythonA long-lived write transaction or a connection shared across threads without a lock.
panic: runtime error: invalid memory address or nil pointer dereferenceGoAn error was returned alongside a nil result and the error was ignored or only logged.
all goroutines are asleep - deadlock!GoUnbuffered channel with no concurrent receiver, or a WaitGroup whose Done is skipped on an early return.
context deadline exceededGoThe timeout is real and the downstream call is slow, or a parent context was cancelled and passed down.
OOMKilled / exit 137containerThe container memory limit, not a leak in most cases. Check the limit before hunting the leak.
SSL: CERTIFICATE_VERIFY_FAILEDanyA corporate TLS interception proxy, or a missing CA bundle in a slim base image. Not a reason to disable verification.

License

MIT.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.