error-messages

Standardize validation error messages with a three-part structure and examples.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill standardizes and clarifies validation error messages across a codebase, reducing debugging time and improving user guidance.

Core Features & Use Cases

  • Template-based messages: Enforces a consistent structure for errors that describe what's wrong, what's expected, and how to fix it.
  • Examples & guidance: Provides concrete examples to help developers produce clear, actionable errors.
  • Testing support: Supports tests to verify that error messages are clear, consistent, and cover common scenarios (API inputs, config parsing, CLI outputs).
  • Use cases: Applies to API input validation, configuration parsing, and user-facing command-line or UI errors.

Quick Start

Implement the standard error message template across validators, replace existing messages with the canonical format, and add tests to ensure clarity and consistency.

Frequently Asked Questions about error-messages

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

FAQPage Schema
What is the best way to standardize validation error messages across a codebase?

To standardize validation error messages, apply a template enforcing a three-part structure: what is wrong, what is expected, and how to fix it. This ensures consistent guidance for API inputs, configuration parsing, and CLI errors across your codebase.

How do I write clear and actionable error messages for API input validation?

Clear API input validation error messages must explicitly state what is wrong, what is expected, and how to fix it. Including concrete examples in the message structure helps users correct their inputs and reduces debugging time.

What should a good error message include to help with debugging?

A good error message for debugging should include a three-part structure: what is wrong, what is expected, and how to fix it. This format provides consistent guidance across configuration parsing and CLI errors, significantly reducing debugging time.

Can I test error message clarity and consistency in my software engineering workflow?

Yes, you can test error message clarity by implementing tests that verify messages cover common scenarios like API inputs and configuration parsing. Testing ensures your validation errors maintain a consistent, actionable structure across the codebase.

Does this error message standardization approach work for CLI and UI errors?

Yes, this error message standardization approach effectively handles CLI and UI errors by applying a consistent template. It ensures user-facing command-line and interface errors clearly state what is wrong, what is expected, and how to fix it.