Back to Skills

fix-errors

Guidelines for fixing unhandled errors from the VS Code error telemetry dashboard. Use when investigating error-telemetry issues with stack traces, error messages, and hit/user counts. Covers tracing data flow through call stacks, identifying producers of invalid data vs. consumers that crash, enriching error messages for telemetry diagnosis, and avoiding common anti-patterns like silently swallowing errors.

186,819stars40,755forksUpdated 7/1/2026

Security Assessment

Safe(100/100)
Security Score100/100

About fix-errors

A methodology for fixing unhandled errors surfaced by the VS Code error telemetry dashboard, where each issue typically arrives with an error message, a stack trace, a hit count, and an affected-user count. The central principle is that the fix almost never belongs at the crash site: adding a typeof guard, swallowing the error in a try/catch, or returning a fallback value only masks the problem while the invalid data continues to flow through the system and fails elsewhere.

The recommended approach is to trace the data flow upward through the call stack, reading each frame from bottom to top to understand what data is passed, what is expected, and where it originated (IPC message, extension API call, storage, user input), in order to locate the producer of the invalid data rather than the consumer that crashes on it. When the producer cannot be identified from the stack alone — for example when only the receiving IPC handler is visible and the sender lives in another process — the guidance is to enrich the error message with diagnostic context (the type and a truncated representation of the invalid value, plus the operation or command that received it) without silently swallowing it, so the error remains visible in telemetry and reveals the sender on the next cycle. When the producer is identifiable, the fix goes there: validate or sanitize data before sending it over IPC, storing it, or passing it to APIs, and ensure serialization preserves types (for example URIs serialized as UriComponents objects, not strings).

A recurring instruction is to find and read the code that constructs the error before proposing any fix, since the construction code reveals trigger conditions, subtypes, and whether the error is even actionable — illustrated with a ListenerLeakError example whose 'dominated' versus 'popular' classification dictates entirely different strategies. Additional guidelines include truncating user-controlled values to avoid PII, not changing shared utilities like URI.revive in ways that affect all callers, running relevant unit tests, and checking for compilation errors via the build task before declaring the work complete.

FAQ

Should I fix the error at the line where it crashes?

No. The guidance is explicit that the fix almost never belongs at the crash site, because guards, try/catch swallowing, or fallback values only mask the problem while the invalid data still flows through and fails elsewhere.

What information does a telemetry issue typically include?

An unhandled error issue from the dashboard usually contains an error message, a stack trace, a hit count, and an affected-user count.

What should I do when the producer of the bad data can't be found in the stack?

Enrich the error message at the consuming site with diagnostic context such as the type and a truncated value plus the operation that received it, and do not silently swallow it so it stays visible in telemetry and reveals the sender next cycle.

Why does the skill say to read the error construction code first?

Because the construction code is the source of truth: it reveals trigger conditions, error subtypes or classifications, the meaning of parameters, and whether the error is actionable, rather than guessing meaning from the message alone.

What should I verify before declaring the fix complete?

Run the relevant unit tests after making changes and check for compilation errors via the build task. Also truncate any user-controlled values in messages and avoid changing shared utilities in ways that affect all callers.

Install fix-errors

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill