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、解析不到.
In this repository11 other files it gives its agents.
- aish-add-skillsSkill
- deepin-sysassistSkill
- devops-docker-patternsSkill
- devops-platform-engineeringSkill
- diagnose_system_lagSkill
- find-skillsSkill
- network-path-diagnoseSkill
- nfs-cifs-mount-diagnoseSkill
- prompt-designerSkill
- sosreport-analyzerSkill
- ssl-cert-toolkitSkill
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
- Very specific: line 46
Need a domain first: ask if missing; optional expected type (A/AAAA/CNAME/MX/TXT).
- Very specific: line 49
Missing tools: prefer dig; else host / nslookup / getent.
- Very specific: line 50
Ask before sending internal/sensitive names to public DNS, +trace, or whois.
- Distinctive: line 98
Stop here if this explains the symptom.
- Distinctive: line 102
Use when still needed (after consent for sensitive/internal names):
- Distinctive: line 118
No cloud DNS vendor APIs.
≈ “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.
Files
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
- Need a domain first: ask if missing; optional expected type (A/AAAA/CNAME/MX/TXT).
- Read-only: inspect resolution and config; do not change DNS servers or hosts unless the user explicitly asks (default is advice only).
- Stop when enough: once you can separate “local resolver” vs “authoritative/record” issues, answer.
- Missing tools: prefer
dig; elsehost/nslookup/getent. - Ask before sending internal/sensitive names to public DNS,
+trace, orwhois.
Workflow
Confirm domain & symptom → local resolver → local dig → optional external checks → answer1. Confirm inputs
| Input | Notes |
| Domain | e.g. example.com or www.example.com |
| Symptom | total failure / wrong answer / recent change not visible / only on some networks |
| Record type | default 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| Observation | Lean toward |
getent works, browser fails | App/proxy/DoH; not only system DNS |
Bad /etc/hosts entry | Local hijack |
| No nameserver / broken resolved | Local resolver config |
3. Local dig (default)
command -v dig
dig +noall +answer +stats <domain> A
dig +noall +answer <domain> AAAAWithout dig: host <domain> or nslookup <domain>.
| Status | Meaning |
| NXDOMAIN | Name/label missing (or not delegated) |
| NOERROR with empty answer | No records of that type |
| SERVFAIL / timeout | Upstream / 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| Status | Meaning |
| Different answers across resolvers | Cache / propagation / split-horizon (check TTL) |
| System resolver fails, public DNS works | Local 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 defaultReply in the user's language.
Related skills
| Case | Skill |
| Resolves but path is slow/lossy | network-path-diagnose |
| HTTPS certificate errors | ssl-cert-toolkit |
| Whole-host lag | diagnose_system_lag |
Example
User: Browser cannot find xxx.com
getent+dig xxx.com A- NXDOMAIN → record/domain issue; system SERVFAIL but 8.8.8.8 OK → local upstream DNS
- Recommend the matching fix
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
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.

