Agent skill
network-diagnostics
Diagnose network connectivity issues: DNS, routing, firewall, port checks, traceroutes. Use for troubleshooting server-to-server communication or client access problems.
Install this agent skill to your Project
npx add-skill https://github.com/djcyphers/network-copilot-cli/tree/main/skills/network-diagnostics
SKILL.md
Network Diagnostics Skill
When to Activate
- User mentions: connectivity, DNS, ping, traceroute, port, firewall, routing, network unreachable
- User asks why a server can't reach another server
- User reports "connection refused" or "timeout" errors
Diagnostic Workflow
Step 1: Identify the Target
# Extract hostname/IP and port from user's description
$target = "hostname-or-ip"
$port = 443 # or whatever port is relevant
Step 2: Basic Connectivity
# Quick ping test
Test-Connection -ComputerName $target -Count 4
# DNS resolution
Resolve-DnsName $target -Type A
Resolve-DnsName $target -Type AAAA
Step 3: Port Accessibility
# TCP port test
Test-NetConnection -ComputerName $target -Port $port -InformationLevel Detailed
# Multiple ports at once
@(22, 80, 443, 3389, 5985) | ForEach-Object {
Test-NetConnection -ComputerName $target -Port $_ -WarningAction SilentlyContinue |
Select-Object ComputerName, RemotePort, TcpTestSucceeded
}
Step 4: Route Analysis
# Trace the path
Test-NetConnection -ComputerName $target -TraceRoute
# Or classic tracert for more detail
tracert -d $target
Step 5: Local Firewall Check
# Check if Windows Firewall might block
Get-NetFirewallRule | Where-Object {
$_.Enabled -eq 'True' -and $_.Direction -eq 'Outbound'
} | Select-Object DisplayName, Action -First 20
Common Issues & Solutions
| Symptom | Likely Cause | Check |
|---|---|---|
| DNS timeout | DNS server unreachable | nslookup $target 8.8.8.8 |
| Connection refused | Service not running | Test-NetConnection -Port |
| Request timeout | Firewall blocking | Check both local and remote FW |
| TTL exceeded | Routing loop | tracert to find the loop |
| No route to host | Missing route | Get-NetRoute -DestinationPrefix 0.0.0.0/0 |
Output Format
Always report:
- What was tested
- What succeeded ✅
- What failed ❌
- Recommended next step
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
server-health
Check Windows Server health: CPU, memory, disk, services, event logs, uptime. Use when user asks about server performance or wants a health check.
active-directory
Query and manage Active Directory: users, groups, computers, OUs, GPO status. Use when user asks about AD objects or domain information.
remote-management
Manage remote Windows servers via WinRM, PowerShell remoting, and SSH. Use when user needs to execute commands on remote hosts or establish remote sessions.
setup-pre-commit
Set up Husky pre-commit hooks with lint-staged (Prettier), type checking, and tests in the current repo. Use when user wants to add pre-commit hooks, set up Husky, configure lint-staged, or add commit-time formatting/typechecking/testing.
handoff
Compact the current conversation into a handoff document for another agent to pick up.
edit-article
Edit and improve articles by restructuring sections, improving clarity, and tightening prose. Use when user wants to edit, revise, or improve an article draft.
Didn't find tool you were looking for?