dns

dns is a skill for Claude Code, Codex from chaterm/terminal-skills. It costs 8 tokens per session (1,942 once invoked), scanned B, original, Apache-2.0.

A set of instructions for DNS, the system that maps names such as example.com to network addresses, and for finding DNS problems.

In plain words
What is it for?
Use it to query address, mail, name-server, text, and other DNS records with dig, nslookup, or host; trace lookups; perform reverse lookups; and inspect local DNS settings.
Why use it?
It helps determine whether a name is resolving correctly, which DNS server answered, and where a failed lookup occurs.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to query address, mail, name-server, text, and other DNS records with dig, nslookup, or host; trace lookups; perform reverse lookups; and inspect local DNS settings.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/chaterm/terminal-skills/dns
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add chaterm/terminal-skills --skill dns
Clone the repo
git clone --depth 1 https://github.com/chaterm/terminal-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for dns

README.md
[![agentmods](https://agentmods.dev/badge/skills/chaterm/terminal-skills/dns/github.svg)](https://agentmods.dev/skills/chaterm/terminal-skills/dns)
Your own site
<a href="https://agentmods.dev/skills/chaterm/terminal-skills/dns"><img src="https://agentmods.dev/badge/skills/chaterm/terminal-skills/dns/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for dns

Your own site · 80×15
<a href="https://agentmods.dev/skills/chaterm/terminal-skills/dns"><img src="https://agentmods.dev/badge/skills/chaterm/terminal-skills/dns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 8 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,942 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00008 $0.01942
Opus 5 $0.00004 $0.00971
Sonnet 5 $0.00002 $0.00388
Haiku 4.5 $0.00001 $0.00194

Measured 10d ago against content hash ade572b0f797, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade B, and why

dns scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

sudo dscacheutil -flushcache
network/dns/SKILL.md · 349 lines

How it starts

The opening of the file, as written. The whole thing — 349 lines — stays where its author put it; the contents beside it link to each section on GitHub.

DNS 配置与排查

概述

DNS 配置、解析排查、BIND/CoreDNS 等技能。

DNS 查询工具

dig

# 基础查询
dig example.com
dig example.com A
dig example.com AAAA
dig example.com MX
dig example.com NS
dig example.com TXT
dig example.com ANY

# 简短输出
dig +short example.com

# 指定 DNS 服务器
dig @8.8.8.8 example.com
dig @1.1.1.1 example.com

# 追踪解析过程
dig +trace example.com

# 反向解析
dig -x 8.8.8.8

# 查询特定记录
dig example.com SOA
dig example.com CNAME

# 禁用递归
dig +norecurse example.com

nslookup

# 基础查询
nslookup example.com
nslookup example.com 8.8.8.8

# 查询特定类型
nslookup -type=mx example.com
nslookup -type=ns example.com
nslookup -type=txt example.com

# 反向解析
nslookup 8.8.8.8

host

# 基础查询
host example.com
host -t mx example.com
host -t ns example.com

# 反向解析
host 8.8.8.8

# 详细输出
host -v example.com

本地 DNS 配置

/etc/resolv.conf

# 查看配置
cat /etc/resolv.conf

# 配置示例
nameserver 8.8.8.8
nameserver 8.8.4.4
search example.com
options timeout:2 attempts:3

# 临时修改(可能被覆盖)
echo "nameserver 8.8.8.8" > /etc/resolv.conf

/etc/hosts

# 查看
cat /etc/hosts

# 添加记录
echo "192.168.1.100 myserver.local" >> /etc/hosts

# 格式
127.0.0.1       localhost
192.168.1.100   myserver myserver.local

systemd-resolved

# 查看状态
systemd-resolve --status
resolvectl status

# 查询
resolvectl query example.com

# 刷新缓存
systemd-resolve --flush-caches
resolvectl flush-caches

# 配置文件
/etc/systemd/resolved.conf

BIND DNS 服务器

安装与管理

# 安装
apt install bind9 bind9utils          # Debian/Ubuntu
yum install bind bind-utils           # CentOS/RHEL

# 服务管理
systemctl start named
systemctl enable named
systemctl status named

# 检查配置
named-checkconf
named-checkzone example.com /etc/bind/zones/db.example.com

主配置

# /etc/bind/named.conf.options
options {
    directory "/var/cache/bind";
    
    forwarders {
        8.8.8.8;
        8.8.4.4;
    };
    
    dnssec-validation auto;
    
    listen-on { any; };
    listen-on-v6 { any; };
    
    allow-query { any; };
    allow-recursion { 192.168.0.0/16; 10.0.0.0/8; };
    
    recursion yes;
};

Read the full file on GitHub · 349 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 349 lines · 8 tokens per session scan B ade572b0f797

Subscribe to this mod's changes

dns is a skill published in the GitHub repository chaterm/terminal-skills (59 stars, last pushed 6mo ago), licensed Apache-2.0. It adds 8 tokens to every session and 1,942 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.