Skill: rogue-agent1/dns-records (version 1.0.0)

--- name: dns-records description: Look up DNS records for any domain — A, AAAA, MX, NS, TXT, CNAME, SOA. Use when asked to check DNS records, find a domain's IP address, look up mail servers, check nameservers, or debug DNS configuration. Uses system dig command with Python socket fallback. Zero dependencies. --- # dnscheck 🔍 DNS record lookup with multi-type support and JSON output. ## Commands ```bash # Full DNS check (all common record types) python3 scripts/dnscheck.py github.com openclaw.ai # Specific record types only python3 scripts/dnscheck.py -t A MX example.com # JSON output for scripting python3 scripts/dnscheck.py --json example.com ``` ## Record Types - **A** — IPv4 addresses - **AAAA** — IPv6 addresses - **MX** — Mail servers - **NS** — Nameservers - **TXT** — SPF, DKIM, verification records - **CNAME** — Canonical name aliases - **SOA** — Start of authority ## Features - Queries all record types by default - Uses `dig` when available, falls back to Python sockets for A/AAAA - JSON output mode for automation - Multiple domains in one command

path: README.md
content: # dnscheck 🔍

DNS record lookup tool. Query A, AAAA, MX, NS, TXT, CNAME, SOA records for any domain. Uses system `dig` with socket fallback. Zero dependencies.


path: dnscheck.py
content: #!/usr/bin/env python3
"""dnscheck — DNS record lookup tool. Zero dependencies."""
import socket, subprocess, sys, argparse, json, re

def dig(domain, rtype="A"):
    """Use system dig if available, fall back to socket."""
    try:
        out = subprocess.run(
            ["dig", "+short", "+timeout=5", rtype, domain],
            capture_output=True, text=True, timeout=10
        )
        lines = [l.strip() for l in out.stdout.strip().split("\n") if l.strip()]
        return lines if lines else []
    except (FileNotFoundError, subprocess.TimeoutExpired):
        if rtype == "A":
            try:
                return [r[4][0] for r in socket.getaddrinfo(domain, None, socket.AF_INET)]
            except Exception:
                return []
        elif rtype == "AAAA":
            try:
                return [r[4][0] for r in socket.getaddrinfo(domain, None, socket.AF_INET6)]
            except Exception:
                return []
        return []

def check_domain(domain, rtypes=None):
    if rtypes is None:
        rtypes = ["A", "AAAA", "MX", "NS", "TXT", "CNAME", "SOA"]
    result = {"domain": domain, "records": {}}
    for rt in rtypes:
        records = dig(domain, rt)
        if records:
            result["records"][rt] = records
    return result

def main():
    p = argparse.ArgumentParser(prog="dnscheck", description="DNS record lookup")
    p.add_argument("domains", nargs="+", help="Domains to look up")
    p.add_argument("-t", "--type", nargs="+", default=None, help="Record types (A, AAAA, MX, NS, TXT, CNAME, SOA)")
    p.add_argument("--json", action="store_true", help="JSON output")
    args = p.parse_args()

    results = []
    for domain in args.domains:
        r = check_domain(domain, args.type)
        results.append(r)
        if not args.json:
            print(f"\n🔍 {domain}")
            if not r["records"]:
                print("  ❌ No records found")
                continue
            for rt, vals in r["records"].items():
                for v in vals[:5]:
                    print(f"  {rt:>6}  {v}")
    
    if args.json:
        print(json.dumps(results, indent=2))

if __name__ == "__main__":
    main()


path: scripts/dnscheck.py
content: #!/usr/bin/env python3
"""dnscheck — DNS record lookup tool. Zero dependencies."""
import socket, subprocess, sys, argparse, json, re

def dig(domain, rtype="A"):
    """Use system dig if available, fall back to socket."""
    try:
        out = subprocess.run(
            ["dig", "+short", "+timeout=5", rtype, domain],
            capture_output=True, text=True, timeout=10
        )
        lines = [l.strip() for l in out.stdout.strip().split("\n") if l.strip()]
        return lines if lines else []
    except (FileNotFoundError, subprocess.TimeoutExpired):
        if rtype == "A":
            try:
                return [r[4][0] for r in socket.getaddrinfo(domain, None, socket.AF_INET)]
            except Exception:
                return []
        elif rtype == "AAAA":
            try:
                return [r[4][0] for r in socket.getaddrinfo(domain, None, socket.AF_INET6)]
            except Exception:
                return []
        return []

def check_domain(domain, rtypes=None):
    if rtypes is None:
        rtypes = ["A", "AAAA", "MX", "NS", "TXT", "CNAME", "SOA"]
    result = {"domain": domain, "records": {}}
    for rt in rtypes:
        records = dig(domain, rt)
        if records:
            result["records"][rt] = records
    return result

def main():
    p = argparse.ArgumentParser(prog="dnscheck", description="DNS record lookup")
    p.add_argument("domains", nargs="+", help="Domains to look up")
    p.add_argument("-t", "--type", nargs="+", default=None, help="Record types (A, AAAA, MX, NS, TXT, CNAME, SOA)")
    p.add_argument("--json", action="store_true", help="JSON output")
    args = p.parse_args()

    results = []
    for domain in args.domains:
        r = check_domain(domain, args.type)
        results.append(r)
        if not args.json:
            print(f"\n🔍 {domain}")
            if not r["records"]:
                print("  ❌ No records found")
                continue
            for rt, vals in r["records"].items():
                for v in vals[:5]:
                    print(f"  {rt:>6}  {v}")
    
    if args.json:
        print(json.dumps(results, indent=2))

if __name__ == "__main__":
    main()


Security scan verdicts — ClawScan: clean | static analysis: clean | VirusTotal: clean | SkillSpector: suspicious (MEDIUM)