error-messages

Standardize validation error messages across the gh-aw codebase.

4.9k|489|Updated Aug 12, 2025
One-click install
npx skills add https://github.com/githubnext/gh-aw --skill error-messages
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: error-messages
Source: https://github.com/githubnext/gh-aw/tree/main/skills/error-messages
Command: npx skills add https://github.com/githubnext/gh-aw --skill error-messages

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill standardizes error message formatting to ensure all validation errors are clear, actionable, and include examples, significantly improving the user experience and reducing debugging time for AI workflow users. It helps developers communicate effectively when things go wrong.

Core Features & Use Cases

  • Standardized Template: Follow a clear template: [what's wrong]. [what's expected]. [example of correct usage].
  • Actionable Guidance: Provide concrete examples for format, enum, type, and complex configuration errors.
  • Formatting Guidelines: Ensure consistency with type verbs, multi-line examples, and proper quoting.
  • Use Case: A developer is implementing a new validation check for a workflow configuration. This skill guides them to write an error message like "invalid time delta format: +%s. Expected format like +25h, +3d. Example: +1d12h30m".

Quick Start

Consult the error-messages skill to write a validation error message for an invalid date format, ensuring it includes the expected format and an example.

Frequently Asked Questions about error-messages

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

FAQPage Schema
How do I write validation error messages that users can actually act on?

Validation error messages should follow a three-part template: state what's wrong, specify what's expected, and provide a concrete example. For instance, an invalid time delta error reads: "invalid time delta format: +%s. Expected format like +25h, +3d. Example: +1d12h30m". This structure ensures users understand the problem and how to fix it immediately.

What should a standardized error message include for date and URL format validation?

Standardized error messages for date and URL validation must include the invalid input, the correct format with multi-line YAML examples where applicable, consistent terminology, and proper quoting rules. This ensures developers and end-users receive actionable guidance and reduces debugging time across the codebase.

How do I ensure error messages are consistent across validation checks?

Apply a strict template consistently across all validation types—time delta, date, URL, enum, type, and configuration format—covering code validation, runtime checks, and test helpers. Enforce multi-line YAML examples, unified terminology, and quoting conventions. Test message quality to catch inconsistencies early.

Why do enum and configuration format errors need examples?

Enum and configuration format errors are ambiguous without examples. Including concrete, correct usage patterns in error messages helps users understand valid options and proper syntax immediately, significantly reducing support requests and debugging cycles for configuration-related issues.

Can I use this for runtime validation checks and test helpers?

Yes. This standardization applies to code validation, runtime checks, test helpers, and migration guidance. The template and formatting guidelines work across all validation contexts, ensuring consistent user experience whether errors surface during development, testing, or production execution.

What's the best way to format type and enum validation errors?

Type and enum validation errors should use consistent type verbs and clearly enumerate valid options. Pair each error with a concrete example showing correct usage. This approach prevents ambiguity and helps users quickly identify why their input failed and what alternatives are available.