error-message-manager

Rewrite vague Julia error messages into structured diagnostics with Expected, Got, and Suggestion sections.

90|16|Updated Apr 4, 2019
One-click install
npx skills add https://github.com/CliMA/CalibrateEmulateSample.jl --skill error-message-manager
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: error-message-manager
Source: https://github.com/CliMA/CalibrateEmulateSample.jl/tree/main/.claude/skills/error-message-manager
Command: npx skills add https://github.com/CliMA/CalibrateEmulateSample.jl --skill error-message-manager

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Julia packages often throw vague, low-context error messages that leave users guessing what went wrong and how to fix it. This Skill transforms cryptic exceptions into structured diagnostics that clearly state the failure, show expected versus actual values, and provide actionable suggestions.

Core Features & Use Cases

  • Structured Error Rewrites: Converts bare assert, error, and throw statements into typed exceptions with Expected, Got, and Suggestion sections.
  • Early Validation: Adds guards at API boundaries to catch invalid inputs before they reach numerical routines.
  • Loop Context Preservation: Includes iteration indices and per-iteration state in errors thrown inside loops so users can reproduce failures without debug prints.
  • Exception Chaining: Preserves original exception types and messages when catching and re-throwing to retain root causes.

Quick Start

Use the error-message-manager skill to audit Julia source files and rewrite vague error messages into structured diagnostics with Expected, Got, and Suggestion sections.

Frequently Asked Questions about error-message-manager

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I improve vague Julia error messages with actionable diagnostics?

To improve Julia error messages, rewrite bare assert, error, and throw statements into typed exceptions structured with Expected, Got, and Suggestion sections. This clarifies failures and provides actionable suggestions for users to fix invalid inputs.

How do I add early API validation to catch invalid inputs in Julia packages?

Add early API validation in Julia packages by placing input guards at API boundaries. This catches invalid inputs before they reach numerical routines, preventing cryptic downstream exceptions and ensuring robust API boundary validation.

How do I preserve iteration context in Julia loop error messages?

Preserve loop context in Julia error messages by including iteration indices and per-iteration state inside loops. This allows users to reproduce failures precisely without needing manual debug prints to trace the error source.

How do I preserve original exception types when catching and re-throwing in Julia?

Preserve original Julia exceptions by applying exception chaining in catch blocks. Catching and re-throwing while retaining the original exception types and messages ensures root causes are not lost during API boundary validation or error message rewrites.

When should I extract long Julia error messages into reusable helper functions?

Extract long Julia error messages into reusable helper functions during error message auditing to maintain code quality. This refines exception handling by preventing message duplication and standardizing structured diagnostics across package development workflows.