inceptyon-labs/tenet-skills/tenet-errors

Claude Code and agent skill by inceptyon-labs/tenet-skills

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Audits error handling: empty catches, swallowed async errors, inconsistent types, and missing timeouts.

Install

npx vskill@latest install inceptyon-labs/tenet-skills/tenet-errors

SKILL.md

The same SKILL.md was published earlier as inceptyon-labs/tenet-skills/tenet-errors.

Tenet Errors

Audits whether your codebase handles errors deliberately or silently swallows them.

Purpose

This skill evaluates the quality and consistency of error handling throughout a project. Poor error handling is one of the most common sources of production incidents: an empty catch block turns a recoverable error into a silent data corruption, an unhandled Promise rejection crashes a Node.js process, and a missing error boundary takes down an entire React app for a single component failure.

The goal is not to mandate a specific error handling strategy, but to ensure that every error path is deliberate. If you catch an error, you should log it, rethrow it, recover from it, or explicitly document why you are ignoring it. If you make a network call, you should handle timeouts. If you use async iteration, you should handle errors from the iterable.

Calibration — read first

Follow shared/scan-discipline.md (complete every step, enumerate rather than sample, and §2a: report only issues that actually exist), shared/verification.md (every finding is confirmed against the code before it ships; unconfirmed candidates are dropped, not demoted), and shared/severity.md (severity is confirmed impact, never a hedge for doubt).

A finding must exist in this codebase on a path that can run. Do not report hypotheticals, dead code, style preferences, or anything an upstream check already prevents. Zero findings for a step is the normal result on healthy code; do not fill a step to show you looked. Do not overthink it: read the code and its context, decide, move on.

Language Support Matrix

yaml
support:
native:
- typescript
- javascript
- python
tree_sitter:
- go
- java
- ruby
- kotlin
- swift
heuristic:
- php
- rust
- c-sharp
- all-others
note: >
Native support means the skill understands the language's error handling idioms
(try/catch, async/await, Promise chains, except/raise, error boundaries).
Tree-sitter support uses AST queries for try/catch block analysis.
Heuristic support uses grep-based pattern matching.

Toolchain Inputs

This skill consumes the following toolchain outputs when available:

FileUsed For
.healthcheck/toolchain/semgrep.jsonPre-computed findings for empty catch blocks, broad exception catches, unhandled errors. Filter findings where category is "errors" or rule IDs match error-handling patterns.
.healthcheck/toolchain/eslint.jsonPre-computed findings for no-empty, no-unused-vars in catch blocks, @typescript-eslint/no-floating-promises, no-async-promise-executor. Filter for error-handling-related rules.

When toolchain data is available:

  • Import matching findings directly to avoid duplicate analysis
  • Set confidence: "deterministic" on toolchain-sourced findings
  • Still perform the full scan for patterns that Semgrep/ESLint do not cover (error boundaries, timeout handling, async iteration errors)

When toolchain data is NOT available:

  • Perform all checks via grep/read-based analysis
  • Set confidence: "native" or "heuristic" as appropriate

Procedure

Step 1: Inventory Error Handling Constructs

Scan the codebase to build an inventory of all error handling constructs:

JavaScript/TypeScript:

bash
# try/catch blocks
git grep -nP "catch\s*\(" -- '*.ts' '*.tsx' '*.js' '*.jsx'
# Promise .catch() handlers
git grep -nP "\.catch\(" -- '*.ts' '*.tsx' '*.js' '*.jsx'
# Async error handling
git grep -nP "\.then\(" -- '*.ts' '*.tsx' '*.js' '*.jsx' | grep -v "\.catch("
# Error boundaries
git grep -nP "componentDidCatch|ErrorBoundary|getDerivedStateFromError" -- '*.ts' '*.tsx' '*.js' '*.jsx'
# Global handlers
git grep -nP "process\.on.*unhandledRejection|process\.on.*uncaughtException|window\.onerror|window\.addEventListener.*error" -- '*.ts' '*.tsx' '*.js' '*.jsx'

Python:

bash
# try/except blocks
git grep -nP "except" -- '*.py' | grep -v "test_\|_test\.py\|tests/"
# Bare except
git grep -nP "except:" -- '*.py'
# Broad except
git grep -nP "except Exception\b|except BaseException" -- '*.py'

Go:

bash
# Error returns ignored
git grep -nP "_ = |, _ :=|, _ =" -- '*.go' | grep -v "_test\.go"
# Error not checked
git grep -nP "err :=" -- '*.go' | grep -v "if err"

Java/Kotlin:

bash
# Catch blocks
git grep -nP "catch\s*\(" -- '*.java' '*.kt'
# Broad catches
git grep -nP "catch\s*\(Exception|catch\s*\(Throwable" -- '*.java' '*.kt'
Step 2: Detect Empty Catch Blocks

An empty catch block swallows the error completely, making debugging impossible and potentially hiding data corruption.

Patterns to detect:

JavaScript/TypeScript:

catch (e) { }
catch (err) {
}
catch (_) { }
.catch(() => {})
.catch(() => { })
.catch((_) => {})

Python:

except:
pass
except Exception:
pass
except Exception as e:
pass

Go:

if err != nil {
// nothing here or just return nil
}

Java:

catch (Exception e) {
}
catch (Exception e) {
// intentionally empty
}

Detection method:

  • For each catch/except block found in Step 1, read the block body
  • A block is "empty" if it contains:
  • Nothing at all
  • Only whitespace/comments
  • Only pass (Python)
  • Only return with no logging or error propagation
  • Only a comment like // TODO, // ignore, // intentionally empty

