agentleFS
AI-Shell-TeamAI-Shell-Team/aish/skills/network-path-diagnose/SKILL.md

network-path-diagnose

Skill578 starsChanged 6 months agoApache-2.0View on GitHub

Diagnose network path quality from this host to a target using ping/mtr/curl. Investigate packet loss, high latency, jitter, and reachability failures; interpret hop results and suggest follow-up tests. Do not change network config. Also matches Chinese requests such as 网络丢包、延迟高、链路质量、ping 不通、网络抖动.

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Need a target first: ask for IP/host/URL if missing.

    line 48
  2. Distinctive:

    Stop when enough: stop once the symptom is explained.

    line 50
  3. Very specific:

    Missing tools: if mtr is absent, fall back to ping + traceroute/tracepath and note that in Evidence.

    line 51
  4. Distinctive:

    If the host itself looks suspicious:

    line 106

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Network path diagnosis

Measure reachability and path quality (packet loss, latency, jitter) from this host to a user-specified target.

Out of scope: cloud VPC/security-group debugging, whole-host lag checks (diagnose_system_lag), DNS-only failures (dns-diagnose), changing routes or firewall rules.

Rules

  1. Need a target first: ask for IP/host/URL if missing; do not invent defaults.
  2. Read-only probes: ping/mtr/curl/ss are fine; do not change NICs, routes, or firewall.
  3. Stop when enough: stop once the symptom is explained; do not add unrelated probes.
  4. Missing tools: if mtr is absent, fall back to ping + traceroute/tracepath and note that in Evidence.
  5. Uncontrollable peers: for public DNS and similar hosts you cannot log into, run forward tests only and state that reverse MTR is impossible.

Workflow

Confirm target & symptom → quick reachability → path quality (mtr) → TCP/port follow-up if needed → answer

1. Confirm inputs

InputNotes
TargetIP, hostname, host:port, or URL
Symptomunreachable / slow / intermittent loss / bad at certain times
Port/protocolrecord TCP port if the app uses one (e.g. 443/22)

2. Quick reachability

getent ahosts <host> | head -5
ping -c 5 -W 2 <host>
curl -sS -o /dev/null -w '%{http_code} time=%{time_total}\n' --connect-timeout 5 <URL>
# or
nc -zv -w 3 <host> <port> 2>&1
  • Resolve fails → use or hand off to dns-diagnose; continue only with a user-provided IP.
  • ICMP all lost but TCP port works → ICMP likely filtered; switch to TCP path tests; do not call the path “dead”.

3. Path quality (prefer mtr)

command -v mtr
mtr -rwzc 50 <host>
# without mtr:
traceroute -n <host> 2>/dev/null || tracepath -n <host>
ping -c 20 -W 2 <host>

How to read results

PatternLikely meaning
High loss on middle hops, last hop and destination OKMiddle boxes may rate-limit ICMP; trust the last hop more
Sustained loss or high latency on the last hopPath or peer/egress problem
Latency jumps after a hopBottleneck often after that hop
Occasional jitter, no sustained lossCongestion or local Wi-Fi/interference; retest later

4. Follow-up (only if needed)

mtr -rwzc 30 --tcp -P <port> <host>

If the host itself looks suspicious:

ip -br link; ip route | head -20
ss -s

Bidirectional: if the user can run commands on the peer, ask for an mtr from the peer back to this host’s reachable address; otherwise note forward-only.

Output format

## Conclusion
1–2 sentences: reachable or not; loss / latency / DNS / port.

## Evidence
- Target and resolution
- ping / mtr (or fallback) numbers; mark forward-only when applicable
- Missing-tool fallbacks

## Recommendations
- Next checks (local Wi-Fi/cable, another network, peer side, ICMP filtered)
- Do not change config automatically

Reply in the user's language.

Related skills

CaseSkill
Name resolution faileddns-diagnose
Host lag / CPU / memorydiagnose_system_lag
NFS/CIFS mount failednfs-cifs-mount-diagnose

Example

User: Intermittent timeouts to x.x.x.x on port 443

  1. ping + nc -zv x.x.x.x 443
  2. mtr -rwzc 50; if mid-hop loss but last hop fine → TCP mtr -P 443
  3. Conclude from last-hop and TCP results; suggest peer/egress follow-up

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.