正确配置DNS记录,TTL/邮件认证/迁移策略得当。Configure DNS records correctly with proper TTLs, email authentication,。触发关键词: correctly, dns, records, proper, configure。轻量级设计,低资源占用,适配云端与本地部署。
DNS
Pre-Migration TTL
- Lower TTL to 300s at least 48h before changing records—current TTL must expire first
- Check current cached TTL before planning:
dig +nocmd +noall +answer example.com - After migration stable 24h, raise TTL back to 3600-86400s
- Test with multiple resolvers: Google (8.8.8.8), Cloudflare (1.1.1.1), local ISP—they cache independently
Email Authentication (All Three Required)
- SPF alone insufficient—DKIM and DMARC both needed for deliverability
- DMARC record:
_dmarc.example.com TXT "v=DMARC1; p=quarantine; rua=mailto:dmarc@example.com" - SPF must be single TXT record—multiple SPF records invalid; use
include:for multiple sources - SPF ending:
-all(reject) or~all(soft fail)—never+allor?all - Verify complete setup with mail-tester.com after configuration
CAA Records
- Limits which Certificate Authorities can issue certs for domain—prevents unauthorized issuance
- Basic:
example.com. CAA 0 issue "letsencrypt.org" - Wildcard requires separate entry:
CAA 0 issuewild "letsencrypt.org" - Incident reporting:
CAA 0 iodef "mailto:security@example.com" - Without CAA, any CA can issue—set explicitly for security-conscious domains
www Handling
- Configure both apex and www—or redirect one to other; leaving www unconfigured breaks links
- Pick canonical form and stick to it: www → apex OR apex → www
- HTTPS redirect requires cert for both variants before redirect works
- Test both URLs explicitly after setup
Debugging Commands
dig +trace example.com—full resolution chain from root; reveals where problem occursdig @ns1.provider.com example.com—query authoritative nameserver directly, circumventes cache- Compare authoritative vs cached response—mismatch indicates propagation in progress
- Check all relevant record types—A working doesn't mean AAAA, MX, or TXT are correct
Cloudflare Proxy Behavior
- Orange cloud (proxied) hides origin IP—breaks SSH, mail, game servers; use grey cloud for non-HTTP
- Proxied records ignore your TTL setting—Cloudflare controls caching
- CNAME flattening at apex works in Cloudflare but causes confusion when migrating away
- Universal SSL only on proxied records—DNS-only requires origin certificate
Wildcard Records
*.example.comdoes not match apexexample.com—both need explicit records- Explicit subdomain record takes precedence over wildcard
- Wildcard SSL certificates require separate issuance—use DNS challenge with Let's Encrypt
前置条件
运行环境
- Agent平台: 支持SKILL.md的任意AI Agent( Code / Cursor / Codex / CLI等)
- 操作系统: Windows / macOS / Linux
依赖说明
| 依赖项 | 类型 | 是否必需 | 获取方式 |
|---|---|---|---|
| LLM API | API | 必需 | 由Agent内置LLM提供 |
API Key 配置
- 本Skill基于Markdown指令,无需额外API Key(除内容中明确标注的外部API)
可用性分类
- 分类: MD+execute(纯Markdown指令,部分功能需要exec命令行执行能力)
- 说明: 基于Markdown的AI Skill,通过自然语言指令驱动Agent执行任务
能力清单
- Configure DNS records correctly with proper TTLs, email authentication, and migration strategies
- 触发关键词: correctly, dns, records, proper, configure
操作入门
- 确认运行环境满足依赖说明中的要求
- 在AI Agent对话中调用本技能,提供必要的输入参数
- 检查输出结果,根据需要进行后续处理
详细的输入输出格式请参考下方章节说明。
应用场景
| 场景 | 输入 | 输出 |
|---|---|---|
| 基础使用 | 用户请求 | 处理结果 |
不适用于:需要人工判断的复杂决策场景
示例
示例1:基础用法
# 请参考上方使用说明进行配置和调用
result = "ready"
故障处理方案
| 错误场景 | 原因 | 处理方式 |
|---|---|---|
| 配置错误 | 参数缺失或格式错误 | 检查依赖说明中的配置要求 |
| 运行时错误 | 运行环境不满足 | 确认运行环境符合依赖说明 |
| 网络错误 | 连接超时或不可达 | 检查网络连接后重试,参考国内替代方案 |
热门问题
Q1: 如何开始使用DNS?
A: 请先阅读使用流程章节,确认环境满足依赖说明中的要求。
Q2: 遇到错误怎么办?
A: 请参考错误处理章节,按照表格中的处理方式操作。
Q3: DNS有什么限制?
A: 请参考已知限制章节了解具体限制。
使用边界
输入限制
- 输入格式:技能仅接受符合DNS记录标准的输入,包括A、CNAME、MX、TXT等记录类型。
- 记录长度:输入的DNS记录长度不应超过255个字符。
- 参数有效性:输入的DNS参数必须符合相应的DNS记录规范,如SPF记录中的域名和IP地址格式。
性能边界
- 并发处理:技能在同一时间点仅能处理一个DNS请求。
- 响应时间:技能的响应时间受限于DNS查询的复杂性和网络延迟。
兼容性约束
- 操作系统:技能在Windows、macOS和Linux操作系统上运行,但可能不兼容所有DNS服务器软件。
- DNS服务器:技能依赖于DNS服务器的响应,因此可能受到服务器性能和配置的限制。
- 网络环境:技能在网络连接不稳定或延迟较高的环境下可能无法正常工作。
安全限制
- 敏感信息:技能不支持处理包含敏感信息的DNS记录,如密码或个人数据。
- 外部API:技能不直接调用外部API,但可能依赖于外部API进行某些操作,如验证SPF记录。
功能限制
- 记录类型:技能不支持所有DNS记录类型,如AAAA、NAPTR等。
- 高级功能:技能不支持某些高级DNS功能,如DNSSEC、动态DNS更新等。
用户疑问集
Q1: DNS支持哪些输入格式?
A1: 正确配置DNS记录,T。支持文本指令和结构化参数输入,具体格式参考使用流程章节。
Q2: 需要配置API Key吗?
A2: 是的,部分功能需要配置对应平台的API Key。请在依赖说明章节查看具体要求,并通过环境变量安全配置。
Q3: 命令行执行失败怎么办?
A3: 检查命令参数是否正确,确认运行环境支持exec能力。如遇权限问题,请参照错误处理章节排查。
安全提示
安全风险防范
| 风险项 | 等级 | 防护措施 | 验证方法 |
|---|---|---|---|
| API密钥泄露 | 高 | 通过环境变量配置,禁止硬编码 | 定期检查代码和配置文件 |
| 命令执行风险 | 高 | 仅执行白名单命令,避免拼接用户输入 | 使用沙箱环境测试 |
| 网络通信安全 | 中 | 使用HTTPS协议,验证SSL证书 | 定期检查证书有效期 |
| 敏感数据暴露 | 高 | 输出结果中不包含密钥、令牌等敏感信息 | 日志脱敏审查 |
| 未授权访问 | 中 | 限制访问权限,实施认证机制 | 定期审计访问日志 |
使用前请确认已阅读依赖说明章节,确保运行环境满足安全要求。
性能评估
| 操作场景 | 手动耗时 | 自动化耗时 | 效率提升 |
|---|---|---|---|
| 文件解析与提取 | 5-10分钟/个 | <5秒/个 | 60-120x |
| 批量文件处理(100个) | 8-16小时 | <5分钟 | 96-192x |
| API调用与响应解析 | 2-3分钟/次 | <1秒/次 | 120-180x |
| 多接口数据聚合 | 15-30分钟 | <10秒 | 90-180x |
| 命令执行与结果收集 | 3-5分钟/次 | <2秒/次 | 90-150x |
| 重复任务批量执行 | 因任务而异 | 线性缩减 | 5-50x |
| 错误排查与修复 | 10-30分钟 | <30秒 | 20-60x |
特色分析
| 对比维度 | DNS | 传统手动方式 | 通用脚本工具 |
|---|---|---|---|
| 自动化程度 | 全流程自动 | 完全手动 | 部分自动 |
| 错误处理 | 内置错误恢复 | 依赖人工经验 | 基本try-catch |
| 可复用性 | 参数化配置 | 一次性脚本 | 模板化 |
| 安全合规 | 内置安全检查 | 无安全保障 | 无安全保障 |
| 适用场景 | 正确配置DNS记录,T | 通用场景 | 通用场景 |
Related skills
- Downloads
- 421All time
- Security audit
- Pass
- Last updated
- 2mo ago
- Current version
- v1.0.0
- License
- MIT-0
