clean-typescript-error-handling

Installation
SKILL.md

Clean Error Handling

Error handling is part of the public behavior. Keep normal flow readable, preserve context, and make recoverable failures explicit.

EH1: Throw Useful Errors

Throw Error objects or project-specific subclasses. Do not throw strings or untyped objects.

// Bad
throw "User not found";

// Good
throw new Error(`User not found: ${userId}`);

EH2: Catch Unknown

Treat caught values as unknown and narrow before reading properties.

Installs
2
GitHub Stars
1
First Seen
Jun 4, 2026
clean-typescript-error-handling — gosukiwi/clean-code-skills