跳到正文
cccskills
免费在 GitHub 公开

error-handler-gen

Generate framework-specific API error handling code, including middleware, custom error classes, HTTP status codes, and wrappers for catching rejected promises. Examples cover Express, Fastify, Next.js API routes, and Koa; Node.js 18+ and an OpenAI API key are listed requirements.

中文简介正在准备中。当前显示英语简介。

原文查看原文说明

Generate error handling middleware for any framework. Use when setting up API error handling.

sundial-org/awesome-openclaw-skills星标 671(GitHub 671 + cccskills 0)
集成工具X (Twitter)

实测评分 未实测

查看安装方法

适用场景

  • Adding consistent error responses to a new API
  • Standardizing error handling across routes
  • Generating middleware for an Express or Koa app
  • Handling rejected promises in API code

包含的文件(11)

  • SKILL.md2.0 KB
  • dist/cli.d.ts31 B
  • dist/cli.js2.8 KB
  • dist/index.d.ts97 B
  • dist/index.js1.3 KB
  • package-lock.json30.2 KB
  • package.json673 B
  • README.md642 B
  • src/cli.ts1.2 KB
  • src/index.ts1021 B
  • tsconfig.json251 B

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Error Handler Generator

Good error handling means custom error classes, proper status codes, and consistent response shapes. This tool generates all of it for your framework.

One command. Zero config. Just works.

Quick Start

npx ai-error-handler express

What It Does

  • Generates error middleware for your framework
  • Creates custom error classes (NotFoundError, ValidationError, etc.)
  • Includes async wrapper to catch promise rejections
  • Sets up proper HTTP status codes

Usage Examples

# Express middleware
npx ai-error-handler express

# Fastify in JavaScript
npx ai-error-handler fastify -l javascript

# Next.js API routes
npx ai-error-handler nextjs -o lib/errors.ts

# Koa
npx ai-error-handler koa

Best Practices

  • Don't leak stack traces - only show them in development
  • Log errors server-side - you need them for debugging
  • Use error codes - clients can handle specific codes
  • Be consistent - same error shape everywhere

When to Use This

  • Starting a new API project
  • Standardizing error handling across routes
  • Adding proper error responses to a messy codebase
  • Setting up error monitoring

Part of the LXGIC Dev Toolkit

This is one of 110+ free developer tools built by LXGIC Studios. No paywalls, no sign-ups, no API keys on free tiers. Just tools that work.

Find more:

Requirements

No install needed. Just run with npx. Node.js 18+ recommended. Needs OPENAI_API_KEY environment variable.

npx ai-error-handler --help

How It Works

Generates framework-specific error handling code including custom error classes, middleware, and async wrappers. The output follows best practices for each framework.

License

MIT. Free forever. Use it however you want.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

1password

免费

Set up and use the 1Password command-line tool `op` to sign in, verify account access, and work with vault data. The skill covers single or multiple accounts and shows how to run commands or fill templates with secrets while limiting exposure in logs and files.

中文简介正在准备中。当前显示英语简介。

  • Set up the `op` command-line tool
  • Sign in and verify access to an account
  • Run a command with vault secrets
sundial-org/awesome-openclaw-skills6712026年3月7日 更新

Check live prices, price changes, and trading volume for Shanghai, Shenzhen, and Beijing stocks. Review intraday volume patterns and possible large-investor activity, and manage holdings with cost, quantity, and profit or loss summaries.

中文简介正在准备中。当前显示英语简介。

  • Checking current prices for A-share stocks
  • Reviewing intraday volume and large-investor signals
  • Managing a stock portfolio and checking profit or loss
sundial-org/awesome-openclaw-skills6712026年3月7日 更新

Scan HTML or JSX files and directories for accessibility issues such as missing image descriptions, form labels, and keyboard access problems. The skill identifies WCAG guideline failures and provides suggested code fixes alongside its findings.

中文简介正在准备中。当前显示英语简介。

  • Checking a new component before release
  • Auditing an inherited codebase
  • Preparing for an accessibility compliance review
sundial-org/awesome-openclaw-skills6712026年3月7日 更新

Plan A/B tests that compare page or product changes, with clear hypotheses, sample sizes, success metrics, and traffic allocation. Get a structured test plan and guidance for interpreting results and deciding what to try next.

中文简介正在准备中。当前显示英语简介。

  • Comparing signup button copy
  • Planning a pricing page experiment
  • Estimating sample size and test duration
sundial-org/awesome-openclaw-skills6712026年3月7日 更新

Turn LinkedIn profile URLs into coordinated account-based outreach. The workflow gathers profile details, enriches contacts with email and phone data, looks up mailing addresses, and prepares email, LinkedIn, and handwritten-letter touches with the specified services.

中文简介正在准备中。当前显示英语简介。

  • Building a multichannel campaign from LinkedIn prospect URLs
  • Enriching prospect records with work contact details
  • Coordinating email, LinkedIn, and handwritten mail outreach
sundial-org/awesome-openclaw-skills6712026年3月7日 更新

accli

免费

Work with Apple Calendar on macOS to list calendars, find and view events, and check busy time slots across calendars. Create, update, or delete events with details such as dates, locations, and descriptions.

中文简介正在准备中。当前显示英语简介。

  • Reviewing events on a work or personal calendar
  • Checking availability before scheduling a meeting
  • Creating or updating a calendar event
sundial-org/awesome-openclaw-skills6712026年3月7日 更新

查看 sundial-org 的全部技能

报告此技能的问题