error-messages — community error-messages, community, ide skills, Claude Code, Cursor, Windsurf

v1.0.0
GitHub

About this Skill

Ideal for AI Agents like Cursor and AutoGPT needing standardized validation error message generation for clear user feedback. Error Message Style Guide for Validation Errors

github github
[0]
[0]
Updated: 2/20/2026

Agent Capability Analysis

The error-messages skill by github is an open-source community AI agent skill for Claude Code and other IDE workflows, helping agents execute tasks with better context, repeatability, and domain-specific guidance.

Ideal Agent Persona

Ideal for AI Agents like Cursor and AutoGPT needing standardized validation error message generation for clear user feedback.

Core Value

Empowers agents to create clear, actionable error messages using a standardized template, including what's wrong, what's expected, and examples of correct usage, utilizing GitHub Agentic Workflows and validation error protocols.

Capabilities Granted for error-messages

Generating informative validation errors
Standardizing error message formats across applications
Improving user experience through clear error feedback

! Prerequisites & Limits

  • Requires implementation of the error message template
  • Limited to validation error messages
  • Dependent on gh-aw codebase integration
Labs Demo

Browser Sandbox Environment

⚡️ Ready to unleash?

Experience this Agent in a zero-setup browser environment powered by WebContainers. No installation required.

Boot Container Sandbox

error-messages

Install error-messages, an AI agent skill for AI agent workflows and automation. Works with Claude Code, Cursor, and Windsurf with one-command setup.

SKILL.md
Readonly

Error Message Style Guide

This guide establishes the standard format for validation error messages in the gh-aw codebase. All validation errors should be clear, actionable, and include examples.

Error Message Template

[what's wrong]. [what's expected]. [example of correct usage]

Each error message should answer three questions:

  1. What's wrong? - Clearly state the validation error
  2. What's expected? - Explain the valid format or values
  3. How to fix it? - Provide a concrete example of correct usage

Good Examples

These examples follow the template and provide actionable guidance:

Time Delta Validation (from time_delta.go)

go
1return nil, fmt.Errorf("invalid time delta format: +%s. Expected format like +25h, +3d, +1w, +1mo, +1d12h30m", deltaStr)

Why it's good:

  • Clearly identifies the invalid input
  • Lists multiple valid format examples
  • Shows combined formats (+1d12h30m)

Type Validation with Example

go
1return "", fmt.Errorf("manual-approval value must be a string, got %T. Example: manual-approval: \"production\"", val)

Why it's good:

  • Shows actual type received (%T)
  • Provides concrete YAML example
  • Uses proper YAML syntax with quotes

Enum Validation with Options

go
1return fmt.Errorf("invalid engine: %s. Valid engines are: copilot, claude, codex, custom. Example: engine: copilot", engineID)

Why it's good:

  • Lists all valid options
  • Provides simplest example
  • Uses consistent formatting

MCP Configuration

go
1return fmt.Errorf("tool '%s' mcp configuration must specify either 'command' or 'container'. Example:\ntools:\n %s:\n command: \"npx @my/tool\"", toolName, toolName)

Why it's good:

  • Explains mutual exclusivity
  • Shows realistic tool name
  • Formats multi-line YAML example

Bad Examples

These examples lack clarity or actionable guidance:

Too Vague

go
1return fmt.Errorf("invalid format")

Problems:

  • Doesn't specify what format is invalid
  • Doesn't explain expected format
  • No example provided

Missing Example

go
1return fmt.Errorf("manual-approval value must be a string")

Problems:

  • States requirement but no example
  • User doesn't know proper YAML syntax
  • Could be clearer about type received

Incomplete Information

go
1return fmt.Errorf("invalid engine: %s", engineID)

Problems:

  • Doesn't list valid options
  • No guidance on fixing the error
  • User must search documentation

When to Include Examples

Always include examples for:

  1. Format/Syntax Errors - Show the correct syntax

    go
    1fmt.Errorf("invalid date format. Expected: YYYY-MM-DD HH:MM:SS. Example: 2024-01-15 14:30:00")
  2. Enum/Choice Fields - List all valid options

    go
    1fmt.Errorf("invalid permission level: %s. Valid levels: read, write, none. Example: permissions:\n contents: read", level)
  3. Type Mismatches - Show expected type and example

    go
    1fmt.Errorf("timeout-minutes must be an integer, got %T. Example: timeout-minutes: 10", value)
  4. Complex Configurations - Provide complete valid example

    go
    1fmt.Errorf("invalid MCP server config. Example:\nmcp-servers:\n my-server:\n command: \"node\"\n args: [\"server.js\"]")

When Examples May Be Optional

Examples can be omitted when:

  1. Error is from wrapped error - When wrapping another error with context

    go
    1return fmt.Errorf("failed to parse configuration: %w", err)
  2. Error is self-explanatory with clear context

    go
    1return fmt.Errorf("duplicate unit '%s' in time delta: +%s", unit, deltaStr)
  3. Error points to specific documentation

    go
    1return fmt.Errorf("unsupported feature. See https://docs.example.com/features")

Formatting Guidelines

Use Type Verbs for Dynamic Content

  • %s - strings
  • %d - integers
  • %T - type of value
  • %v - general value
  • %w - wrapped errors

Multi-line Examples

For YAML configuration examples spanning multiple lines:

go
1fmt.Errorf("invalid config. Example:\ntools:\n github:\n mode: \"remote\"")

Quoting in Examples

Use proper YAML syntax in examples:

