Network diagnostics

From taracodlabs/aiden · View interactive version

Network diagnostics is an AI agent skill from the GitHub repository taracodlabs/aiden. Windows net diag: ping, traceroute, DNS, port scan (PowerShell)

How to use this skill

Skill file

Network Diagnostics

Diagnose Windows network connectivity — test connections, resolve DNS, trace routes, check open ports, and inspect network interfaces — all from PowerShell.

When to Use

How to Use

Test connectivity to a host

Test-Connection -ComputerName "8.8.8.8" -Count 4
Test-Connection -ComputerName "google.com" -Count 4 | Select-Object Address, Latency, Status

Test TCP port connectivity

Test-NetConnection -ComputerName "github.com" -Port 443
Test-NetConnection -ComputerName "smtp.gmail.com" -Port 587

Get network interface info

Get-NetIPAddress | Where-Object AddressFamily -eq 'IPv4' |
  Select-Object InterfaceAlias, IPAddress, PrefixLength |
  Where-Object IPAddress -notmatch '^169|^127'

Get default gateway

Get-NetRoute -DestinationPrefix "0.0.0.0/0" |
  Select-Object InterfaceAlias, NextHop, RouteMetric

DNS lookup

Resolve-DnsName "google.com"
Resolve-DnsName "google.com" -Type MX   # Mail records
Resolve-DnsName "google.com" -Type TXT  # TXT records

Flush DNS cache

Clear-DnsClientCache

Traceroute

Test-NetConnection -ComputerName "8.8.8.8" -TraceRoute

View active TCP connections (netstat equivalent)

Get-NetTCPConnection -State Established |
  Select-Object LocalAddress, LocalPort, RemoteAddress, RemotePort, State |
  Sort-Object LocalPort

Find process using a port

$port = 3000
$conn = Get-NetTCPConnection -LocalPort $port -ErrorAction SilentlyContinue
if ($conn) {
  $proc = Get-Process -Id $conn.OwningProcess -ErrorAction SilentlyContinue
  Write-Host "Port $port is used by: $($proc.Name) (PID $($conn.OwningProcess))"
} else {
  Write-Host "Port $port is free"
}

Check Wi-Fi signal strength

netsh wlan show interfaces | Select-String "Signal|SSID|State"

Reset network stack

# Requires elevated session
# netsh int ip reset
# netsh winsock reset
Write-Host "To reset network stack, run the above commands in an elevated PowerShell session"

Examples

"Can I reach GitHub from this machine?"

→ Test-NetConnection -ComputerName "github.com" -Port 443 — checks both DNS resolution and TCP handshake.

"What's my local IP and gateway?"

→ Get-NetIPAddress for IP + Get-NetRoute -DestinationPrefix "0.0.0.0/0" for gateway.

"Which process is listening on port 8080?"

→ Find the OwningProcess from Get-NetTCPConnection and cross-reference with Get-Process.

Cautions

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.