api-automation-architect

Designs resilient API automation workflows with idempotency, retries, circuit breakers, and observability.

1|Updated Aug 25, 2026
One-click install
npx skills add https://github.com/sabiscore/swarmxq --skill api-automation-architect-sabiscore
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-automation-architect
Source: https://github.com/sabiscore/swarmxq/tree/main/.ai/skills/api-automation-architect
Command: npx skills add https://github.com/sabiscore/swarmxq --skill api-automation-architect-sabiscore

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Building API integrations that survive real-world failures is hard: duplicate webhook deliveries, transient 503s, cascading downstream outages, and lost jobs all break naive integrations. This Skill provides a structured protocol for designing and generating production-hardened API automation workflows where every call has a timeout, every write is idempotent, and every failure is typed and observable. ## Core Features & Use Cases - Resilience Pattern Taxonomy: Classifies workflows (single call, sequential chain, fan-out, event-driven, long-running, bidirectional sync) and maps them to patterns like idempotency keys, exponential backoff, circuit breakers, dead letter queues, sagas, and the outbox pattern. - TypeScript Implementation Generation: Produces concrete code using ky/fetch, p-retry or cockatiel for retries and circuit breaking, BullMQ for queued work, and OpenTelemetry spans for tracing. - Idempotency & Observability Enforcement: Generates deterministic idempotency-key handling with Redis and a checklist requiring spans, structured retry logs, latency metrics, and alert thresholds per workflow. - Use Case: A user asks to build a Stripe webhook processor that handles duplicate deliveries; the Skill designs the idempotency-key flow, retry policy, DLQ fallback, and emits the instrumented TypeScript implementation. ## Quick Start Ask the assistant to design a resilient integration, for example: "Build a webhook processor for Stripe that handles duplicate deliveries with retry logic and a dead letter queue."

Frequently Asked Questions about api-automation-architect

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I make an API call resilient with retry logic in TypeScript?

Wrap the call in a retry policy using p-retry or cockatiel with a max attempt ceiling, exponential backoff, and a timeout via abort signals. Classify errors so only transient failures like 503s and rate limits are retried.

How do I handle duplicate webhook deliveries?

Use webhook idempotency: derive a deterministic key from the event payload, check a Redis store before processing, and cache the result so repeated deliveries return the stored response without re-executing side effects.

When should I use a circuit breaker instead of retries?

Use a circuit breaker when a downstream service is degraded and continued requests would cause cascading load. Retries handle transient failures; the breaker trips after a failure threshold and pauses traffic until a recovery timeout elapses.

What is the difference between cockatiel and p-retry for retries?

p-retry provides simple retry-with-backoff for single operations, while cockatiel offers composable policies including retry, timeout, and circuit breaker in one library. The Skill defaults to cockatiel when circuit breaking is required.

When should API workflows move into a BullMQ queue?

Move work into a BullMQ queue when the workflow exceeds roughly 500ms, involves long-running polling or job orchestration, or must guarantee no lost work through a dead letter queue on failure.

What observability should an API integration emit?

Emit one OpenTelemetry span per external call with duration and status, structured logs per retry attempt, success-rate and p50/p95/p99 latency metrics, and an alert condition such as error rate exceeding a threshold over a time window.