error-msg

Rewrite error messages to describe problem states with subject-first phrasing.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/RushuiGuan/claude --skill error-msg
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: error-msg
Source: https://github.com/RushuiGuan/claude/tree/main/skills/error-msg
Command: npx skills add https://github.com/RushuiGuan/claude --skill error-msg

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Style guide for writing error messages, exception messages, and validation messages consistently across the codebase. Apply this skill whenever the user is writing, reviewing, or fixing error messages — even if they just say "fix the wording", "make these consistent", "review the error messages", or "what should this error say".

Core Features & Use Cases

  • Describe the state of an error rather than giving instructions to the caller.
  • Ensure tense consistency across missing, invalid, and active states, plus time-based conditions like expiry or reuse.
  • Include the specific subject name when available, and preserve details when wrapping exceptions.

Quick Start

Rewrite error messages to describe what went wrong, name the subject, use the correct tense, and include the offending value when known.

Frequently Asked Questions about error-msg

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

FAQPage Schema
How do I write consistent error messages across my codebase?

To write consistent error messages, describe the problem state rather than giving caller guidance. Ensure tense consistency across missing, invalid, and active states, and include the specific subject name and offending value when known.

What is the best way to format exception messages when wrapping errors?

The best way to format wrapped exception messages is to preserve the original exception details. Describe what went wrong using subject-first phrasing instead of providing instructions to the caller.

How do I fix validation errors to describe the problem state?

Fix validation errors by using subject-first phrasing and the appropriate tense for the condition type. Name the subject and include the offending value so the message clearly describes what went wrong.

Does this approach apply to redirect error descriptions and log readability?

Yes, this approach applies to redirect error descriptions, exception messages, and validation errors across code paths. It enforces tense consistency and subject naming to improve overall log readability.

Why should error messages describe the state instead of guiding the caller?

Error messages should describe the state because it enforces consistency across code paths. Describing what went wrong with subject-first phrasing and correct tense keeps validation messages clear and prevents ambiguous caller instructions.