sync-retry
SKILL.md
Sync Retry
Minimal, transport-aware retry wrapper. Prefer retry(fn) with defaults in almost all call sites.
Decision Guide
- One-shot Redis/network call:
retry(() => call())— defaults are sufficient. - Blocking stream loop (queue/topic/ephemeral reader): use
attempts: Number.POSITIVE_INFINITY+signalso the loop retries indefinitely until aborted. - Business/domain error: do NOT wrap with retry. Retry is only for transient transport errors.
Gotchas
retryIfdefault (isRetryableTransportError) matches error codes (ECONNRESET,ETIMEDOUT,ECONNREFUSED,ENOTFOUND,EPIPE,EHOSTUNREACH,ECONNABORTED) and message substrings (connection,socket,broken pipe,network,clusterdown,tryagain,loading). Any error not matching is thrown immediately.signal.abortedis checked before each attempt — no wasted work after cancellation.- Library internals (queue/topic/ephemeral
stream({ wait: true })) already use retry with unbounded attempts. Do not double-wrap those calls. attempts: 1means no retry — only one try. The default is8.
API Reference
Read full API/types/defaults in references/api.md.
Weekly Installs
6
Repository
valentinkolb/syncFirst Seen
12 days ago
Security Audits
Installed on
opencode6
claude-code6
github-copilot6
codex6
kimi-cli6
gemini-cli6