Initial commit

This commit is contained in:
Zhongwei Li
2025-11-30 08:21:12 +08:00
commit c0d51c4569
8 changed files with 193 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
{
"name": "network-latency-analyzer",
"description": "Analyze network latency and optimize request patterns",
"version": "1.0.0",
"author": {
"name": "Claude Code Plugins",
"email": "[email protected]"
},
"skills": [
"./skills"
],
"commands": [
"./commands"
]
}

3
README.md Normal file
View File

@@ -0,0 +1,3 @@
# network-latency-analyzer
Analyze network latency and optimize request patterns

View File

@@ -0,0 +1,35 @@
---
description: Analyze network latency and request patterns
---
# Network Latency Analyzer
Analyze network request patterns and optimize for reduced latency.
## Analysis Focus
1. **Serial Requests**: Requests that could be parallelized
2. **Request Batching**: Opportunities to batch multiple requests
3. **Connection Pooling**: HTTP connection reuse
4. **Timeout Configuration**: Request timeout settings
5. **Retry Logic**: Exponential backoff implementation
6. **DNS Resolution**: DNS caching opportunities
7. **Request Size**: Payload optimization
## Process
1. Identify all network requests in codebase
2. Analyze request patterns and dependencies
3. Check for serial vs parallel execution
4. Evaluate timeout and retry strategies
5. Generate optimization recommendations
## Output
Provide markdown report with:
- Network request inventory
- Latency bottleneck identification
- Parallelization opportunities with code examples
- Connection pooling recommendations
- Timeout and retry strategy improvements
- Estimated latency reductions

61
plugin.lock.json Normal file
View File

@@ -0,0 +1,61 @@
{
"$schema": "internal://schemas/plugin.lock.v1.json",
"pluginId": "gh:jeremylongshore/claude-code-plugins-plus:plugins/performance/network-latency-analyzer",
"normalized": {
"repo": null,
"ref": "refs/tags/v20251128.0",
"commit": "a9390014892de6f3110d28ed836e4b10c97c7fec",
"treeHash": "638264c2258f13de401c93be3b4bd45868fb1836faedc53e4278d5d1e134ac85",
"generatedAt": "2025-11-28T10:18:36.433807Z",
"toolVersion": "publish_plugins.py@0.2.0"
},
"origin": {
"remote": "git@github.com:zhongweili/42plugin-data.git",
"branch": "master",
"commit": "aa1497ed0949fd50e99e70d6324a29c5b34f9390",
"repoRoot": "/Users/zhongweili/projects/openmind/42plugin-data"
},
"manifest": {
"name": "network-latency-analyzer",
"description": "Analyze network latency and optimize request patterns",
"version": "1.0.0"
},
"content": {
"files": [
{
"path": "README.md",
"sha256": "133b4dded418256477ed6517214334eb500974bcd248bf071ae6100e1681c2d0"
},
{
"path": ".claude-plugin/plugin.json",
"sha256": "be705ef73279983293fa605dfcc491a911284e457907e96dd8b8a8952bc2e94e"
},
{
"path": "commands/analyze-latency.md",
"sha256": "16c1c6c9f38fb2b353abe5bca733e5804c8400aa8def228cc1ca0d76d008928e"
},
{
"path": "skills/network-latency-analyzer/SKILL.md",
"sha256": "07c7ff340ff512a0aa940a96a0c40a80c5b522f909c03cd3e30c4e2bc507027d"
},
{
"path": "skills/network-latency-analyzer/references/README.md",
"sha256": "8749c468d206dd2fadf3756281d538f05e6b7c877898b252f84feb8dbc3b7710"
},
{
"path": "skills/network-latency-analyzer/scripts/README.md",
"sha256": "bc7dea8b36e333cd7fa248994fc8aa57cd2d2953f0554d182ebb71c46a444e4d"
},
{
"path": "skills/network-latency-analyzer/assets/README.md",
"sha256": "e949b7c1a22ba3a6b99b946139c45dddc7d8e852fa4e856789532ddf1879b258"
}
],
"dirSha256": "638264c2258f13de401c93be3b4bd45868fb1836faedc53e4278d5d1e134ac85"
},
"security": {
"scannedAt": null,
"scannerVersion": null,
"flags": []
}
}

View File

@@ -0,0 +1,54 @@
---
name: analyzing-network-latency
description: |
This skill enables Claude to analyze network latency and optimize request patterns within an application. It helps identify bottlenecks and suggest improvements for faster and more efficient network communication. Use this skill when the user asks to "analyze network latency", "optimize request patterns", or when facing performance issues related to network requests. It focuses on identifying serial requests that can be parallelized, opportunities for request batching, connection pooling improvements, timeout configuration adjustments, and DNS resolution enhancements. The skill provides concrete suggestions for reducing latency and improving overall network performance.
allowed-tools: Read, Write, Bash, Grep
version: 1.0.0
---
## 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.

View File

@@ -0,0 +1,7 @@
# Assets
Bundled resources for network-latency-analyzer skill
- [ ] latency_analysis_template.html: HTML template for visualizing latency analysis results.
- [ ] sample_network_trace.json: Example network trace data for testing and demonstration.
- [ ] configuration_template.yaml: Template for configuring network latency analysis parameters.

View File

@@ -0,0 +1,9 @@
# References
Bundled resources for network-latency-analyzer skill
- [ ] network_latency_analysis_best_practices.md: Detailed guide on network latency analysis techniques and best practices.
- [ ] connection_pooling_strategies.md: In-depth explanation of different connection pooling strategies and their trade-offs.
- [ ] timeout_configuration_guide.md: Best practices for configuring timeouts in network applications.
- [ ] request_batching_implementation.md: Guide on implementing request batching for improved performance.
- [ ] python_asyncio_guide.md: Guide on using asyncio for asynchronous network operations in Python.

View File

@@ -0,0 +1,9 @@
# Scripts
Bundled resources for network-latency-analyzer skill
- [ ] analyze_request_patterns.py: Analyzes network request patterns to identify serial requests that can be parallelized.
- [ ] connection_pool_optimizer.py: Recommends optimal connection pool sizes based on observed network traffic.
- [ ] timeout_optimizer.py: Suggests timeout adjustments based on latency analysis.
- [ ] request_batcher.py: Implements request batching to reduce overhead.
- [ ] latency_simulator.py: Simulates network latency under different conditions to test optimizations.