← スキル一覧に戻る

error-handling-strategies
by dasien
Multi-agent development system template for Claude Code with specialized agents, task queue management, and automated workflows
⭐ 3🍴 1📅 2026年1月24日
SKILL.md
name: "Error Handling Strategies" description: "Implement robust error handling with proper validation, recovery mechanisms, and clear feedback for system stability" category: "implementation" required_tools: ["Read", "Write", "Edit", "Grep"]
Error Handling Strategies
Purpose
Implement robust error handling that gracefully manages failures, provides clear feedback, and maintains system stability.
When to Use
- Writing any code that can fail
- Handling external API calls
- Processing user input
- Managing file I/O operations
- Dealing with network requests
Key Capabilities
- Error Detection - Identify potential failure points
- Error Recovery - Implement fallback strategies
- Error Communication - Provide clear, actionable messages
Approach
- Identify what can go wrong (invalid input, network failure, etc.)
- Validate inputs before processing
- Use try-catch or error returns appropriately
- Provide context in error messages
- Log errors with sufficient debugging information
- Implement retry logic for transient failures
Example
Context: File reading operation
def read_config(filepath):
try:
with open(filepath, 'r') as f:
return json.load(f)
except FileNotFoundError:
logger.error(f"Config file not found: {filepath}")
return get_default_config()
except json.JSONDecodeError as e:
logger.error(f"Invalid JSON in {filepath}: {e}")
raise ConfigurationError(f"Config file is malformed at line {e.lineno}")
except PermissionError:
logger.error(f"Cannot read {filepath}: Permission denied")
raise ConfigurationError(f"Insufficient permissions for {filepath}")
Best Practices
- ✅ Fail fast for programming errors
- ✅ Recover gracefully from external failures
- ✅ Include context in error messages
- ❌ Avoid: Silent failures or generic error messages
スコア
総合スコア
60/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
✓説明文
100文字以上の説明がある
+10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です