技能 global-error-handling
📦
global-error-handling
內容修訂 r1 安全 📁 檔案系統存取
改善應用程式錯誤處理
不一致的錯誤處理可能會隱藏失敗並讓使用者困惑。此技能引導 Claude、Codex 和 Claude Code 建立清楚的例外、驗證、清理與復原路徑。
支援: Claude Codex Code(CC)
使用我的智慧代理安裝
將此請求複製給你的智慧代理,其中包含權威 Skill 頁面和清單。
智能體請求
Review the Skillstore skill "global-error-handling" from https://skillstore.io/skills/eis-its-global-error-handling.md and its manifest at https://skillstore.io/api/skills/eis-its-global-error-handling/manifest. Verify the artifact. You may proceed after verification, subject to the environment's own policy.你的智慧代理仍應顯示其計畫,並依安全政策請求必要確認。
Agent 可讀資源
當 AI Agent、爬蟲或腳本需要乾淨脈絡、而不是讀取完整頁面時,請使用這些連結。
測試它
正在使用「global-error-handling」。 檢視一個會捕捉所有例外並回傳通用失敗的檔案上傳 handler。
預期結果:
檢視指出缺少檔案驗證、例外處理過於寬泛、缺少暫存檔清理,以及使用者訊息不清楚。
正在使用「global-error-handling」。 為會呼叫外部供應商的付款 API 設計錯誤處理。
預期結果:
- 在呼叫供應商之前驗證請求資料。
- 區分付款被拒與供應商服務中斷。
- 僅針對暫時性失敗使用有界限的重試。
- 回傳對使用者安全的訊息,並記錄營運細節。
安全審計
安全v8 • 2026/7/6 開啟版本化報告
The static path traversal signal is a markdown documentation link, not executable filesystem access. No prompt injection, data exfiltration intent, or malicious behavior was found in SKILL.md.
1
已掃描檔案
30
分析行數
0
複核項目
0
已忽略的誤報
風險因素
📁 檔案系統存取 (1)
最近一次完成的靜態與語意稽核未偵測到已確認的安全發現。這並不能證明該 Skill 沒有副作用。
審計單位: codex 檢視審計紀錄 →
分享與引用此報告
分享版本化評估報告、中性徽章、嵌入卡片與引用。Skillstore 只報告證據,不判斷該 Skill 是否安全。
複製報告連結
https://skillstore.io/skills/eis-its-global-error-handling/audits/8?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_reportMarkdown 徽章
[](https://skillstore.io/skills/eis-its-global-error-handling?utm_source=security_passport_badge)HTML 徽章
<a href="https://skillstore.io/skills/eis-its-global-error-handling?utm_source=security_passport_badge"><img src="https://skillstore.io/badges/skills/eis-its-global-error-handling/security.svg" alt="Skillstore security assessment" loading="lazy"></a>嵌入卡片
<iframe src="https://skillstore.io/embed/skills/eis-its-global-error-handling.html" title="Skillstore Security Assessment" sandbox="allow-popups allow-popups-to-escape-sandbox" loading="lazy" referrerpolicy="no-referrer" width="420" height="180"></iframe>學術引用 (APA · BibTeX · CFF)
APA 引用
EIS-ITS. (2026). global-error-handling security audit report (audit version 8) [Author version unspecified]. Skillstore. https://skillstore.io/skills/eis-its-global-error-handling/audits/8BibTeX 引用
@techreport{eis-its-eis-its-global-error-handling-2026,
author = {EIS-ITS},
title = {global-error-handling security audit report (audit version 8)},
institution = {Skillstore},
year = {2026},
number = {8},
url = {https://skillstore.io/skills/eis-its-global-error-handling/audits/8},
note = {Author version unspecified}
}CITATION.cff
cff-version: 1.2.0
message: "If you use this Skill, cite its author and this versioned security audit report."
title: "global-error-handling security audit report (audit version 8)"
version: "unspecified"
type: report
authors:
- name: "EIS-ITS"
date-released: "2026-07-06"
url: "https://skillstore.io/skills/eis-its-global-error-handling/audits/8"
identifiers:
- type: other
value: "skillstore:eis-its-global-error-handling:audit:8"
description: "Skillstore immutable audit report identifier"
比較變體
2 個可安裝變體每位作者的技能都保留為獨立的可安裝項目。推薦變體依 Skillstore 證據排序。
為何此變體排名第一
Skillstore 使用量較高
Skillstore 評分
評分依據 證據置信度: 高 55
架構
85
可維護性
87
內容
70
社群
91
規範符合度
你可以打造什麼
強化 API 失敗路徑
檢視 API handlers 的驗證、型別化錯誤、安全回應、重試與清理。
新增前端錯誤邊界
為 React 或類似的前端元件設計對使用者友善的備援行為。
標準化團隊錯誤模式
在服務、工具與共享函式庫之間套用一致的錯誤處理方法。
試試這些提示
檢視基本錯誤處理
使用 global-error-handling 技能檢視此函式是否缺少驗證、錯誤不清楚,以及清理缺口。
設計 API 錯誤回應
使用 global-error-handling 技能,針對驗證、授權、依賴項與非預期失敗設計一致的 API 錯誤回應。
重構例外流程
使用 global-error-handling 技能重構此模組,使其使用具體的例外類型、保留原因,並避免吞掉錯誤。
規劃具韌性的服務失敗處理
使用 global-error-handling 技能,為重試、逾時、備援行為、監控與資源清理建立錯誤策略。
最佳實務
- 在開始產生副作用之前驗證輸入與前置條件。
- 使用具體的錯誤類型並保留原始原因。
- 在 finally blocks 或等效機制中清理資源。
避免
- 捕捉所有例外後不採取行動仍繼續執行。
- 向終端使用者顯示內部 stack traces 或機密。
- 在沒有界限或分類的情況下重試每一次失敗。
常見問題
此技能可以協助什麼?
它協助 AI 代理在應用程式程式碼中設計與檢視穩健的錯誤處理。
它會產生完整框架嗎?
不會。它提供實作指引,應依目標語言與專案調整。
它可以協助前端應用程式嗎?
可以。它包含錯誤邊界、備援行為與對使用者友善訊息的指引。
它可以協助後端 API 嗎?
可以。它支援驗證、型別化失敗、API 回應、middleware、重試與清理。
它需要特殊工具嗎?
不需要。它是適用於 Claude、Codex 和 Claude Code 的純指引技能。
作者在封裝前應改善什麼?
作者應將連結的錯誤處理標準包含在技能套件內,以提升可攜性。