Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问许可证需确认审计通过

cloudflare-dns-operationsCloudflare DNS 操作

Agent Skill

cloudflare-dns-operations 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

220

周安装

9

GitHub Stars

1

下载量

71
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:cloudflare-dns-operations(Cloudflare DNS 操作)
来源仓库:https://github.com/dawiddutoit/custom-claude
仓库路径:skills/cloudflare-dns-operations
安装命令:
npx skills add https://github.com/dawiddutoit/custom-claude --skill cloudflare-dns-operations
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/dawiddutoit/custom-claude --skill cloudflare-dns-operations

简介

cloudflare-dns-operations 执行低级别 DNS 和区域管理操作。

  • 通过 shell 脚本调用 Cloudflare API 实现批量记录处理。
  • 支持 A、CNAME 记录的添加、更新和删除等基础操作。
  • 需提前配置 .env 文件存储 API token 和区域标识信息。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Cloudflare DNS Operations Skill

Low-level Cloudflare DNS and zone management operations using Cloudflare API for manual record management and advanced configuration.

Quick Start

Quick DNS operations:

# Load environment variables
source /home/dawiddutoit/projects/network/.env

# List all DNS records
/home/dawiddutoit/projects/network/scripts/cf-dns.sh list

# Add A record
/home/dawiddutoit/projects/network/scripts/cf-dns.sh add A api.temet.ai 192.168.68.100

# Add CNAME record
/home/dawiddutoit/projects/network/scripts/cf-dns.sh add CNAME www temet.ai

# Update existing record
/home/dawiddutoit/projects/network/scripts/cf-dns.sh update api.temet.ai 192.168.68.200

# Delete record
/home/dawiddutoit/projects/network/scripts/cf-dns.sh delete api.temet.ai

Table of Contents

  1. When to Use This Skill
  2. What This Skill Does
  3. Instructions

- 3.1 Setup API Authentication - 3.2 List DNS Records - 3.3 Add DNS Records - 3.4 Update DNS Records - 3.5 Delete DNS Records - 3.6 Manage Zone Settings - 3.7 Dynamic DNS Updates

  1. Supporting Files
  2. Expected Outcomes
  3. Requirements
  4. Red Flags to Avoid

When to Use This Skill

Explicit Triggers:

  • "Add DNS record"
  • "Update DNS record"
  • "Delete DNS record"
  • "Dynamic DNS"
  • "Cloudflare API operations"
  • "Manual DNS management"

Implicit Triggers:

  • Need to add DNS record outside domain management system
  • Dynamic home IP updates needed
  • Testing DNS configurations
  • Bulk DNS operations required
  • Zone settings need manual adjustment

Debugging Triggers:

  • "How do I add a DNS record?"
  • "How to update my home IP?"
  • "What DNS records exist?"

What This Skill Does

  1. Setup Auth - Configures Cloudflare API credentials
  2. Lists Records - Shows all DNS records in zone
  3. Adds Records - Creates new A, AAAA, CNAME, TXT records
  4. Updates Records - Modifies existing record values
  5. Deletes Records - Removes DNS records
  6. Manages Settings - Configures SSL, caching, security settings
  7. Dynamic DNS - Automates home IP updates

Instructions

3.1 Setup API Authentication

Required credentials:

  • Cloudflare email address
  • Cloudflare API token or Global API Key
  • Zone ID for temet.ai domain

Step 1: Get Zone ID

  1. Go to: https://dash.cloudflare.com
  2. Select domain: temet.ai
  3. Click: Overview tab
  4. Find: API section in right sidebar
  5. Copy: Zone ID

Example: 1234567890abcdef1234567890abcdef

Step 2: Get API Token

Recommended: Use API Token (scoped permissions)

  1. Go to: https://dash.cloudflare.com/profile/api-tokens
  2. Click: Create Token
  3. Select template: Edit zone DNS
  4. Zone Resources: IncludeSpecific zonetemet.ai
  5. Click: Continue to summaryCreate Token
  6. Copy token (shown only once)

