error-message-writer
Skill3 starsChanged 11 months agoApache-2.0View on GitHub
Write clear, helpful error messages. Use when the user needs to improve error handling UX, create user-friendly messages, or standardize error formats.
In this repository100 other files it gives its agents.
- accessibility-checkerSkill
- analytics-trackerSkill
- api-contract-testerSkill
- api-documentation-generatorSkill
- api-rate-limiterSkill
- appstore-screenshot-resizerSkill
- architecture-documenterSkill
- authentication-implementerSkill
- aws-resource-provisionerSkill
- browser-extension-builderSkill
- caching-implementerSkill
- changelog-generatorSkill
- chart-generatorSkill
- ci-pipeline-debuggerSkill
- cli-tool-builderSkill
- code-documenterSkill
- code-explainerSkill
- code-migration-helperSkill
- code-refactorerSkill
- code-reviewerSkill
- color-palette-generatorSkill
- comment-generatorSkill
- contributing-guide-writerSkill
- cron-job-schedulerSkill
- css-animatorSkill
- csv-processorSkill
- data-aggregatorSkill
- database-backup-restoreSkill
- database-migration-generatorSkill
- database-query-optimizerSkill
- data-transformerSkill
- data-validatorSkill
- date-time-helperSkill
- debug-helperSkill
- dependency-updaterSkill
- dependency-vulnerability-checkerSkill
- discord-bot-builderSkill
- docker-compose-builderSkill
- dockerfile-generatorSkill
- e2e-test-builderSkill
- email-template-builderSkill
- env-setupSkill
- error-handlerSkill
- error-response-handlerSkill
- etl-pipeline-builderSkill
- file-organizerSkill
- form-builderSkill
- git-commit-messageSkill
- github-actions-builderSkill
- gitignore-generatorSkill
- graphql-schema-builderSkill
- icon-system-builderSkill
- input-validatorSkill
- integration-test-builderSkill
- jsdoc-generatorSkill
- json-schema-generatorSkill
- kubernetes-manifest-generatorSkill
- license-chooserSkill
- linter-fixerSkill
- load-testerSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Create clear, actionable error messages for better UX.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Error Message Writer
Create clear, actionable error messages for better UX.
Error Message Structure
[What went wrong] + [Why it happened] + [How to fix it]Good vs Bad Examples
| Bad | Good |
| "Error" | "Unable to save your changes. The file may be open in another program." |
| "Invalid input" | "Email address is invalid. Please enter a valid email like name@example.com" |
| "Error 500" | "Something went wrong on our end. Please try again in a few minutes." |
| "Forbidden" | "You don't have permission to view this page. Contact your admin for access." |
| "Network error" | "Unable to connect. Please check your internet connection and try again." |
Error Message Templates
Validation Errors
const validationMessages = {
required: (field) => `${field} is required`,
email: 'Please enter a valid email address',
minLength: (field, min) => `${field} must be at least ${min} characters`,
maxLength: (field, max) => `${field} cannot exceed ${max} characters`,
pattern: (field) => `${field} format is invalid`,
unique: (field) => `This ${field} is already taken`,
};API Errors
const apiErrors = {
401: 'Your session has expired. Please log in again.',
403: "You don't have permission to perform this action.",
404: "The requested resource couldn't be found.",
429: 'Too many requests. Please wait a moment and try again.',
500: 'Something went wrong. Our team has been notified.',
503: "We're temporarily unavailable. Please try again shortly.",
};Form Errors
function formatFormErrors(errors) {
return {
email: {
required: 'Email is required',
invalid: 'Please enter a valid email address',
taken: 'This email is already registered. Try logging in instead.',
},
password: {
required: 'Password is required',
weak: 'Password must include uppercase, lowercase, and a number',
mismatch: 'Passwords do not match',
},
};
}Guidelines
| Guideline | Example |
| Be specific | "File too large (max 5MB)" not "Upload failed" |
| Be human | "Oops!" not "EXCEPTION_OCCURRED" |
| Suggest action | "Try refreshing the page" |
| Avoid blame | "We couldn't process..." not "You entered wrong..." |
| Avoid jargon | "Connection lost" not "ECONNRESET" |
Error Component (React)
function ErrorMessage({ type, field, context }) {
const messages = {
network: 'Unable to connect. Check your internet and try again.',
permission: `You need ${context?.requiredRole} access for this.`,
notFound: `We couldn't find that ${field || 'item'}.`,
validation: `Please check your ${field} and try again.`,
};
return (
<div role="alert" className="error">
<span className="error-icon">!</span>
<span>{messages[type]}</span>
</div>
);
}Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

