Debug DNS resolution and network connectivity. Use when troubleshooting DNS failures, testing port connectivity, diagnosing firewall rules, inspecting HTTP requests with curl verbose mode, configuring /etc/hosts, or debugging proxy and certificate issues.
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install dns-networking或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install dns-networking⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/dns-networking/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: dns-networking description: Debug DNS resolution and network connectivity. Use when troubleshooting DNS failures, testing port connectivity, diagnosing firewall rules, inspecting HTTP requests with curl verbose mode, configuring /etc/hosts, or debugging proxy and certificate issues. metadata: {"clawdbot":{"emoji":"🌐","requires":{"anyBins":["dig","nslookup","curl","ping","nc"]},"os":["linux","darwin","win32"]}} ---
Debug DNS resolution, network connectivity, and HTTP issues. Covers dig/nslookup, port testing, firewall rules, curl diagnostics, /etc/hosts, proxy configuration, and certificate troubleshooting.
# A record (IP address)
dig example.com
dig +short example.com
# Specific record types
dig example.com MX # Mail servers
dig example.com CNAME # Aliases
dig example.com TXT # Text records (SPF, DKIM, etc.)
dig example.com NS # Name servers
dig example.com AAAA # IPv6 address
dig example.com SOA # Start of Authority
# Query a specific DNS server
dig @8.8.8.8 example.com
dig @1.1.1.1 example.com
# Trace the full resolution path
dig +trace example.com
# Reverse lookup (IP → hostname)
dig -x 93.184.216.34
# nslookup (simpler, works everywhere)
nslookup example.com
nslookup example.com 8.8.8.8 # Query specific server
nslookup -type=MX example.com
# host (simplest)
host example.com
host -t MX example.com
# Query multiple public DNS servers
for dns in 8.8.8.8 1.1.1.1 9.9.9.9 208.67.222.222; do
echo -n "$dns: "
dig +short @"$dns" example.com
done
# Check TTL (time to live)
dig example.com | grep -E '^\S+\s+\d+\s+IN\s+A'
# The number is TTL in seconds
# Check /etc/resolv.conf (which DNS server the system uses)
cat /etc/resolv.conf
# Check /etc/hosts (local overrides)
cat /etc/hosts
# Flush DNS cache
# macOS:
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
# Linux (systemd-resolved):
sudo systemd-resolve --flush-caches
# Windows:
ipconfig /flushdns
# Check if systemd-resolved is running (Linux)
resolvectl status
# /etc/hosts — local DNS overrides (no TTL, instant)
# Point a domain to localhost (for development)
127.0.0.1 myapp.local
127.0.0.1 api.myapp.local
# Block a domain
0.0.0.0 ads.example.com
# Test a migration (point domain to new server before DNS change)
203.0.113.50 example.com
203.0.113.50 www.example.com
# Multiple names for one IP
192.168.1.100 db.local redis.local cache.local
# nc (netcat) — most reliable
nc -zv example.com 443
nc -zv -w 5 example.com 80 # 5 second timeout
# Test multiple ports
for port in 22 80 443 5432 6379; do
nc -zv -w 2 example.com $port 2>&1
done
# /dev/tcp (bash built-in, no extra tools needed)
timeout 3 bash -c 'echo > /dev/tcp/example.com/443' && echo "Open" || echo "Closed"
# curl (also tests HTTP)
curl -sI -o /dev/null -w "%{http_code}" https://example.com
# Test from inside a Docker container
docker exec my-container nc -zv db 5432
# traceroute (show network hops)
traceroute example.com
# mtr (continuous traceroute with stats — best for finding packet loss)
mtr example.com
mtr -r -c 20 example.com # Report mode, 20 packets
# ping
ping -c 5 example.com
# Show local network interfaces
ip addr show # Linux
ifconfig # macOS / older Linux
# Show routing table
ip route show # Linux
netstat -rn # macOS
route -n # Linux (older)
# What's listening on which port (Linux)
ss -tlnp
ss -tlnp | grep :8080
# macOS
lsof -i -P -n | grep LISTEN
lsof -i :8080
# Older Linux
netstat -tlnp
netstat -tlnp | grep :8080
# Which process is using a port
lsof -i :3000
fuser 3000/tcp # Linux
# Full verbose output (headers, TLS handshake, timing)
curl -v https://api.example.com/endpoint
# Show timing breakdown
curl -o /dev/null -s -w "
DNS: %{time_namelookup}s
Connect: %{time_connect}s
TLS: %{time_appconnect}s
TTFB: %{time_starttransfer}s
Total: %{time_total}s
Status: %{http_code}
Size: %{size_download} bytes
" https://api.example.com/endpoint
# Show response headers only
curl -sI https://api.example.com/endpoint
# Follow redirects and show each hop
curl -sIL https://example.com
# Resolve a domain to a specific IP (bypass DNS)
curl --resolve example.com:443:203.0.113.50 https://example.com
# Use a specific network interface
curl --interface eth1 https://example.com
# Test with different HTTP versions
curl --http1.1 https://example.com
curl --http2 https://example.com
# Test with specific TLS version
curl --tlsv1.2 https://example.com
curl --tlsv1.3 https://example.com
# Ignore certificate errors (debugging only)
curl -k https://self-signed.example.com
# Send request with custom Host header (virtual hosts)
curl -H "Host: example.com" https://203.0.113.50/
# Test CORS preflight
curl -X OPTIONS -H "Origin: http://localhost:3000" \
-H "Access-Control-Request-Method: POST" \
-v https://api.example.com/endpoint
# List all rules
sudo iptables -L -n -v
# Allow incoming on port 80
sudo iptables -A INPUT -p tcp --dport 80 -j ACCEPT
# Allow incoming from specific IP
sudo iptables -A INPUT -s 203.0.113.0/24 -p tcp --dport 22 -j ACCEPT
# Block incoming on a port
sudo iptables -A INPUT -p tcp --dport 3306 -j DROP
# Save rules (persist across reboot)
sudo iptables-save > /etc/iptables/rules.v4
# Enable
sudo ufw enable
# Allow/deny
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw allow from 203.0.113.0/24 to any port 22
sudo ufw deny 3306
# Check status
sudo ufw status verbose
# Reset all rules
sudo ufw reset
# Check status
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --getglobalstate
# Enable
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setglobalstate on
# Allow an application
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --add /usr/local/bin/myapp
# Set proxy for most CLI tools
export HTTP_PROXY=http://proxy.example.com:8080
export HTTPS_PROXY=http://proxy.example.com:8080
export NO_PROXY=localhost,127.0.0.1,.internal.example.com
# For curl specifically
export http_proxy=http://proxy.example.com:8080 # lowercase also works
# With authentication
export HTTPS_PROXY=http://user:[email protected]:8080
# curl with explicit proxy
curl -x http://proxy.example.com:8080 https://httpbin.org/ip
# SOCKS proxy
curl --socks5 localhost:1080 https://httpbin.org/ip
# Verify your external IP through proxy
curl -x http://proxy:8080 https://httpbin.org/ip
curl https://httpbin.org/ip # Compare with direct
# Test proxy connectivity
curl -v -x http://proxy:8080 https://example.com 2>&1 | grep -i "proxy\|connect"
# Node.js fetch/undici does NOT respect HTTP_PROXY
# Use undici ProxyAgent or node-fetch with http-proxy-agent
# Git through proxy
git config --global http.proxy http://proxy:8080
git config --global https.proxy http://proxy:8080
# Remove:
git config --global --unset http.proxy
...安装 DNS & Networking 后,可以对 AI 说这些话来触发它
Help me get started with DNS & Networking
Explains what DNS & Networking does, walks through the setup, and runs a quick demo based on your current project
Use DNS & Networking to debug DNS resolution and network connectivity
Invokes DNS & Networking with the right parameters and returns the result directly in the conversation
What can I do with DNS & Networking in my developer & devops workflow?
Lists the top use cases for DNS & Networking, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/dns-networking/ 目录(个人级,所有项目可用),或 .claude/skills/dns-networking/(项目级)。重启 AI 客户端后,用 /dns-networking 主动调用,或让 AI 根据上下文自动发现并使用。
DNS & Networking 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
DNS & Networking 可免费安装使用。请查阅仓库了解许可证信息。
Debug DNS resolution and network connectivity. Use when troubleshooting DNS failures, testing port connectivity, diagnosing firewall rules, inspecting HTTP requests with curl verbose mode, configuring /etc/hosts, or debugging proxy and certificate issues.
DNS & Networking 属于「Developer & DevOps」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my developer & devops tasks using DNS & Networking
Identifies repetitive steps in your workflow and sets up DNS & Networking to handle them automatically