AgentStack
SKILL verified MIT Self-run

Debug Latency

skill-pvnarp-agent-skills-debug-latency · by pvnarp

Diagnoses and fixes latency issues across the full request/response path. Traces from user action to visible feedback across all system layers. Use when investigating lag, slow responses, or latency complaints.

No reviews yet
0 installs
4 views
0.0% view→install

Install

$ agentstack add skill-pvnarp-agent-skills-debug-latency

✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

Are you the author of Debug Latency? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Latency Diagnosis

Trace the FULL path from trigger to response. Latency hides in the handoffs between components.

1. Client-Side Latency (User Action → Request Sent)

Check:

  • Event handler fires immediately on user action (no debounce/throttle unless intentional)
  • No heavy computation blocking the main/UI thread
  • Request constructed and sent without unnecessary delays
  • No redundant re-renders or recomputations before sending

Common culprits:

  • Heavy synchronous work on UI thread
  • Unnecessary state updates triggering re-renders before the actual action
  • DNS resolution on first request (cold start)

2. Network Latency (Request → Server Receives)

Check:

  • Connection reuse (keep-alive, HTTP/2)
  • Payload size reasonable (compress large bodies)
  • CDN or edge caching for static/cacheable content
  • TLS handshake overhead on new connections

Common culprits:

  • No connection pooling (new TCP + TLS per request)
  • Large uncompressed payloads
  • Wrong region (server far from users)
  • Missing CDN for static assets

3. Server Processing Latency (Receive → Response Ready)

Check:

  • Database queries use indexes (check EXPLAIN)
  • No N+1 query patterns
  • Expensive operations are cached
  • External service calls have timeouts
  • No unnecessary serialization/deserialization

Common culprits:

  • Missing database indexes (full table scans)
  • Synchronous external API calls that could be parallel
  • Lock contention on shared resources
  • Logging or tracing overhead in hot paths

4. Response Latency (Server Sends → User Sees Result)

Check:

  • Response size minimized (no over-fetching)
  • Streaming for large responses where possible
  • Client-side rendering/parsing efficient
  • UI updates immediately on data arrival (no artificial delays)

Common culprits:

  • Sending entire objects when client needs one field
  • Waiting for all data before rendering (could stream/paginate)
  • Heavy client-side processing of response data

Output

CLIENT PATH:  [action] → [handler] → [request] | Est: Xms
NETWORK PATH: [send] → [receive]               | Est: Xms
SERVER PATH:  [receive] → [process] → [respond] | Est: Xms
RENDER PATH:  [receive] → [parse] → [display]   | Est: Xms
TOTAL: ~Xms

FIXES (priority):
1. [fix] - saves ~Xms
2. [fix] - saves ~Xms

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet — be the first.

Versions

  • v0.1.0 Imported from the upstream source.