Token导航 LogoToken导航TokenDH.com
研究检索可写文件github未标认证来源可访问许可证需确认审计通过

codeprobe-error-handling代码探针错误处理

Agent Skill

codeprobe-error-handling 用于记录任务执行中的错误、用户纠正、经验和能力缺口,适合在 Codex、Claude、Cursor、Gemini CLI 中希望让 Agent 持续沉淀问题、修正和最佳实践时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

652

周安装

28

GitHub Stars

4

下载量

228
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:codeprobe-error-handling(代码探针错误处理)
来源仓库:https://github.com/nishilbhave/codeprobe
仓库路径:skills/codeprobe-error-handling
安装命令:
npx skills add https://github.com/nishilbhave/codeprobe --skill codeprobe-error-handling
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/nishilbhave/codeprobe --skill codeprobe-error-handling

简介

用于记录任务执行中的错误、用户纠正和经验缺口。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中持续沉淀问题与修正方案。
  • 通过 npx 命令安装,具体用法需结合原始 README 进一步确认。
  • 使用前应确认权限范围、维护状态及是否触发联网或文件读写。
  • codeprobe-error-handling 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Standalone Mode

If invoked directly (not via the orchestrator), you must first:

  1. Read ../codeprobe/shared-preamble.md for the output contract, execution modes, and constraints.
  2. Load applicable reference files from ../codeprobe/references/ based on the project's tech stack.
  3. Default to full mode unless the user specifies otherwise.

Error Handling & Resilience Checker

Domain Scope

This sub-skill detects error handling and resilience issues across these categories:

  1. Swallowed Exceptions — Empty catch blocks, catch-and-log-only without rethrow/handle
  2. Missing Error Handling — External API calls without try/catch, unhandled promise rejections
  3. Error Information — Generic error messages, leaking internals, missing structured responses
  4. Retry & Circuit Breaker — No timeout on external calls, no retry for transient failures
  5. Validation — Missing input validation, implicit null assumptions, type coercion bugs
  6. Transaction Safety — Multi-step DB operations without transactions, missing rollback
  7. Logging — No logging on critical paths, missing correlation IDs

