debug-latency
Skill1 starsChanged 9 months agoMITView on GitHub
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.
In this repository48 other files it gives its agents.
- accessibilitySkill
- api-designSkill
- api-integrationSkill
- architectSkill
- async-patternsSkill
- best-practicesSkill
- bugSkill
- buildSkill
- cachingSkill
- ci-cdSkill
- config-managementSkill
- containerizeSkill
- database-designSkill
- data-modelingSkill
- data-pipelineSkill
- dependency-updateSkill
- deploySkill
- dev-setupSkill
- docsSkill
- error-handlingSkill
- estimateSkill
- feature-flag-opsSkill
- git-recoverySkill
- i18nSkill
- iacSkill
- incidentSkill
- load-testingSkill
- loggingSkill
- migrateSkill
- monitoringSkill
- observability-debugSkill
- onboardSkill
- perfSkill
- phase-gateSkill
- pr-authorSkill
- qaSkill
- refactorSkill
- reviewSkill
- rollbackSkill
- schema-evolutionSkill
- scope-checkSkill
- security-auditSkill
- state-managementSkill
- tech-debtSkill
- tech-stackSkill
- telemetrySkill
- testingSkill
- workflowSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 5 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
No heavy computation blocking the main/UI thread
- Distinctive: line 16
No redundant re-renders or recomputations before sending
- Distinctive: line 32
No connection pooling (new TCP + TLS per request)
- Distinctive: line 41
No N+1 query patterns
- Distinctive: line 44
No unnecessary serialization/deserialization
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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 ~XmsDoes it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

