Transport error normalization and retry policy

From ychampion/cskill-agents · View interactive version

Transport error normalization and retry policy is an AI agent skill from the GitHub repository ychampion/cskill-agents. Normalize transport failures into one retry policy so streaming bridges, sockets, and remote clients fail predictably instead of improvising recovery.

How to use this skill

Skill file

SKILL: Transport Error Normalization and Retry Policy

Domain: remote-bridge

Trigger: Use when a remote or bridge transport can fail in multiple ways and callers need one consistent rule for retrying, surfacing, or terminating.

Source Pattern: Distilled from reviewed bridge transport, reconnect, and capability-broadcast error-handling implementations.

Core Method

Translate transport-specific failures into one normalized error shape before making retry decisions. Classify each failure by whether it is transient, backoff-retryable, user-correctable, or terminal. Attach the normalized reason, any retry delay hint, and whether the caller should preserve or reset session state. Make every higher-level caller consume that normalized contract instead of branching on raw websocket, SSE, HTTP, or stream-library errors directly.

Key Rules

Example Application

If a bridge can fail due to temporary disconnects, protocol mismatches, or authentication errors, convert those into one transport result object that says whether to retry, how long to wait, and whether the client must rebuild its session before reconnecting.

Anti-Patterns (What NOT to do)

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.