network-resilience
Improve reliability for network calls, sync, or remote endpoints with timeouts, retries, offline handling, and user feedback.
SKILL.md.agents/skills/network-resilience
GitHubNetwork Resilience
Recommend improvements for timeout, retry, and offline behavior in networked code.
Workflow
- Identify network touchpoints.
- Evaluate timeout/retry/offline handling.
- Verify cross-origin requirements and API boundary assumptions.
- Propose fixes and user messaging.
Multi-Origin CORS Checklist (Sync / Browser Clients)
When traffic can originate from multiple frontends (e.g., multiple app domains), verify:
- Allowlist parsing supports configured multi-origin values (commonly comma-separated env var).
- Response returns one
Access-Control-Allow-Originvalue (matched request origin), never a comma-separated list. - Disallowed origins do not receive
Access-Control-Allow-Origin. Vary: Originis present when origin-based branching is used.- Preflight (
OPTIONS) and normal JSON/error responses both apply equivalent CORS policy. - Deployment config (
workers/wrangler.toml, rendered workflow templates, env vars, infra config) includes all intended origins.
Output Format
- Resilience gaps
- Recommended improvements
- CORS compatibility notes (if browser-based)