error-handling-base_skill

This skill guides explicit, contextual error handling to improve clarity, observability, and reliability across applications.
  • Rust

124

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill dicklesworthstone/meta_skill --skill error-handling-base

  • SKILL.md1.3 KB

Overview

This skill provides a compact, language-agnostic foundation for error handling patterns you can extend in language-specific implementations. It focuses on communicative error design: clear messages, contextual information, and appropriate logging levels. Use it as the baseline checklist and rule set when designing or reviewing error flows in CLI tools, services, or libraries.

How this skill works

The skill codifies core rules and common pitfalls for error handling and supplies a small checklist to verify implementation quality. It inspects error messages, logging placement, and whether errors are classified as recoverable or unrecoverable. When extended, language-specific adapters enforce these rules in code reviews, linters, or runtime wrappers.

When to use it

  • Designing error handling for a new CLI, service, or library
  • Reviewing or auditing existing error flows and logs
  • Implementing language-specific error wrappers or adapters
  • Creating user-facing error messages for tools or APIs
  • Building automated checks or linters for error-related patterns

Best practices

  • Always handle errors explicitly; never swallow exceptions without logging
  • Write actionable, descriptive messages that include the operation and context
  • Classify errors as recoverable or unrecoverable and handle accordingly
  • Log errors at the appropriate level and include context, not secrets
  • Avoid exposing internal implementation details in user-facing messages

Example use cases

  • Wrap parsing logic to throw errors like: Failed to parse config 'X': reason
  • Audit a codebase for generic error messages and replace them with contextual ones
  • Add middleware that converts low-level exceptions into user-friendly messages
  • Create unit tests that assert all error paths are covered and logged
  • Extend the base rules into a Rust-specific crate that enforces checks at build or runtime

FAQ

Log full details for internal monitoring and debugging, but redact or omit sensitive data before exposing messages to users.

How do I decide recoverable vs unrecoverable?

Recoverable errors are transient or user-fixable (network, validation); unrecoverable errors indicate invariant violations or corrupt state and usually require abort or escalation.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational