jpskill.com
🛠️ 開発・MCP コミュニティ

global-error-handling

Implement user-friendly error handling with specific exception types, centralized error handling, graceful degradation, and proper resource cleanup. Use this skill when implementing error handling in controllers, services, or API endpoints, when creating custom exception classes, when writing try-catch blocks, when handling external service failures, when implementing retry strategies, when displaying error messages to users, when cleaning up resources in finally blocks, or when implementing fail-fast validation and error detection.

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o global-error-handling.zip https://jpskill.com/download/18627.zip && unzip -o global-error-handling.zip && rm global-error-handling.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/18627.zip -OutFile "$d\global-error-handling.zip"; Expand-Archive "$d\global-error-handling.zip" -DestinationPath $d -Force; ri "$d\global-error-handling.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して global-error-handling.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → global-error-handling フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-18
取得日時
2026-05-18
同梱ファイル
1

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

グローバルエラー処理

この Skill は、グローバルエラー処理に関連するコーディング標準を遵守する方法について、Claude Code に具体的なガイダンスを提供します。

この Skill を使用する場面

  • コントローラ、サービス、または API エンドポイントでエラー処理を実装する場合
  • 特定のエラーシナリオに対するカスタム例外クラスを作成する場合
  • エラー処理のために try-catch ブロックを記述する場合
  • 技術的な詳細を公開せずに、ユーザーフレンドリーなエラーメッセージを提供する場合
  • fail-fast 検証と事前条件チェックを実装する場合
  • 適切な境界(コントローラ、API レイヤ)でエラーを処理する場合
  • 重要でないサービス障害に対するグレースフルデグラデーションを実装する場合
  • 外部サービスに対して指数バックオフを用いたリトライ戦略を作成する場合
  • finally ブロックでリソース(ファイルハンドル、データベース接続)をクリーンアップする場合
  • try-catch をあちこちに分散させるのではなく、エラー処理を一元化する場合
  • 一時的な障害と永続的な障害を区別して処理する場合
  • 機密情報を保護しながら、適切にエラーをログに記録する場合

指示

詳細については、次のファイルに記載されている情報を参照してください。 global error handling

📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

Global Error Handling

This Skill provides Claude Code with specific guidance on how to adhere to coding standards as they relate to how it should handle global error handling.

When to use this skill

  • When implementing error handling in controllers, services, or API endpoints
  • When creating custom exception classes for specific error scenarios
  • When writing try-catch blocks for error handling
  • When providing user-friendly error messages without exposing technical details
  • When implementing fail-fast validation and precondition checks
  • When handling errors at appropriate boundaries (controllers, API layers)
  • When implementing graceful degradation for non-critical service failures
  • When creating retry strategies with exponential backoff for external services
  • When cleaning up resources (file handles, database connections) in finally blocks
  • When centralizing error handling rather than scattering try-catch everywhere
  • When handling transient vs. permanent failures differently
  • When logging errors appropriately while protecting sensitive information

Instructions

For details, refer to the information provided in this file: global error handling