result-error-handling

Community

Avoid silent failures in brepjs error handling

Authorandymai
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill eliminates the common pain points of inconsistent error handling in brepjs projects, which often lead to silent failures, cryptic uncaught kernel errors, and invalid geometry that is extremely difficult to debug.

Core Features & Use Cases

  • Standardized Result workflow: Teaches proper use of brepjs Result<T,E> combinators, correct error channel selection for expected vs unexpected failures, and proper propagation of fallible operation results.
  • Error construction best practices: Covers how to use kernelCall for kernel operations, add actionable context via metadata and recovery suggestions, and avoid common pitfalls like dropped error causes or typo'd error codes.
  • Use case: When adding a new brepjs operation that can fail (such as a fillet, cut, or STEP export), use this Skill to ensure errors are returned as Results with clear, actionable messages instead of throwing unexpected exceptions or swallowing failures entirely.

Quick Start

Use the result-error-handling skill to implement proper Result-based error handling for your new brepjs boolean operation, including adding a custom BrepErrorCode and recovery suggestion for when the kernel reports a failed fuse.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: result-error-handling
Download link: https://github.com/andymai/brepjs/archive/main.zip#result-error-handling

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 537,000+ vetted skills library on demand.