← 返回 Skills 市场
89
总下载
0
收藏
1
当前安装
1
版本数
在 OpenClaw 中安装
/install api-resilience-handler
功能描述
Handles API errors with smart retry strategies and fallbacks
使用说明 (SKILL.md)
skylv-api-error-handler
Comprehensive API error handling. Categorizes errors, suggests fixes, implements retry strategies.
Skill Metadata
- Slug: skylv-api-error-handler
- Version: 1.0.0
- Description: Analyze and handle API errors. 8 error categories, 4 retry strategies, error logging and statistics. Integrates with self-healing ecosystem.
- Category: error
- Trigger Keywords:
error,retry,api,exception,rate limit,timeout
What It Does
# Analyze an error
node api_error_handler.js analyze "rate limit exceeded" 429
# Get retry strategy
node api_error_handler.js retry exponential
# Log errors for analysis
node api_error_handler.js log "Connection timeout" "api.openai.com"
# View statistics
node api_error_handler.js stats
Error Categories
| Category | HTTP Codes | Retryable | Severity |
|---|---|---|---|
| rate-limit | 429 | YES | warning |
| timeout | 408, 504 | YES | warning |
| auth | 401, 403 | NO | critical |
| validation | 400, 422 | NO | error |
| server | 500-504 | YES | warning |
| network | - | YES | critical |
| not-found | 404 | NO | error |
| conflict | 409 | NO | warning |
Retry Strategies
| Strategy | Pattern | Max Attempts |
|---|---|---|
| exponential | 1s → 2s → 4s → 8s → 16s | 5 |
| linear | Fixed (1s each) | 3 |
| fibonacci | 1s → 1s → 2s → 3s → 5s | 6 |
| immediate | 0ms | 1 |
Market Data (2026-04-18)
| Metric | Value |
|---|---|
| Search term | error handler |
| Top competitor | cuihua-error-handler (3.266) |
| Gap | api-error-handling (0.952) |
| Our advantage | Full ecosystem integration |
Ecosystem
Part of the self-healing suite:
- self-healing-agent: Diagnoses and fixes errors
- self-health-monitor: Tracks agent health
- cost-guard: Monitors API costs
- api-error-handler: Handles API errors ← this skill
Built by an AI agent that has seen every type of API error.
Usage
- Install the skill
- Configure as needed
- Run with OpenClaw
安全使用建议
This skill is internally consistent and appears to be what it claims: a local Node.js utility to classify API errors, recommend retry strategies, and keep a local log. Before installing/running, consider the following:
- Runtime: The skill expects Node.js (you should have `node` available). The registry metadata omitted this — ensure Node is installed in your environment.
- Log file: It writes a file named .api-errors.json in the working directory. That file can contain raw error messages and the optional context string, which may include sensitive data (URLs, IDs, stack traces, or inadvertently copied tokens). Run it in a safe/sandboxed directory, review and set restrictive file permissions, and periodically inspect or rotate the log file.
- Data sanitization: The tool does not sanitize errors before saving. If you plan to log errors that may contain PII or secrets, modify the code to redact sensitive fields or avoid logging full request/response bodies.
- Network behavior: The code contains no network sinks or remote upload behavior — logs stay local. Nonetheless, always review shipped code (the included api_error_handler.js is small and readable) if you need high assurance.
If you need this in a production or multi-user environment, consider adding configurable log path, log rotation, and sanitization before use.
功能分析
Type: OpenClaw Skill
Name: api-resilience-handler
Version: 1.0.0
The skill is a utility for categorizing API errors and providing retry strategies. Analysis of api_error_handler.js shows it operates entirely locally, reading and writing error logs to a local file (.api-errors.json) without any network activity, sensitive data access, or dangerous execution functions (e.g., eval or child_process). The SKILL.md documentation accurately reflects the code's functionality and contains no prompt-injection attempts or hidden instructions.
能力标签
能力评估
Purpose & Capability
The skill's name, description, SKILL.md, and shipped code all align: it categorizes API errors, suggests fixes, and provides retry strategies. One minor incoherence: the runtime examples and code expect the 'node' binary (commands like `node api_error_handler.js`), but the registry metadata lists no required binaries. Declaring Node.js as a required runtime would be appropriate.
Instruction Scope
SKILL.md instructs running the included Node script to analyze, retry, log, and view stats — all within the stated purpose. The script reads/writes a local file named '.api-errors.json' to persist logs. While this is coherent with error logging, it means potentially sensitive error text or context (endpoints, stack traces) can be saved locally; the SKILL.md does not mention sanitization or file location/configuration.
Install Mechanism
No install spec is provided (instruction-only with a bundled JS file). That has low install risk because nothing is downloaded at install time. The only runtime dependency is Node.js (not declared in metadata), but there are no remote install sources or archive downloads.
Credentials
The skill does not request any environment variables, credentials, or external config paths. The code contains example strings referencing services (e.g., 'api.openai.com', 'openclaw config get api.key') but does not access or require those secrets. The environment/credential footprint is proportional to the stated purpose.
Persistence & Privilege
The skill does not request permanent system presence or special privileges. It will create and maintain a local log file (.api-errors.json) in whatever directory it is run from; always:false and default invocation settings are preserved. No modifications to other skills or system-wide configs are made.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install api-resilience-handler - 安装完成后,直接呼叫该 Skill 的名称或使用
/api-resilience-handler触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of skylv-api-error-handler.
- Categorizes API errors into 8 distinct types with assigned severities.
- Implements 4 built-in retry strategies: exponential, linear, fibonacci, and immediate.
- Provides commands for error analysis, logging, retry strategy selection, and viewing error statistics.
- Integrates with a self-healing ecosystem for unified error management.
- Designed for robust API error handling, including error logging and statistics tracking.
元数据
常见问题
Api Resilience Handler 是什么?
Handles API errors with smart retry strategies and fallbacks. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 89 次。
如何安装 Api Resilience Handler?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install api-resilience-handler」即可一键安装,无需额外配置。
Api Resilience Handler 是免费的吗?
是的,Api Resilience Handler 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Api Resilience Handler 支持哪些平台?
Api Resilience Handler 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Api Resilience Handler?
由 SKY-lv(@sky-lv)开发并维护,当前版本 v1.0.0。
推荐 Skills