clay-reliability-patterns

Featured

Build fault-tolerant Clay integrations with circuit breakers, dead letter queues, and graceful degradation. Use when building production Clay pipelines that need resilience, implementing retry strategies, or adding fault tolerance to enrichment workflows. Trigger with phrases like "clay reliability", "clay circuit breaker", "clay resilience", "clay fallback", "clay fault tolerance", "clay dead letter queue".

AI & Automation 2,944 stars 440 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Clay Reliability Patterns ## Overview Production reliability patterns for Clay data enrichment pipelines. Clay's async enrichment model, credit-based billing, and dependency on 150+ external data providers require specific resilience strategies: credit budget circuit breakers, webhook delivery tracking, dead letter queues for failed batches, and graceful degradation when Clay is unavailable. ## Prerequisites - Clay integration in production or pre-production - Redis or similar for state tracking - Understanding of Clay's async enrichment model - Monitoring infrastructure (see `clay-observability`) ## Instructions ### Step 1: Credit Budget Circuit Breaker Stop processing when credit burn exceeds budget to prevent runaway costs: ```typescript // src/clay/circuit-breaker.ts class CreditCircuitBreaker { private state: 'closed' | 'open' | 'half-open' = 'closed'; private dailyCreditsUsed = 0; private failureCount = 0; private lastFailureAt: Date | null = null; private readonly cooldownMs: number; constructor( private dailyLimit: number, private failureThreshold: number = 5, cooldownMinutes: number = 15, ) { this.cooldownMs = cooldownMinutes * 60 * 1000; } canProcess(estimatedCredits: number): { allowed: boolean; reason?: string } { // Check circuit state if (this.state === 'open') { // Check if cooldown has elapsed if (this.lastFailureAt && Date.now() - this.lastFailureAt.getTime() > this.cooldownMs) { this.s...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
1 years ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category