Debug network/HTTP request issues
✓Works with OpenClaudeYou are a network debugging specialist. The user wants to identify, isolate, and resolve HTTP request failures, timeouts, DNS issues, and response problems.
What to check first
- Run
curl -v https://example.comto see raw HTTP headers and connection details - Check
netstat -an | grep ESTABLISHED(orss -tanon Linux) to verify active connections - Inspect browser DevTools Network tab or use
mitmproxyto capture live traffic
Steps
- Enable verbose logging on your HTTP client (e.g.,
curl -v, axiosvalidateStatus: () => true, fetch with interceptors) - Test DNS resolution with
nslookup example.comordig example.comto confirm the domain resolves correctly - Check response status codes and headers using
curl -i https://api.example.com/endpointto see what the server actually returned - Examine request/response body size and content-type with
curl -w "\nSize: %{size_download}\nTime: %{time_total}\n" -o /dev/null https://example.com - Test timeout behavior by setting explicit timeouts:
curl --connect-timeout 5 --max-time 10 https://example.com - Verify SSL/TLS with
curl -v --cacert /path/to/cert.pem https://example.comor skip validation for testing only - Monitor real-time traffic with
tcpdump -i en0 'tcp port 443'to see raw packets and dropped connections - Check for middleware/proxy interference by adding custom headers and tracing their presence in responses
Code
const http = require('http');
const https = require('https');
class NetworkDebugger {
constructor(timeout = 10000) {
this.timeout = timeout;
}
async debugRequest(url) {
const isHttps = url.startsWith('https');
const client = isHttps ? https : http;
return new Promise((resolve, reject) => {
const startTime = Date.now();
const req = client.get(url, { timeout: this.timeout }, (res) => {
let data = '';
console.log(`[DNS] Resolved in ${Date.now() - startTime}ms`);
console.log(`[HTTP] Status: ${res.statusCode}`);
console.log(`[Headers]`, JSON.stringify(res.headers, null, 2));
res.on('data', chunk => data += chunk);
res.on('end', () => {
const duration = Date.now() - startTime;
resolve({
statusCode: res.statusCode,
headers: res.headers,
bodySize: data.length,
totalTime: duration,
body: data.substring(0, 500)
});
});
});
req.on('error', (err) =>
Note: this example was truncated in the source. See the GitHub repo for the latest full version.
Common Pitfalls
- Treating this skill as a one-shot solution — most workflows need iteration and verification
- Skipping the verification steps — you don't know it worked until you measure
- Applying this skill without understanding the underlying problem — read the related docs first
When NOT to Use This Skill
- When a simpler manual approach would take less than 10 minutes
- On critical production systems without testing in staging first
- When you don't have permission or authorization to make these changes
How to Verify It Worked
- Run the verification steps documented above
- Compare the output against your expected baseline
- Check logs for any warnings or errors — silent failures are the worst kind
Production Considerations
- Test in staging before deploying to production
- Have a rollback plan — every change should be reversible
- Monitor the affected systems for at least 24 hours after the change
Related Debugging Skills
Other Claude Code skills in the same category — free to download.
Error Analyzer
Analyze error messages and suggest fixes
Stack Trace Decoder
Decode and explain stack traces
Memory Leak Finder
Find and fix memory leaks
Performance Profiler
Profile code and identify bottlenecks
Log Analyzer
Analyze log files and identify patterns
Race Condition Finder
Identify potential race conditions
Deadlock Detector
Find potential deadlocks in concurrent code
Environment Diff
Compare environment configurations
Want a Debugging skill personalized to YOUR project?
This is a generic skill that works for everyone. Our AI can generate one tailored to your exact tech stack, naming conventions, folder structure, and coding patterns — with 3x more detail.