AGENT SKILL

vercel-reliability-patterns

Implement Vercel reliability patterns including circuit breakers, idempotency, and graceful degradation. Use when building fault-tolerant Vercel integrations, implementing retry strategies, or adding resilience to production Vercel services. Trigger with phrases like "vercel reliability", "vercel circuit breaker", "vercel idempotent", "vercel resilience", "vercel fallback", "vercel bulkhead".

License 许可
MIT
最近更新
2026-05-26
Stars
★ 0
Forks
0

01 前言 Front Matter

name
vercel-reliability-patterns
author
Jeremy Longshore <jeremy@intentsolutions.io>
license
MIT
version
1.0.0
description
Implement Vercel reliability patterns including circuit breakers, idempotency, and graceful degradation. Use when building fault-tolerant Vercel integrations, implementing retry strategies, or adding resilience to production Vercel services. Trigger with phrases like "vercel reliability", "vercel circuit breaker", "vercel idempotent", "vercel resilience", "vercel fallback", "vercel bulkhead".
allowed-tools
Read, Write, Edit
compatible-with
claude-code, codex, openclaw

02 资源文件 5

03 SKILL.md 正文

Vercel Reliability Patterns

Prerequisites

  • Understanding of circuit breaker pattern
  • opossum or similar library installed
  • Queue infrastructure for DLQ
  • Caching layer for fallbacks

Instructions

Building reliable Vercel-deployed services requires addressing reliability at two levels: the reliability of calls made from your serverless functions to external dependencies, and the reliability of the Vercel deployment itself as seen by end users. Circuit breakers protect against dependency degradation propagating to user-facing failures. Idempotency keys make operations safe to retry after function timeouts. Vercel's edge caching and instant rollback capabilities protect against deployment-level failures.

Step 1: Implement Circuit Breaker

Wrap calls to external services (databases, third-party APIs) inside your serverless functions with a circuit breaker. When a dependency is degraded, the circuit opens and subsequent calls immediately return a fallback response rather than waiting for the full timeout, which keeps your Vercel function execution time low and prevents cascading failures. Use a library like opossum and configure the failure threshold based on the dependency's expected reliability.

Step 2: Add Idempotency Keys

Generate deterministic keys for state-modifying API operations by hashing the request payload and user identity. Return the cached result for duplicate requests rather than executing the operation again. This is critical for mutation endpoints that may be retried by clients after a network error or Vercel function timeout.

Step 3: Configure Bulkheads

Separate processing queues for background operations so that a surge in low-priority work does not consume all available function concurrency and starve real-time user-facing requests.

Step 4: Set Up Dead Letter Queue

Route background operations that exceed their retry budget to a dead letter queue rather than silently dropping them. Alert on DLQ depth and provide a replay interface so failed operations can be reprocessed after the underlying issue is resolved.

Output

  • Circuit breakers protecting all external dependency calls from cascading failures
  • Idempotency implemented on all state-modifying API endpoints
  • Bulkhead concurrency isolation between real-time and background workloads
  • Dead letter queue capturing and alerting on permanently failed operations

Error Handling

See ${CLAUDE_SKILL_DIR}/references/errors.md for comprehensive error handling.

Examples

See ${CLAUDE_SKILL_DIR}/references/examples.md for detailed examples.

Resources

Overview

Implement Vercel reliability patterns including circuit breakers, idempotency, and graceful degradation.

04 同仓库更多 Skills

SamuelChien
SamuelChien/mega-skills-collection

zustand-store-ts

Create Zustand stores with TypeScript, subscribeWithSelector middleware, and proper state/action separation. Use when building React state management, creating global stores, or implementing reactive state patterns with Zustand.

★ 0
SamuelChien
SamuelChien/mega-skills-collection

zustand-store-creator

Zustand Store Creator - Auto-activating skill for Frontend Development. Triggers on: zustand store creator, zustand store creator Part of the Frontend Development skill category.

★ 0
SamuelChien
SamuelChien/mega-skills-collection

zero-trust-config-helper

Zero Trust Config Helper - Auto-activating skill for Security Advanced. Triggers on: zero trust config helper, zero trust config helper Part of the Security Advanced skill category.

★ 0
SamuelChien
SamuelChien/mega-skills-collection

zapier-integration-helper

Zapier Integration Helper - Auto-activating skill for Business Automation. Triggers on: zapier integration helper, zapier integration helper Part of the Business Automation skill category.

★ 0
SamuelChien
SamuelChien/mega-skills-collection

zai-cli

Execute z.AI CLI providing vision, search, reader, and GitHub exploration via CLI and MCP. Use when user needs image/video analysis, OCR, UI-to-code conversion, error diagnosis, real-time web search, web page to markdown extraction, or GitHub code exploration. Trigger with phrases like "analyze this image", "search the web for", "read this page", "explore this repo", or "use zai". Requires Z_AI_API_KEY.

★ 0
SamuelChien
SamuelChien/mega-skills-collection

yt-research

Research competitor YouTube channels, niches, and trending topics for your content strategy. Use this skill whenever the user says "research channels", "analyze competitors", "find trending topics", "niche analysis", "competitive research", "what are other creators doing", "scrape YouTube channels", or wants to understand the competitive landscape for a specific tool or topic area. Use when working with yt research. Trigger with 'yt', 'research'.

★ 0