home / skills / a5c-ai / babysitter / error-messages
This skill helps you design and implement clear, actionable compiler error messages with contextual displays and machine-readable output.
npx playbooks add skill a5c-ai/babysitter --skill error-messagesReview the files below or copy the command above to add this skill to your agents.
---
name: Error Messages
description: Expert skill for designing and implementing high-quality compiler error messages
category: User Experience
allowed-tools:
- Read
- Write
- Edit
- Glob
- Grep
- Bash
---
# Error Messages Skill
## Overview
Expert skill for designing and implementing high-quality compiler error messages.
## Capabilities
- Design clear, actionable error message templates
- Implement source context display with underlines
- Generate fix suggestions and quick fixes
- Handle error cascades and suppression
- Implement multi-span error annotations
- Support machine-readable error output (JSON)
- Implement color/styled terminal output
- Design error recovery strategies for better diagnostics
## Target Processes
- error-message-enhancement.js
- parser-development.js
- type-system-implementation.js
- semantic-analysis.js
- lsp-server-implementation.js
## Dependencies
Elm/Rust error message guidelines
## Usage Guidelines
1. **Clarity**: Make error messages clear and actionable
2. **Context**: Show relevant source code context with precise location
3. **Suggestions**: Provide fix suggestions when possible
4. **Cascades**: Suppress cascading errors to avoid overwhelming users
5. **Machine-Readable**: Support JSON output for tooling integration
## Output Schema
```json
{
"type": "object",
"properties": {
"errorFormat": {
"type": "string",
"enum": ["human", "json", "sarif"]
},
"features": {
"type": "array",
"items": { "type": "string" }
},
"colorSupport": { "type": "boolean" },
"generatedFiles": {
"type": "array",
"items": { "type": "string" }
}
}
}
```
This skill helps design and implement high-quality compiler error messages that are clear, actionable, and integrate with development tooling. It focuses on readable source context, precise multi-span annotations, and machine-readable outputs for automation. The goal is to reduce developer friction by surfacing the right information and suggested fixes.
The skill provides patterns and implementations for rendering human-friendly and JSON/SARIF error formats, plus styled terminal output with color support. It defines templates for source underlines, multi-span annotations, and fix suggestions, and includes strategies to detect and suppress cascading errors. It also produces an output schema that tools can consume for further automation.
What output formats does this skill support?
Human-readable text, structured JSON for tooling, and SARIF for security and CI integrations.
How do you avoid cascading errors?
Detect primary failures, suppress dependent diagnostics, and surface recovery hints; provide an option to enable verbose cascades for debugging.