Alternative: Use Global API Key (full account access)

  1. Go to: https://dash.cloudflare.com/profile/api-tokens
  2. Scroll to: API Keys section
  3. Click: View next to Global API Key
  4. Copy key

⚠️ Security note: API Token is more secure (scoped permissions).

Step 3: Add to.env

# Edit .env
nano /home/dawiddutoit/projects/network/.env

# Add (using API Token - recommended):
CLOUDFLARE_EMAIL="your-email@example.com"
CLOUDFLARE_ZONE_ID="your-zone-id-here"
CLOUDFLARE_API_KEY="your-api-token-here"

# Or using Global API Key:
CLOUDFLARE_EMAIL="your-email@example.com"
CLOUDFLARE_ZONE_ID="your-zone-id-here"
CLOUDFLARE_GLOBAL_API_KEY="your-global-api-key-here"

Step 4: Test Access

source /home/dawiddutoit/projects/network/.env

curl -s -X GET "https://api.cloudflare.com/client/v4/user" \
    -H "X-Auth-Email: ${CLOUDFLARE_EMAIL}" \
    -H "X-Auth-Key: ${CLOUDFLARE_API_KEY}" \
    | jq '.success'

Expected output: true

3.2 List DNS Records

Using helper script:

/home/dawiddutoit/projects/network/scripts/cf-dns.sh list

Expected output:

DNS Records for temet.ai:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Type    Name                 Value
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
CNAME   pihole               tunnel-id.cfargotunnel.com
CNAME   jaeger               tunnel-id.cfargotunnel.com
A       home                 1.2.3.4
...

Using direct API call:

source /home/dawiddutoit/projects/network/.env

curl -s -X GET "https://api.cloudflare.com/client/v4/zones/${CLOUDFLARE_ZONE_ID}/dns_records" \
    -H "X-Auth-Email: ${CLOUDFLARE_EMAIL}" \
    -H "X-Auth-Key: ${CLOUDFLARE_API_KEY}" \
    | jq -r '.result[] | "\(.type)\t\(.name)\t\(.content)"'

Filter by type:

# List only A records
/home/dawiddutoit/projects/network/scripts/cf-dns.sh list | grep "^A"

# List only CNAME records
/home/dawiddutoit/projects/network/scripts/cf-dns.sh list | grep "^CNAME"

3.3 Add DNS Records

Add A record (IPv4):

/home/dawiddutoit/projects/network/scripts/cf-dns.sh add A api.temet.ai 192.168.68.100

Add AAAA record (IPv6):

/home/dawiddutoit/projects/network/scripts/cf-dns.sh add AAAA ipv6.temet.ai 2001:db8::1

Add CNAME record:

/home/dawiddutoit/projects/network/scripts/cf-dns.sh add CNAME www temet.ai

Add TXT record (verification/SPF):

/home/dawiddutoit/projects/network/scripts/cf-dns.sh add TXT _verification "verification-code"

Add record with proxy enabled (orange cloud):

# Using direct API call
source /home/dawiddutoit/projects/network/.env

curl -X POST "https://api.cloudflare.com/client/v4/zones/${CLOUDFLARE_ZONE_ID}/dns_records" \
    -H "X-Auth-Email: ${CLOUDFLARE_EMAIL}" \
    -H "X-Auth-Key: ${CLOUDFLARE_API_KEY}" \
    -H "Content-Type: application/json" \
    --data '{
      "type": "A",
      "name": "proxied.temet.ai",
      "content": "192.168.68.100",
      "ttl": 1,
      "proxied": true
    }' | jq '.'

Common record types:

TypeExamplePurpose
A192.168.68.100IPv4 address
AAAA2001:db8::1IPv6 address
CNAMEtarget.example.comAlias to another domain
TXT"verification-code"Text records (verification, SPF)
MX10 mail.example.comMail exchange

3.4 Update DNS Records

Update existing record:

/home/dawiddutoit/projects/network/scripts/cf-dns.sh update api.temet.ai 192.168.68.200