Exception: A comment explicitly stating WHY the error is ignored (e.g., // Expected error during cleanup, safe to ignore because X) is a deliberate decision, not a finding. Do not report it.

Severity: major for empty catch blocks in production code, minor in test/utility code.

Step 3: Detect Catch-and-Ignore Patterns

More subtle than empty catch blocks — these catch an error but do nothing meaningful with it:

Patterns:

ts
// Logs but doesn't rethrow or recover
catch (err) {
console.log(err); // console.log is not proper error handling
}
// Catches and returns a default silently
catch (err) {
return []; // Caller has no idea an error occurred
}
// Catches and sets a boolean without logging
catch (err) {
success = false; // Error details lost
}

Detection method:

  • Read catch block bodies
  • Flag if the block:
  • Uses console.log instead of console.error or a proper logger
  • Returns a default value without logging the error
  • Sets a flag without preserving the error for debugging
  • Does not rethrow, report to error tracking (Sentry, Datadog, etc.), or use a structured logger

Severity: minor — the code acknowledges the error exists but handles it poorly.

Step 4: Detect Overly Broad Catches

Catching too-general exception types masks specific errors and prevents targeted recovery:

Patterns to flag:

ts
// JS/TS: catching everything
catch (e) {
// handles TypeError, SyntaxError, custom errors all the same
}
// Python: bare except
except:
handle_error()
// Python: catching Exception (catches everything except SystemExit, KeyboardInterrupt)
except Exception as e:
handle_error(e)
// Java: catching Exception or Throwable
catch (Exception e) {
handleError(e);
}
catch (Throwable t) {
handleError(t);
}
// Go: ignoring error type
if err != nil {
return fmt.Errorf("operation failed: %w", err) // OK if wrapping
}

When this is acceptable:

  • Top-level error handlers / middleware (Express error middleware, Django middleware, global exception handler)
  • Process-level handlers (process.on('uncaughtException'))
  • Error boundaries in React (by definition catch all render errors)

Severity: minor for broad catches in application code, info for broad catches in middleware/boundaries (where it is expected).

Step 5: Detect Unhandled Promise Rejections

Unhandled Promise rejections crash Node.js processes (since Node 15+) and cause silent failures in browsers.

Patterns to detect:

ts
// Floating promise (no await, no .catch, no .then)
fetchData(); // returns Promise, not awaited
db.save(record); // returns Promise, not awaited
// .then() without .catch()
fetchData().then(process); // rejection unhandled
// async function called without await in non-async context
async function save() { ... }
save(); // floating
// Promise.all without catch
Promise.all([fetchA(), fetchB()]); // rejection from either unhandled

Detection method:

  • Scan for function calls that return Promises (async functions, fetch, DB operations)
  • Check if the return value is awaited, chained with .catch(), or assigned to a variable that is later awaited
  • Check ESLint findings for @typescript-eslint/no-floating-promises if available

Severity: major for unhandled rejections in request handlers or critical paths, minor for fire-and-forget in background tasks (still flag, but lower severity).

Step 6: Detect Error Swallowing in Async Iteration

Async iterators (for-await-of, streams, generators) have unique error handling needs:

Patterns to detect:

ts
// for-await without try/catch
for await (const chunk of stream) {
process(chunk); // if process throws, the entire loop dies
}
// Stream error event not handled
const stream = fs.createReadStream('file.txt');
stream.on('data', process);
// missing: stream.on('error', handler)
// AsyncGenerator without error handling
async function* generate() {
yield await fetchData(); // if fetchData rejects, generator throws
}

Detection method:

  • Find all for await loops and check for surrounding try/catch
  • Find all stream creation (createReadStream, createWriteStream, pipeline) and check for .on('error') or pipeline error callback
  • Find async generators and check call sites for error handling

Severity: major for streams without error handlers (causes process crash), minor for for-await without try/catch.

Step 7: Detect Inconsistent Error Types

A project should use consistent custom error types rather than throwing raw strings or generic Error objects:

Patterns to detect:

ts
// Throwing strings
throw "Something went wrong";
throw 'Not found';
// Throwing generic Error with no subclass
throw new Error("validation failed"); // OK in small projects, flag if custom errors exist elsewhere
// Inconsistent custom errors
throw new NotFoundError(...) // in one file
throw new HttpError(404, ...) // in another file
throw { status: 404, message: "not found" } // in yet another

Detection method:

  • Find all throw / raise statements
  • Categorize: string throws, generic Error, custom Error subclass, plain object
  • If the project defines custom error classes, flag places that throw generic Errors or strings
  • If the project has NO custom error classes, this is an info-level suggestion

Severity: minor for inconsistent error types when custom classes exist, info for suggesting custom error classes.

Step 8: Detect Missing Error Boundaries in React

React error boundaries prevent a single component error from crashing the entire application.

Detection method:

  • Check if the project uses React (look for react in package.json, .tsx/.jsx files)
  • Find existing error boundaries: componentDidCatch, getDerivedStateFromError, or common libraries (react-error-boundary)
  • Check route-level components and layout components for boundary wrapping
  • Flag if NO error boundary exists anywhere in a React project
  • Flag if error boundaries exist but major routes/layouts are not wrapped

What to check:

tsx
// Good: Error boundary wrapping route content
<ErrorBoundary fallback={<ErrorPage />}>
<Routes>...</Routes>
</ErrorBoundary>
// Bad: No error boundary anywhere
function App() {
return <Routes>...</Routes>; // any render error crashes the entire app
}

Severity: major if no error boundary exists in a React project, minor if boundaries exist but do not cover major routes.

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
5

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/inceptyon-labs/tenet-skills/tenet-errors/badge)](https://verified-skill.com/skills/inceptyon-labs/tenet-skills/tenet-errors)

Something wrong with this skill or its page? Tell us.