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

dns-diagnose

Skill578 starsChanged 6 months agoApache-2.0View on GitHub

Local DNS resolution troubleshooting with dig/resolvectl/whois. Investigate NXDOMAIN, wrong answers, records not taking effect, and resolver failures. Read-only; do not change DNS config. Also matches Chinese requests such as DNS 解析失败、域名解析不了、NXDOMAIN、解析不到.

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 3 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

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

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

    Need a domain first: ask if missing; optional expected type (A/AAAA/CNAME/MX/TXT).

    line 46
  2. Very specific:

    Missing tools: prefer dig; else host / nslookup / getent.

    line 49
  3. Very specific:

    Ask before sending internal/sensitive names to public DNS, +trace, or whois.

    line 50
  4. Distinctive:

    Stop here if this explains the symptom.

    line 98
  5. Distinctive:

    Use when still needed (after consent for sensitive/internal names):

    line 102
  6. Distinctive:

    No cloud DNS vendor APIs.

    line 118

≈ “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

DNS resolution diagnosis

Troubleshoot domain resolution failures, wrong answers, or “I changed the record but it still fails” on this host.

Out of scope: editing /etc/resolv.conf or NetworkManager by default, buying domains / changing authoritative DNS for the user, HTTP 5xx, or TLS certificate issues (ssl-cert-toolkit). Path quality after resolve succeeds belongs to network-path-diagnose.

Rules

  1. Need a domain first: ask if missing; optional expected type (A/AAAA/CNAME/MX/TXT).
  2. Read-only: inspect resolution and config; do not change DNS servers or hosts unless the user explicitly asks (default is advice only).
  3. Stop when enough: once you can separate “local resolver” vs “authoritative/record” issues, answer.
  4. Missing tools: prefer dig; else host / nslookup / getent.
  5. Ask before sending internal/sensitive names to public DNS, +trace, or whois.

Workflow

Confirm domain & symptom → local resolver → local dig → optional external checks → answer

1. Confirm inputs

InputNotes
Domaine.g. example.com or www.example.com
Symptomtotal failure / wrong answer / recent change not visible / only on some networks
Record typedefault A/AAAA; include MX if mail-related

2. Local resolver

cat /etc/resolv.conf 2>/dev/null
resolvectl status 2>/dev/null || systemd-resolve --status 2>/dev/null || true
getent ahosts <domain> | head -10
grep '^hosts:' /etc/nsswitch.conf 2>/dev/null
grep -E "^\s*[0-9a-fA-F:.]+\s+.*\b<domain>\b" /etc/hosts 2>/dev/null || true
ObservationLean toward
getent works, browser failsApp/proxy/DoH; not only system DNS
Bad /etc/hosts entryLocal hijack
No nameserver / broken resolvedLocal resolver config

3. Local dig (default)

command -v dig
dig +noall +answer +stats <domain> A
dig +noall +answer <domain> AAAA

Without dig: host <domain> or nslookup <domain>.

StatusMeaning
NXDOMAINName/label missing (or not delegated)
NOERROR with empty answerNo records of that type
SERVFAIL / timeoutUpstream / network / firewall

Stop here if this explains the symptom.

4. Optional external checks

Use when still needed (after consent for sensitive/internal names):

dig @1.1.1.1 +noall +answer <domain> A
dig @8.8.8.8 +noall +answer <domain> A
dig +trace <domain> A | tail -40
dig NS <apex> +short
dig @<auth-ns> <domain> A +noall +answer
command -v whois && whois <apex> | head -60
StatusMeaning
Different answers across resolversCache / propagation / split-horizon (check TTL)
System resolver fails, public DNS worksLocal upstream DNS problem

No cloud DNS vendor APIs.

Output format

## Conclusion
1–2 sentences: local resolver / missing record / cache / upstream failure.

## Evidence
- Local nameserver / hosts / getent
- dig (or fallback) status and answers; system vs public DNS
- TTL / authority check if done

## Recommendations
- Action targets (change DNS, fix hosts, wait for TTL, update zone at registrar)
- Do not change config by default

Reply in the user's language.

Related skills

CaseSkill
Resolves but path is slow/lossynetwork-path-diagnose
HTTPS certificate errorsssl-cert-toolkit
Whole-host lagdiagnose_system_lag

Example

User: Browser cannot find xxx.com

  1. getent + dig xxx.com A
  2. NXDOMAIN → record/domain issue; system SERVFAIL but 8.8.8.8 OK → local upstream DNS
  3. Recommend the matching fix

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.