What It Does NOT Flag

  • Sensitive data in logs — covered by codeprobe-security (SEC prefix). This sub-skill flags *missing* logging and *structural* issues like no correlation IDs, not data leakage.
  • Test files — test exception handling follows different patterns and is expected to be simpler.
  • Framework-generated exception handlers (e.g., Laravel's Handler.php, Next.js error boundaries that are intentionally minimal) — these are scaffolded defaults, not developer oversights.
  • CLI scripts with intentionally simple error handling (print + exit) — command-line tools often use a valid pattern of printing an error and exiting with a non-zero code.
  • Catch blocks that deliberately swallow specific known-harmless exceptions with a comment explaining why — if the developer documented the rationale, respect the decision.
  • Issues that are primarily security vulnerabilities (e.g., authentication bypasses, injection, data exposure) even if they also have error handling implications — these are covered by codeprobe-security. If both sub-skills flag the same location, the orchestrator will deduplicate and keep the security finding as primary.

Detection Instructions

Swallowed Exceptions

ID PrefixWhat to DetectHow to DetectSeverity
ERREmpty catch blocksSearch for catch blocks with empty body, only pass, only // ignored, or only a comment. In JS/TS: catch (e) {}. In PHP: catch (\Exception $e) {}. In Python: except: pass or except Exception: pass.Major
ERRCatch-log-only without handlingFind catch blocks that only contain a log/print statement but don't rethrow, return an error, or take any recovery action. The exception is swallowed after logging.Minor
ERROverly broad exception catchingcatch (\Exception $e), catch (Exception e), bare except: in Python, catch (e) catching all errors. Flag when a more specific exception type should be caught.Major

Missing Error Handling

ID PrefixWhat to DetectHow to DetectSeverity
ERRExternal API calls without try/catchSearch for HTTP client calls (Guzzle, axios, fetch, requests, HttpClient), payment SDK calls (Stripe, PayPal), AWS SDK calls, and other external service integrations. Flag when these calls are NOT wrapped in try/catch or.catch().Major
ERRUnhandled promise rejectionsSearch for async functions or promise chains without .catch() or surrounding try/catch. Look for floating promises (async call without await). In Node.js, check for missing unhandledRejection handler.Major
ERRFile I/O without error handlingfile_get_contents, fopen, fs.readFile, open() (Python) without try/catch for IOError/FileNotFoundError.Minor

Error Information

ID PrefixWhat to DetectHow to DetectSeverity
ERRGeneric error messagesAPI responses returning only "Something went wrong", "Internal server error", or similar without error codes or actionable detail for the client.Minor
ERRLeaking internal errors to API consumersException messages, stack traces, SQL errors, or file paths exposed in API JSON/HTML responses. Check error handling middleware configuration.Major
ERRMissing structured error responsesAPI endpoints returning errors without consistent structure (no error code field, no message field, inconsistent formats across endpoints).Minor

Retry & Circuit Breaker

ID PrefixWhat to DetectHow to DetectSeverity
ERRExternal service calls without timeoutHTTP client calls without timeout configuration. Guzzle without timeout option, axios without timeout, requests without timeout param, fetch without AbortController.Major
ERRNo retry for transient failuresExternal API calls that could fail transiently (HTTP 429, 503, network errors) with no retry mechanism.Minor
ERRNo circuit breaker for cascading failuresService-to-service calls in microservice architectures with no circuit breaker or fallback pattern.Suggestion

Validation

ID PrefixWhat to DetectHow to DetectSeverity
ERRMissing input validation before processingFunctions that accept external input (request params, file contents, API payloads) and use them directly without validation.Major
ERRImplicit null assumptionsAccessing properties or calling methods on values that could be null/undefined without null checks. Chaining . access on possibly-null return values.Minor
ERRType coercion bugsPHP == instead of === for security-sensitive comparisons. JS == instead of ===. Implicit type conversions that could produce unexpected results.Minor

Transaction Safety

ID PrefixWhat to DetectHow to DetectSeverity
ERRMulti-step DB ops without transactionsMultiple INSERT/UPDATE/DELETE queries in sequence (same method) without DB::transaction(), atomic(), BEGIN/COMMIT, or equivalent. If any step fails, data is left in an inconsistent state.Critical
ERRTransaction without proper rollbackTransaction blocks that catch exceptions but don't rollback, or that have code after the transaction that assumes success without checking.Major

Logging

ID PrefixWhat to DetectHow to DetectSeverity
ERRNo logging on critical failure pathsCatch blocks in critical business logic (payment, auth, order processing) that don't include any logging. Failures happen silently.Major
ERRMissing correlation/request IDsLog statements in request-handling code without correlation ID, request ID, or trace ID. Makes debugging distributed issues impossible.Minor

ID Prefix & Fix Prompt Examples

All findings use the ERR- prefix, numbered sequentially: ERR-001, ERR-002, etc.

Fix Prompt Examples

  • "Wrap the Stripe API call in PaymentService@charge (line 55) in a try/catch for \Stripe\Exception\ApiErrorException. Log the error with context ($orderId, $amount) and throw a domain-specific PaymentFailedException with a user-friendly message."
  • "Add DB::transaction() around the order creation flow in OrderService@create (lines 40-65) which currently creates an Order, OrderItems, and Payment record in three separate queries. If any step fails, all should roll back."
  • "Replace the empty catch block at app/Services/NotificationService.php:88 with proper error handling: log the exception with notification context, then decide whether to rethrow (critical notification) or swallow with a metric (non-critical)."
  • "Add timeout and retry configuration to the HTTP client call at ExternalApiClient.php:30. Use ->timeout(10)->retry(3, 100) for the Guzzle request to handle transient network failures."

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

37.44%
按下载量换算85

Claude

29.88%
按下载量换算68

Cursor

17.24%
按下载量换算39

Gemini CLI

9.25%
按下载量换算21

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

可写文件

该 Skill 可能写入或修改本地文件,使用前需要确认目标目录和修改范围。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills