home / skills / jeremylongshore / claude-code-plugins-plus-skills / analyzing-network-latency

This skill analyzes network latency and optimizes API call patterns to speed up communications and reduce page load times for applications.

npx playbooks add skill jeremylongshore/claude-code-plugins-plus-skills --skill analyzing-network-latency

Review the files below or copy the command above to add this skill to your agents.

Files (9)
SKILL.md
3.8 KB
---
name: analyzing-network-latency
description: Analyze network latency and optimize request patterns for faster communication. Use when diagnosing slow network performance or optimizing API calls. Trigger with phrases like "analyze network latency", "optimize API calls", or "reduce network delays".
version: 1.0.0
allowed-tools: "Read, Write, Bash(curl:*), Bash(ping:*), Bash(traceroute:*), Grep"
license: MIT
author: Jeremy Longshore <[email protected]>
---
# Network Latency Analyzer

This skill provides automated assistance for network latency analyzer tasks.

## Overview

This skill empowers Claude to diagnose network latency issues and propose optimizations to improve application performance. It analyzes request patterns, identifies potential bottlenecks, and recommends solutions for faster and more efficient network communication.

## How It Works

1. **Request Pattern Identification**: Claude identifies all network requests made by the application.
2. **Latency Analysis**: Claude analyzes the latency associated with each request, looking for patterns and anomalies.
3. **Optimization Recommendations**: Claude suggests optimizations such as parallelization, request batching, connection pooling, and timeout adjustments.

## When to Use This Skill

This skill activates when you need to:
- Analyze network latency in an application.
- Optimize network request patterns for improved performance.
- Identify bottlenecks in network communication.

## Examples

### Example 1: Optimizing API Calls

User request: "Analyze network latency and suggest improvements for our API calls."

The skill will:
1. Identify all API calls made by the application.
2. Analyze the latency of each API call.
3. Suggest parallelizing certain API calls and implementing connection pooling.

### Example 2: Reducing Page Load Time

User request: "Optimize network request patterns to reduce page load time."

The skill will:
1. Identify all network requests made during page load.
2. Analyze the latency of each request.
3. Suggest batching multiple requests into a single request and optimizing timeout configurations.

## Best Practices

- **Parallelization**: Identify serial requests that can be executed in parallel to reduce overall latency.
- **Request Batching**: Batch multiple small requests into a single larger request to reduce overhead.
- **Connection Pooling**: Reuse existing HTTP connections to avoid the overhead of establishing new connections for each request.

## Integration

This skill can be used in conjunction with other plugins that manage infrastructure or application code, allowing for automated implementation of the suggested optimizations. For instance, it can work with a code modification plugin to automatically apply connection pooling or adjust timeout values.

## Prerequisites

- Access to application network configuration
- Network monitoring tools (curl, ping, traceroute)
- Request pattern documentation
- Performance baseline metrics

## Instructions

1. Identify all network requests in the application
2. Measure latency for each request type
3. Analyze patterns for serial vs parallel execution
4. Identify opportunities for batching and pooling
5. Recommend timeout and retry configurations
6. Provide optimization implementation plan

## Output

- Network latency analysis report
- Request pattern visualizations
- Optimization recommendations with priorities
- Implementation examples for suggested changes
- Expected performance improvements

## Error Handling

If latency analysis fails:
- Verify network connectivity to endpoints
- Check DNS resolution and routing
- Validate request authentication
- Review firewall and security rules
- Ensure monitoring tools are installed

## Resources

- HTTP connection pooling guides
- Request batching best practices
- Network performance optimization references
- API design patterns for latency reduction

Overview

This skill analyzes network latency and recommends concrete changes to speed up communication between services and clients. It inspects request patterns, measures per-request delays, and prioritizes optimizations that deliver the largest end-to-end improvements. Use it when diagnosing slow API calls, page loads, or inter-service delays.

How this skill works

The skill enumerates network requests made by the application, collects latency metrics for each endpoint and request type, and highlights anomalies and high-impact hotspots. It then evaluates execution patterns (serial vs parallel), identifies batching and connection reuse opportunities, and produces prioritized recommendations such as parallelization, batching, connection pooling, and timeout tuning. Results include a concise report, visualizations of request patterns, and example implementation snippets.

When to use it

  • You observe slow API responses or degraded user experience.
  • You need to reduce page load or API call latency.
  • You want to optimize backend-to-backend communication in microservices.
  • Before or after deploying changes to validate latency impact.
  • When creating a performance baseline for monitoring and SLOs.

Best practices

  • Measure real traffic and synthetic tests to build an accurate latency baseline.
  • Focus on high-frequency and high-latency endpoints first — small improvements there yield big gains.
  • Prefer batching and parallelization where semantics allow to reduce round trips.
  • Use connection pooling and keep-alive to avoid TCP/TLS setup overhead.
  • Tune timeouts and retries to avoid long blocking waits and cascading delays.

Example use cases

  • Analyze an application that makes multiple serial API calls and recommend which calls can be parallelized.
  • Audit frontend page load network requests and propose batching or resource inlining to reduce RTTs.
  • Evaluate a microservice mesh to recommend connection pooling and timeout settings to prevent tail-latency.
  • Produce an implementation plan and code examples to apply pooling and batch endpoints with minimal code changes.
  • Compare latency before and after changes, and produce a concise improvement summary for stakeholders.

FAQ

What inputs do you need to run an analysis?

Access to request logs or tracing spans, sample network captures, and a performance baseline. If available, provide endpoint lists, authentication info, and test endpoints.

Can this skill change code or infrastructure automatically?

It provides implementation examples and prioritized steps; integration with code-modification or deployment plugins can automate changes, but manual review is recommended before applying fixes.