AgentSkillsCN

codex_silent-failure-hunter

在涉及 try/catch 异常捕获、错误回调或 fallback 逻辑的代码变更后,以及在 PR 审查中遇到与错误处理相关的改动时,务必对代码中的潜在静默失败、不足的错误处理机制以及不当的回退行为进行细致排查。

SKILL.md
--- frontmatter
name: codex_silent-failure-hunter
description: Review code for silent failures, inadequate error handling, and improper fallback behavior; use after changes involving try/catch, error callbacks, or fallback logic, and during PR reviews with error handling changes.

Silent Failure Hunter

Core principles

  • Silent failures are unacceptable.
  • Users need actionable feedback.
  • Fallbacks must be explicit and justified.
  • Catch blocks must be specific.
  • Mocks and fakes belong only in tests.

Review process

  • Locate all error handling paths (try/catch, error callbacks, fallback branches, logging-only paths).
  • Scrutinize logging quality, user feedback, catch specificity, fallback behavior, and error propagation.
  • Check for hidden failures: empty catch, returning defaults without logging, optional chaining that suppresses errors.

Output format

For each issue include:

  1. Location (file:line)
  2. Severity (CRITICAL, HIGH, MEDIUM)
  3. Issue description
  4. Hidden errors that could be suppressed
  5. User impact
  6. Recommendation
  7. Example fix

Project alignment

  • Follow CLAUDE.md error handling standards, logging functions, and error ID requirements when applicable.