Script automatically:

  1. Finds existing record by name
  2. Gets record ID
  3. Updates content to new value
  4. Preserves type and proxy settings

Update with direct API call:

source /home/dawiddutoit/projects/network/.env

# Step 1: Get record ID
record_id=$(curl -s -X GET \
  "https://api.cloudflare.com/client/v4/zones/${CLOUDFLARE_ZONE_ID}/dns_records?name=api.temet.ai" \
  -H "X-Auth-Email: ${CLOUDFLARE_EMAIL}" \
  -H "X-Auth-Key: ${CLOUDFLARE_API_KEY}" \
  | jq -r '.result[0].id')

# Step 2: Update record
curl -X PUT \
  "https://api.cloudflare.com/client/v4/zones/${CLOUDFLARE_ZONE_ID}/dns_records/${record_id}" \
  -H "X-Auth-Email: ${CLOUDFLARE_EMAIL}" \
  -H "X-Auth-Key: ${CLOUDFLARE_API_KEY}" \
  -H "Content-Type: application/json" \
  --data '{
    "type": "A",
    "name": "api.temet.ai",
    "content": "192.168.68.200",
    "ttl": 1,
    "proxied": false
  }' | jq '.'

3.5 Delete DNS Records

Delete record by name:

/home/dawiddutoit/projects/network/scripts/cf-dns.sh delete api.temet.ai

Confirm before deletion:

Script will show:

Found record: A api.temet.ai → 192.168.68.100
Delete this record? (y/N):

Using direct API call:

source /home/dawiddutoit/projects/network/.env

# Step 1: Get record ID
record_id=$(curl -s -X GET \
  "https://api.cloudflare.com/client/v4/zones/${CLOUDFLARE_ZONE_ID}/dns_records?name=api.temet.ai" \
  -H "X-Auth-Email: ${CLOUDFLARE_EMAIL}" \
  -H "X-Auth-Key: ${CLOUDFLARE_API_KEY}" \
  | jq -r '.result[0].id')

# Step 2: Delete record
curl -X DELETE \
  "https://api.cloudflare.com/client/v4/zones/${CLOUDFLARE_ZONE_ID}/dns_records/${record_id}" \
  -H "X-Auth-Email: ${CLOUDFLARE_EMAIL}" \
  -H "X-Auth-Key: ${CLOUDFLARE_API_KEY}" \
  | jq '.'

3.6 Manage Zone Settings

View all zone settings:

/home/dawiddutoit/projects/network/scripts/cf-settings.sh all

View specific setting:

# SSL/TLS mode
/home/dawiddutoit/projects/network/scripts/cf-settings.sh get ssl

# Security level
/home/dawiddutoit/projects/network/scripts/cf-settings.sh get security_level

# Caching level
/home/dawiddutoit/projects/network/scripts/cf-settings.sh get cache_level

Update setting:

# Set SSL to Full
/home/dawiddutoit/projects/network/scripts/cf-settings.sh set ssl full

# Enable always HTTPS
/home/dawiddutoit/projects/network/scripts/cf-settings.sh set always_use_https on

# Enable HTTP/3
/home/dawiddutoit/projects/network/scripts/cf-settings.sh set http3 on

Enable security suite:

# Enables: SSL Full, Always HTTPS, WAF
/home/dawiddutoit/projects/network/scripts/cf-settings.sh enable-security

Enable performance suite:

# Enables: Brotli, HTTP/2, HTTP/3
/home/dawiddutoit/projects/network/scripts/cf-settings.sh enable-performance

Purge cache:

# Purge all cached files
/home/dawiddutoit/projects/network/scripts/cf-settings.sh purge-cache

Enable development mode:

# Bypass cache for 3 hours
/home/dawiddutoit/projects/network/scripts/cf-settings.sh dev-mode on

# Disable development mode
/home/dawiddutoit/projects/network/scripts/cf-settings.sh dev-mode off

3.7 Dynamic DNS Updates

Scenario: Home internet IP changes, need to update DNS automatically.

Manual update:

