home / skills / jackspace / claudeskillz / network-diagnostics

network-diagnostics skill

/skills/network-diagnostics

This skill performs automated network diagnostics for WSL/Linux, generating scripts and rollbacks to fix MTU, DNS, connectivity, and firewall issues.

npx playbooks add skill jackspace/claudeskillz --skill network-diagnostics

Review the files below or copy the command above to add this skill to your agents.

Files (3)
SKILL.md
1.1 KB
---
name: network-diagnostics
description: Automated network troubleshooting and diagnostics for WSL/Linux environments
---

# Network-diagnostics

## Instructions

For network troubleshooting:
1. **MTU Issues** (common in WSL)
   - Check current MTU: ip link show
   - Test different MTU: sudo ip link set dev eth0 mtu 1350
   - Common WSL MTU: 1300-1400
2. **DNS Resolution**
   - Check /etc/resolv.conf
   - Test with: dig google.com, nslookup google.com
   - Try different DNS: 8.8.8.8, 1.1.1.1
3. **Connectivity Tests**
   - Ping gateway: ip route | grep default
   - Traceroute to destination
   - Test ports: nc -zv host port, telnet host port
4. **Firewall/Routing**
   - Check iptables: sudo iptables -L
   - Review routes: ip route show
   - WSL: Check Windows Firewall
5. **Service Status**
   - Verify service is running
   - Check listening ports: ss -tlnp, netstat -tlnp
- Generate scripts to persist fixes
- Include checks for WSL vs native Linux
- Add rollback mechanisms


## Examples

Add examples of how to use this skill here.

## Notes

- This skill was auto-generated
- Edit this file to customize behavior

Overview

This skill automates network troubleshooting and diagnostics for WSL and native Linux environments. It provides targeted checks for MTU, DNS, connectivity, firewall/routing, and service status, and can generate small scripts to apply and persist fixes. The workflow includes WSL-specific detection and rollback-safe changes to minimize disruption.

How this skill works

The skill runs a set of diagnostic commands to collect interface state, MTU values, DNS configuration, route and gateway information, firewall rules, and listening services. It runs connectivity tests (ping, traceroute, port probes) and offers suggested commands to remediate common issues, with options to generate persistent scripts and rollback steps. It detects whether the environment is WSL or native Linux and adjusts checks and recommendations accordingly.

When to use it

  • Intermittent or slow network connectivity in WSL or Linux
  • DNS failures or inconsistent name resolution
  • Service unreachable on specific ports despite running
  • Suspected MTU-related packet loss or fragmentation
  • After firewall or routing changes, to validate behavior

Best practices

  • Detect WSL vs native Linux and prefer transient first-step fixes before persisting changes
  • Record current state (interfaces, iptables, routes) before applying fixes for easy rollback
  • Test with multiple DNS servers and use dig/nslookup to isolate resolution issues
  • Use conservative MTU adjustments (1300–1400 in WSL) and confirm effects with connectivity tests
  • Persist changes via system-specific mechanisms (netplan, network scripts, or Windows-side settings for WSL) and include undo scripts

Example use cases

  • Automatically lower MTU on eth0 to 1350 in WSL when large downloads stall and generate an undo script
  • Run a full diagnostics report (interfaces, routes, iptables, DNS) after a failed service deploy
  • Identify whether DNS or routing is causing failed API calls by running targeted dig and traceroute sequences
  • Verify that a service is listening and reachable on a port using ss/netstat and nc/telnet checks
  • Create a small script to reapply a validated firewall ruleset and provide a rollback file

FAQ

Will the skill change system settings automatically?

It suggests and can generate scripts to apply fixes, but by default it separates diagnostics from changes and provides undo scripts; apply changes only after review.

How does it handle WSL-specific issues?

It detects WSL and tailors checks (common MTU ranges, Windows Firewall interactions) and recommends fixes that account for the Windows host when appropriate.