/agentic-awesome-skills:sse-reconnect-replay-testingfrom agentic-awesome-skills
Tests SSE reconnect mechanics, Last-Event-ID replay, duplicate/gap/order defects, cursor expiry, HTTP 204 termination, and frame edge cases using local loopback fixtures.
Ships in agentic-awesome-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Verify Server-Sent Events (SSE) stream correctness from the client perspective using deterministic loopback fixtures and a real WHATWG EventSource client (eventsource in Node.js or browser window.EventSource). This workflow isolates reconnect transport mechanics (Last-Event-ID, retry:, HTTP 204 No Content, frame parsing) from application-level acknowledgment and deduplication.
Distinction from existing streaming skills:
neon-functions (references/sse.md) builds Hono/ReadableStream SSE endpoints and Postgres LISTEN/NOTIFY fan-out, noting that replay must be implemented separately without providing a reconnect/replay test harness.embedded-agents-agent-sdk and embedded-agents-messages-api wire Claude Agent SDK / Anthropic Messages API tool runners inside Next.js App Router streams rather than validating low-level SSE cursor resume, duplicate/gap defects, or frame termination.backend-architect and fastapi-pro provide high-level API/SSE architecture and FastAPI async streaming guidance without executable protocol replay suites.Last-Event-ID resume handler before shipping live feeds, notifications, or LLM token streams.Last-Event-ID replay (1,2,1,2,3,4 duplicates), dropped events (1,2,4), out-of-order replay (1,2,4,3), stale cursor handling, broken multiline payloads, or infinite reconnect storms after 204 No Content.id: resets clear lastEventId and truncated trailing frames before socket drops are discarded rather than committed.neon-functions) or Claude SDK wrappers (embedded-agents-messages-api).v24.21.0) with the eventsource package pinned to [email protected] (npm install --ignore-scripts --save-exact [email protected]; [email protected] is the tested runtime) or an authorized browser EventSource runtime.127.0.0.1:0) test execution with no external network requests or production credentials.at-least-once when replaying safely) or missed events (at-most-once when buffers expire).id: values on distinct events and inherited ids (an event with no id: field keeps the current lastEventId; an empty id: resets lastEventId to ""). Under repeated or inherited ids, duplicates/outOfOrder/missing results are not defects. Deduplicate on a unique application event identifier (not raw SSE id), with persistent offset checkpoints and idempotent processing in application storage.EventSource observes on the wire (Last-Event-ID header, sequence order, event: resync notifications, 204 closure). Idempotent processing and persistent offset checkpoints belong in application storage.Execute the loopback harness in SSE replay harness:
Last-Event-ID header assertion: Drop the TCP socket immediately after sending event id: 2. Verify the reconnect HTTP request carries Last-Event-ID: 2 and cleanly delivers 1, 2, 3, 4.1, 2, 1, 2, 3, 4 when a server ignores Last-Event-ID), gaps (1, 2, 4), and out-of-order delivery (1, 2, 4, 3).Last-Event-ID: 1 when the server buffer retains only >= 3 must follow the service's declared contract — either emitting an explicit event: resync frame before streaming 3, 4 (or terminating cleanly per policy) rather than silently hiding lost events. Verify unified chronological order on one timeline (ordinary messages + custom events interleaved by arrival): Event 1 → Resync notification → Event 3 → Event 4; a swapped order (Event 3 before the resync notification) must fail ordering assertions (negative ordering regression).id: reset, multiline data:, incomplete trailing frame: Verify id: with empty value resets lastEventId to "" and omits Last-Event-ID on reconnect per WHATWG HTML §9.2.6; multiline data: lines join with \n; incomplete trailing data: frames before disconnect never dispatch to onmessage and never overwrite lastEventId.204 No Content & bounded cleanup: Returning HTTP 204 must transition EventSource.readyState to CLOSED with zero subsequent reconnect attempts. Capture the natural terminal state before manual cleanup and observe a bounded reconnect interval (longer than retry:) without manually closing the client first, asserting no additional requests arrive; only then perform manual cleanup. Enforce per-test timeouts, request counters (maxAttempts), es.close(), socket.destroy(), and server.closeAllConnections() so tests never leak sockets or timers.Verify exact received (id, event, data) sequences and request headers. Disclose explicitly whenever verification used Node's eventsource package ([email protected]) rather than native browser window.EventSource.
Run the self-contained loopback suite from SSE replay harness:
User request: "Test whether our SSE endpoint safely resumes after disconnect without duplicating or losing events."
Inputs: Synthetic 127.0.0.1 loopback HTTP server + [email protected] client.
Expected result: Correct replay asserts headers ['Last-Event-ID' == '2'] on reconnect and delivers [1, 2, 3, 4];
broken replay yields [1, 2, 1, 2, 3, 4] and flags duplicates; gap [1, 2, 4] and inversion [1, 2, 4, 3] fail
monotonicity checks; expired cursor triggers explicit 'resync' event before [3, 4]; empty 'id:' omits
Last-Event-ID; incomplete trailing frames do not dispatch; and HTTP 204 stops reconnection cleanly.
globalThis.EventSource by default in standard globals, the bundled harness uses the maintained eventsource ([email protected], pinned) WHATWG client library rather than browser window.EventSource. Browser-specific CORS enforcement, HTTP/2 connection coalescing, reverse-proxy response buffering, and background-tab timer throttling are not exercised in loopback Node tests. [email protected] is the tested runtime; a Node 22.16.0 experimental EventSource run passed 6/7 tests but failed the empty-id: reset assertion, which is not a defect in [email protected].timeline; messages/custom are derived views, not the source of order.127.0.0.1:0 loopback sockets inside the local test runner.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub sickn33/agentic-awesome-skills --plugin agentic-awesome-skills3,104 skills in this plugin
/007Security audit, hardening, threat modeling (STRIDE/PASTA), Red/Blue Team, OWASP checks, code review, incident response, and infrastructure security for any project./00-andruia-consultantUsar al iniciar o mejorar un proyecto de IA: diagnostica código y restricciones, propone skills existentes y redacta tareas y un plan de implementación en español./10-andruia-skill-smithUsar para crear o mejorar una skill de Andru.ia: define entradas y resultados, redacta SKILL.md con ejemplos y límites, valida la estructura y prepara una PR.2 plugins in one repository ship this exact skill · first indexed Dec 2, 2026
Other plugins' skills for the same job