# Get current public IP
current_ip=$(curl -s https://api.ipify.org)

# Update DNS record
/home/dawiddutoit/projects/network/scripts/cf-dns.sh update home.temet.ai $current_ip

Automated script:

#!/bin/bash
# /home/dawiddutoit/scripts/dynamic-dns-update.sh

source /home/dawiddutoit/projects/network/.env

# Get current public IP
current_ip=$(curl -s https://api.ipify.org)

# Get DNS record IP
dns_ip=$(dig +short home.temet.ai @1.1.1.1)

# Update if different
if [ "$current_ip" != "$dns_ip" ]; then
  echo "IP changed: $dns_ip → $current_ip"
  /home/dawiddutoit/projects/network/scripts/cf-dns.sh update home.temet.ai $current_ip
else
  echo "IP unchanged: $current_ip"
fi

Schedule with cron:

# Edit crontab
crontab -e

# Check every 5 minutes
*/5 * * * * /home/dawiddutoit/scripts/dynamic-dns-update.sh >> /var/log/dynamic-dns.log 2>&1

Notification on change:

#!/bin/bash
# With notification

current_ip=$(curl -s https://api.ipify.org)
dns_ip=$(dig +short home.temet.ai @1.1.1.1)

if [ "$current_ip" != "$dns_ip" ]; then
  /home/dawiddutoit/projects/network/scripts/cf-dns.sh update home.temet.ai $current_ip

  # Send notification (if ntfy configured)
  if [ -n "$NTFY_TOPIC" ]; then
    curl -d "Home IP updated: $current_ip" https://ntfy.sh/$NTFY_TOPIC
  fi
fi

Supporting Files

FilePurpose
references/reference.mdCloudflare API reference, authentication methods, record types
scripts/cf-dns.shDNS record management helper script
scripts/cf-settings.shZone settings management helper script
examples/examples.mdExample API calls, automation scripts, common patterns

Expected Outcomes

Success:

  • DNS records listed successfully
  • New records added and propagate within minutes
  • Existing records updated correctly
  • Deleted records removed from DNS
  • Zone settings applied successfully
  • Dynamic DNS updates working

Partial Success:

  • Records created but propagation slow (normal, wait 5-10 minutes)
  • Settings applied but not effective immediately (cache may need purging)

Failure Indicators:

  • Authentication failed (403 errors)
  • Zone ID not found
  • Record already exists (can't add duplicate)
  • Record not found (can't update/delete non-existent)

Requirements

  • Cloudflare account with temet.ai domain
  • Cloudflare API token or Global API Key
  • Zone ID for temet.ai
  • curl and jq installed
  • .env file with credentials
  • Network access to Cloudflare API

Red Flags to Avoid

  • Do not use Global API Key if API Token suffices (security best practice)
  • Do not commit API credentials to git (use.env)
  • Do not delete records without confirmation (irreversible)
  • Do not create duplicate records (causes DNS issues)
  • Do not enable proxy on internal IPs (192.168.x.x) - won't work
  • Do not set TTL < 60 seconds (Cloudflare minimum for free plans)
  • Do not purge cache frequently (rate limits apply)

Notes

  • DNS propagation typically takes 1-5 minutes globally
  • Cloudflare proxied records (orange cloud) hide real IP
  • TTL of 1 means "Auto" (Cloudflare manages)
  • Free plan limits: 1000 DNS records per zone
  • API rate limits: 1200 requests per 5 minutes
  • cf-dns.sh and cf-settings.sh scripts located in scripts/ directory
  • Use API Token over Global API Key (better security with scoped permissions)
  • Zone settings changes may require cache purge to take effect immediately
  • Dynamic DNS useful for home servers with changing IPs
  • Cloudflare DNS is authoritative after migration from GoDaddy
  • Use domain management system (manage-domains.sh) for service subdomains
  • Use this skill for one-off DNS operations or non-service records

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.44%
按下载量换算26

Claude

27.58%
按下载量换算20

Cursor

18.64%
按下载量换算13

Gemini CLI

9.86%
按下载量换算7

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills