Free 40-page Claude guide — setup, 120 prompt codes, MCP servers, AI agents. Download free →
CLSkills
Debuggingintermediate

Network Debugger

Share

Debug network/HTTP request issues

Works with OpenClaude

You 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.com to see raw HTTP headers and connection details
  • Check netstat -an | grep ESTABLISHED (or ss -tan on Linux) to verify active connections
  • Inspect browser DevTools Network tab or use mitmproxy to capture live traffic

Steps

  1. Enable verbose logging on your HTTP client (e.g., curl -v, axios validateStatus: () => true, fetch with interceptors)
  2. Test DNS resolution with nslookup example.com or dig example.com to confirm the domain resolves correctly
  3. Check response status codes and headers using curl -i https://api.example.com/endpoint to see what the server actually returned
  4. Examine request/response body size and content-type with curl -w "\nSize: %{size_download}\nTime: %{time_total}\n" -o /dev/null https://example.com
  5. Test timeout behavior by setting explicit timeouts: curl --connect-timeout 5 --max-time 10 https://example.com
  6. Verify SSL/TLS with curl -v --cacert /path/to/cert.pem https://example.com or skip validation for testing only
  7. Monitor real-time traffic with tcpdump -i en0 'tcp port 443' to see raw packets and dropped connections
  8. 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

Quick Info

CategoryDebugging
Difficultyintermediate
Version1.0.0
AuthorClaude Skills Hub
debuggingnetworkhttp

Install command:

curl -o ~/.claude/skills/network-debugger.md https://claude-skills-hub.vercel.app/skills/debugging/network-debugger.md

Related Debugging Skills

Other Claude Code skills in the same category — free to download.

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.