condition-based-waiting
Installation
SKILL.md
Condition-Based Waiting
Implement condition-based polling and retry patterns with bounded timeouts, jitter, and error classification. Select the right pattern for the scenario, implement it with safety bounds, and verify both success and failure paths.
| Pattern | Use When | Key Safety Bound |
|---|---|---|
| Simple Poll | Wait for condition to become true | Timeout + min poll interval |
| Exponential Backoff | Retry with increasing delays | Max retries + jitter + delay cap |
| Rate Limit Recovery | API returns 429 | Retry-After header + default fallback |
| Health Check | Wait for service(s) to be ready | All-pass requirement + per-check status |
| Circuit Breaker | Prevent cascade failures | Failure threshold + recovery timeout |
Reference Loading Table
| Signal | Load These Files | Why |
|---|---|---|
| reviewing wait/retry code for polling, retry, and backoff mistakes | preferred-patterns.md |
Loads detailed guidance from preferred-patterns.md. |
| writing wait code: polling, exponential backoff, rate-limit recovery, health checks, circuit breaker | implementation-patterns.md |
Loads detailed guidance from implementation-patterns.md. |
| tests, implementation patterns | testing-patterns.md |
Loads detailed guidance from testing-patterns.md. |