go
1// Good - shows quotes when needed 2fmt.Errorf("Example: name: \"my-workflow\"") 3 4// Good - shows no quotes for simple values 5fmt.Errorf("Example: timeout-minutes: 10")

Consistent Terminology

Use the same field names as in YAML:

go
1// Good - matches YAML field name 2fmt.Errorf("timeout-minutes must be positive") 3 4// Bad - uses different name 5fmt.Errorf("timeout must be positive")

Error Message Testing

All improved error messages should have corresponding tests:

go
1func TestErrorMessageQuality(t *testing.T) { 2 err := validateSomething(invalidInput) 3 require.Error(t, err) 4 5 // Error should explain what's wrong 6 assert.Contains(t, err.Error(), "invalid") 7 8 // Error should include expected format or values 9 assert.Contains(t, err.Error(), "Expected") 10 11 // Error should include example 12 assert.Contains(t, err.Error(), "Example:") 13}

Migration Strategy

When improving existing error messages:

  1. Identify the error - Find validation error that lacks clarity
  2. Analyze context - Understand what's being validated
  3. Apply template - Add what's wrong + expected + example
  4. Add tests - Verify error message content
  5. Update comments - Document the validation logic

Examples by Category

Format Validation

go
1// Time deltas 2fmt.Errorf("invalid time delta format: +%s. Expected format like +25h, +3d, +1w, +1mo, +1d12h30m", input) 3 4// Dates 5fmt.Errorf("invalid date format: %s. Expected: YYYY-MM-DD or relative like -1w. Example: 2024-01-15 or -7d", input) 6 7// URLs 8fmt.Errorf("invalid URL format: %s. Expected: https:// URL. Example: https://api.example.com", input)

Type Validation

go
1// Boolean expected 2fmt.Errorf("read-only must be a boolean, got %T. Example: read-only: true", value) 3 4// String expected 5fmt.Errorf("workflow name must be a string, got %T. Example: name: \"my-workflow\"", value) 6 7// Object expected 8fmt.Errorf("permissions must be an object, got %T. Example: permissions:\n contents: read", value)

Choice/Enum Validation

go
1// Engine selection 2fmt.Errorf("invalid engine: %s. Valid engines: copilot, claude, codex, custom. Example: engine: copilot", id) 3 4// Permission levels 5fmt.Errorf("invalid permission level: %s. Valid levels: read, write, none. Example: contents: read", level) 6 7// Tool modes 8fmt.Errorf("invalid mode: %s. Valid modes: local, remote. Example: mode: \"remote\"", mode)

Configuration Validation

go
1// Missing required field 2fmt.Errorf("tool '%s' missing required 'command' field. Example:\ntools:\n %s:\n command: \"node server.js\"", name, name) 3 4// Mutually exclusive fields 5fmt.Errorf("cannot specify both 'command' and 'container'. Choose one. Example: command: \"node server.js\"") 6 7// Invalid combination 8fmt.Errorf("http MCP servers cannot use 'container' field. Example:\ntools:\n my-http:\n type: http\n url: \"https://api.example.com\"")

References

  • Excellent example to follow: pkg/workflow/time_delta.go
  • Pattern inspiration: Go standard library error messages
  • Testing examples: pkg/workflow/*_test.go

Tools

When writing error messages, consider:

  • The user's perspective (what do they need to fix it?)
  • The context (where in the workflow is the error?)
  • The documentation (should we reference specific docs?)
  • The complexity (is multi-line example needed?)

FAQ & Installation Steps

These questions and steps mirror the structured data on this page for better search understanding.

? Frequently Asked Questions

What is error-messages?

Ideal for AI Agents like Cursor and AutoGPT needing standardized validation error message generation for clear user feedback. Error Message Style Guide for Validation Errors

How do I install error-messages?

Run the command: npx killer-skills add github/gh-aw/error-messages. It works with Cursor, Windsurf, VS Code, Claude Code, and 19+ other IDEs.

What are the use cases for error-messages?

Key use cases include: Generating informative validation errors, Standardizing error message formats across applications, Improving user experience through clear error feedback.

Which IDEs are compatible with error-messages?

This skill is compatible with Cursor, Windsurf, VS Code, Trae, Claude Code, OpenClaw, Aider, Codex, OpenCode, Goose, Cline, Roo Code, Kiro, Augment Code, Continue, GitHub Copilot, Sourcegraph Cody, and Amazon Q Developer. Use the Killer-Skills CLI for universal one-command installation.

Are there any limitations for error-messages?

Requires implementation of the error message template. Limited to validation error messages. Dependent on gh-aw codebase integration.

How To Install

  1. 1. Open your terminal

    Open the terminal or command line in your project directory.

  2. 2. Run the install command

    Run: npx killer-skills add github/gh-aw/error-messages. The CLI will automatically detect your IDE or AI agent and configure the skill.

  3. 3. Start using the skill

    The skill is now active. Your AI agent can use error-messages immediately in the current project.

Related Skills

Looking for an alternative to error-messages or another community skill for your workflow? Explore these related open-source skills.

View All

widget-generator

Logo of f
f

f.k.a. Awesome ChatGPT Prompts. Share, discover, and collect prompts from the community. Free and open source — self-host for your organization with complete privacy.

149.6k
0
AI

flags

Logo of vercel
vercel

flags is a Next.js feature management skill that enables developers to efficiently add or modify framework feature flags, streamlining React application development.

138.4k
0
Browser

zustand

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
AI

data-fetching

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
AI