wasintoh/toh-framework/error-handling
Claude Code and agent skill by wasintoh/toh-framework
- community
Checking that the SKILL.md file is still in the repository.
Intelligent error handling — silently auto-fix routine errors (missing imports, undefined variables, type mismatches, missing dependencies, syntax and lint issues) and translate everything else into friendly, non-technical language with clear next steps. The user never sees raw error messages or stack traces. Use whenever an error, warning, or failure surfaces while working.
Install
npx vskill@latest install wasintoh/toh-framework/error-handlingSKILL.md
The same SKILL.md was published earlier as wasintoh/toh-framework/error-handling.
🔧 Error Handling Skill
Purpose: Auto-fix errors silently, translate when necessaryVersion: 1.0.0Author: Toh Framework Team
Overview
This skill enables AI to handle errors intelligently - fixing them silently when possible, and translating them to human-friendly language when user needs to know.
Core Principle
USER SHOULD NEVER SEE RAW ERROR MESSAGES
Error Handling Strategy
Level 1: Silent Auto-Fix (User sees nothing)
These errors should be fixed WITHOUT telling user:
| Error Type | Auto-Fix Strategy | |
|---|---|---|
| Missing import | Add the import | |
| Undefined variable | Check context, add definition | |
| Type mismatch | Fix the type | |
| Missing dependency | Install it | |
| Syntax error | Fix syntax | |
| Missing file | Create it | |
| Linting errors | Auto-format |
User Experience:
Level 2: Silent Fix with Brief Mention
Fix automatically but mention briefly:
| Error Type | Action | |
|---|---|---|
| Deprecated API | Fix + mention "อัพเดทเป็น API ใหม่ให้แล้ว" | |
| Security vulnerability | Fix + mention "ปรับให้ปลอดภัยขึ้น" | |
| Performance issue | Fix + mention "optimize ให้แล้ว" |
User Experience:
Level 3: Friendly Translation (User needs to act)
When AI can't fix automatically:
| Situation | Friendly Message | |
|---|---|---|
| Missing API key | "ต้องใส่ API key ก่อนนะครับ ไปเอาได้ที่ [link]" | |
| Network error | "อินเทอร์เน็ตมีปัญหา ลองใหม่อีกครั้งนะครับ" | |
| Permission denied | "ไม่มีสิทธิ์เข้าถึง ลองเช็ค permission ดูครับ" | |
| Database connection | "เชื่อมต่อ database ไม่ได้ เช็ค .env ดูครับ" |
Common Error Patterns & Auto-Fix
TypeScript Errors
React Errors
Next.js Errors
Supabase Errors
Auto-Fix Loop
When error occurs during task:
Implementation:
Error Translation Dictionary
Build Errors
| Raw Error | Friendly Translation | |
|---|---|---|
Module not found | (Silent fix - install/create) | |
Unexpected token | (Silent fix - fix syntax) | |
ENOENT: no such file | (Silent fix - create file) | |
Port already in use | "Port ถูกใช้อยู่ ลองปิดโปรแกรมอื่นหรือเปลี่ยน port ครับ" | |
Out of memory | "Memory ไม่พอ ลองปิดโปรแกรมอื่นครับ" |
Runtime Errors
| Raw Error | Friendly Translation | |
|---|---|---|
undefined is not a function | (Silent fix - check the call) | |
Cannot read properties of undefined | (Silent fix - add null check) | |
Maximum call stack exceeded | (Silent fix - fix recursion) | |
Network request failed | "เชื่อมต่อไม่ได้ ลองเช็คอินเทอร์เน็ตครับ" | |
CORS error | (Silent fix - add API route proxy) |
Database Errors
| Raw Error | Friendly Translation | |
|---|---|---|
Connection refused | "เชื่อมต่อ database ไม่ได้ ลองเช็ค connection string ครับ" | |
Duplicate key | (Silent fix - handle upsert) | |
Foreign key constraint | (Silent fix - adjust order of operations) | |
Permission denied | "ไม่มีสิทธิ์ ลองเช็ค RLS policy ครับ" |
User-Facing Error Format
When error MUST be shown to user:
Example: Complete Error Handling Flow
Integration with Test Agent
When /toh-test runs:
User should NOT see individual test failures during auto-fix loop.
Configuration (Future)
Allow users to configure error verbosity in .toh/config.json:
Anti-Patterns (Don't Do)
❌ Don't show raw stack traces
❌ Don't blame the user
❌ Don't give up too easily
Last Updated: 2024-12-03
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingsrc/skills/error-handling/SKILL.md
Popularity
- Repository stars
- 96
- Repository forks
- 19
- 7-day trend score
- 23
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 16 Mar 2026, 8 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/wasintoh/toh-framework/error-handling)