go-http-client-resilience
Installation
SKILL.md
Go HTTP Client Resilience
Treat HTTP as a failure-prone boundary with a finite time and resource budget. Retry only when both the failure and the operation are safe.
Core Workflow
- Define operation semantics, total deadline, idempotency, and response limits.
- Reuse a configured client and transport; propagate context into every request.
- Construct URLs, headers, authentication, and bodies without secret leakage.
- Classify transport, timeout, status, protocol, and decode failures.
- Add bounded retries with jitter only for safe transient cases.
- Drain or close bodies correctly and bound all reads.
- Test with a function-backed transport and focused integration server.