What problem does it solve? Transient failures in network calls, database operations, and service integrations cause flaky behavior when handled with ad-hoc loops or blanket exception catching. This Skill guides the design of safe, bounded retry policies with Tenacity so repeated attempts respect idempotency, deadlines, and failure taxonomies. ## Core Features & Use Cases - Bounded Policy Design: Compose retry predicates, finite stop strategies, and jittered wait strategies using retry, Retrying, and AsyncRetrying. - Safety Guardrails: Enforce idempotency checks, exclude permanent failures like auth errors, and prevent nested retry multiplication across client layers. - Deterministic Testing & Observability: Test policies with injected sleep and structured before_sleep telemetry that avoids leaking credentials or payloads. - Use Case: A service call to a contended remote API intermittently fails with transient errors. Use this Skill to wrap the narrowest retryable operation with a typed exception predicate, capped exponential random wait, four-attempt stop, and reraise=True, then verify attempt counts with deterministic tests. ## Quick Start Ask the assistant to write a Tenacity retry policy for a specific transient operation, including the stop condition, wait strategy, and a deterministic test.