Network debugging
Skill Amey-Thakur/AI-SKILLS/skills/debugging/network-debugging
Plug-and-play skills and prompts for every AI coding agent
npx -y skills add Amey-Thakur/AI-SKILLS --skill network-debuggingAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- 20 days oldThe repository was created 20 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
- 4 stars4 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Diagnose failing or slow network calls by inspecting the actual bytes on the wire with curl, tcpdump, and TLS handshake analysis. Use when a request fails, hangs, or returns the wrong thing and you cannot tell whether the client, the network, or the server is at fault.
SKILL.md
3.1 KB, 716 tokens by cl100k_base, as published. Nobody here has run it
Network debugging
"It works on my machine" is usually a network statement: a name resolves differently, a proxy rewrites a header, a certificate expired an hour ago. The application log shows only one end's version of events. To find the truth you have to look at the connection itself, from DNS through the TLS handshake to the response bytes.
Method
- Make curl show every layer with
-v.curl -v https://host/pathprints DNS resolution, the TCP connect, the full TLS handshake, and every request and response header. Add--resolve host:443:1.2.3.4to bypass DNS and test one specific server, or-w '%{time_connect} %{time_starttls} %{time_total}\n'to see where the milliseconds go. - Split the failure into layers and test bottom up.
dig hostfor DNS,nc -zv host 443ortelnet host 443for TCP reachability, then curl for HTTP. A hang at connect is a firewall or routing problem; a reset after connect is the server refusing; a 200 with wrong body is application logic. - Capture the packets when curl is not enough.
tcpdump -i any -n -w cap.pcap host 1.2.3.4 and port 443records the exchange; open it in Wireshark. Look for SYN with no SYN-ACK (blocked), repeated retransmissions (loss), or a RST (one side aborting). The packet trace does not lie about who sent what. - Read TLS handshake failures by their stage.
curl -vprints where it broke:SSL certificate problemis trust or expiry,handshake failureis a cipher or TLS-version mismatch,unknown cais a missing intermediate. Confirm withopenssl s_client -connect host:443 -servername host, which dumps the presented chain and the negotiated protocol. - Check SNI and the certificate the server actually serves. On shared
hosts the wrong virtual host answers when SNI is missing or mismatched.
openssl s_client -servername host -connect ip:443shows the CN and SANs; if they do not include the hostname you asked for, name resolution or the SNI value is the bug, not the certificate. - Isolate proxies and middleboxes explicitly. Compare a direct call with
one through the proxy by setting or clearing
HTTPS_PROXY. A body that changes, a header that vanishes, or TLS that only fails through the proxy names the middlebox as the culprit rather than either endpoint.
Checks
- Can you state which layer fails: DNS, TCP, TLS, or HTTP?
- Does
openssl s_clientshow a chain whose SANs include the hostname? - Does a packet capture show the server responding at all, or only silence?
Boundaries
This covers one client talking to one endpoint. Systemic latency across many services belongs to distributed tracing, and application-level bugs behind a correct 200 response belong to ordinary debugging. Capturing traffic you do not own or operate is a legal and privacy line, not a technical one.
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.