xieyuanqing

Cloudflare Dns Updater

运维安全v0.1.1
作者:xieyuanqing更新于 2026-05-17共 2 个版本 · 最新版本发布于 2026-02-06cloudflare-dns-updater@clawhub_xieyuanqing/cloudflare-dns-updater
服务器运维

据 AlphaMoat 统计,截至 2026-09,Cloudflare Dns Updater 累计下载 2,856 次、获 0 个星标,在全部 5,078 个 AI 技能中排名第 3,830 位,在「运维安全」分类(264 个)中排名第 244 位。

累计安装
129
累计下载
2,856
星标
-
全站排名
#3,830
全站前 76% · 「运维安全」前 93%
平台累计安装累计下载星标评论
ClawHub ↗852,697--
SkillHub ↗1292,856-—

各平台的计数口径不同,统计时间不一致。

这个技能是做什么的

该技能使用具有 DNS 编辑权限的 API 令牌,将指定主机名指向给定 IP 并开启代理。错误的区域、记录名或目标地址可能导致流量被错误路由;应独立确认区域、主机名和目标服务器 IP,并将令牌权限限制在所需区域。令牌不可写入日志或提示内容。

资料发布于 2026-10-29

可以用来做什么

  • 将子域名指向指定服务器地址
  • 更新 Cloudflare 代理 DNS A 记录
  • 在自动化部署中执行经审核的 DNS 变更

什么时候用

  • 用户明确要求修改 Cloudflare DNS 时
  • 可独立核对目标区域、记录和服务器 IP 时
  • API 令牌仅授予目标区域所需权限时

示例提示词

以下是根据技能文档生成的示例,不代表实际运行结果。

先展示要修改的区域、记录名、目标 IP 和代理设置;不要读取或输出令牌,也不要提交变更,直到我核对并确认。

月度数据趋势

累计下载2,856
1,5282,2412,9542026-03 · 累计下载 1,6262026-05 · 累计下载 2,1072026-06 · 累计下载 2,2412026-07 · 累计下载 2,4322026-08 · 累计下载 2,6022026-09 · 累计下载 2,85626-0326-09
星标-
0112026-03 · 星标 -2026-05 · 星标 -2026-06 · 星标 -2026-07 · 星标 -2026-08 · 星标 -2026-09 · 星标 -26-0326-09

2026-09 起统计方法调整:同名技能按作者分别统计,并覆盖全部技能。图中虚线为调整前的月份,与之后的数据不直接比较,也不计算跨越调整的增长。

月份累计下载环比星标
2026-092,856—-
2026-082,602+7.0%-
2026-072,432+8.5%-
2026-062,241+6.4%-
2026-052,107—-
2026-031,626—-

SKILL.md 原文

以下是作者发布的原始文件,按纯文本显示,本站未做修改或审核;其中的链接不可点击,命令请核实后再运行。抓取于 2026-10-23。

3.5 KB · ClawHub v0.1.1
---
name: cloudflare-dns-updater
description: "Creates or updates a proxied Cloudflare DNS A record. Use when you need to programmatically point a subdomain to an IP address. Takes record name, zone name, and IP address as input."
metadata:
  openclaw:
    requires:
      bins: ["python3"]
      python: ["requests"]
---
展开全部(共 80 行)
# Cloudflare DNS Updater

This skill creates or updates a Cloudflare DNS 'A' record, pointing it to a specified IP address and ensuring it is proxied. It is a foundational tool for automating service deployment and DNS management.

## Pre-requisites

This skill requires the `CLOUDFLARE_API_TOKEN` environment variable to be set with a valid Cloudflare API Token that has DNS edit permissions.

The model should verify this prerequisite before attempting to use the skill. If the variable is not set, it should inform the user and stop.

## Core Action: `scripts/update-record.py`

The core logic is handled by the `update-record.py` script.

### **Inputs (Command-Line Arguments)**

- `--zone`: (Required) The root domain name. Example: `example.com`
- `--record`: (Required) The name of the record (subdomain). Use `@` for the root domain itself. Example: `www`
- `--ip`: (Required) The IPv4 address to point the record to.
- `--proxied`: (Optional) Boolean (`true` or `false`) to set the Cloudflare proxy status. Defaults to `true`.

### **Output**

The script will print its progress to stdout.
- On success, it prints a confirmation message and a JSON object of the created/updated record.
- On failure, it prints a descriptive error message to stderr and exits with a non-zero status code.

### **Execution Workflow**

To use this skill, follow these steps:

1.  **Verify Prerequisites**: Check if the `CLOUDFLARE_API_TOKEN` environment variable is set. If not, notify the user and abort.
2.  **Gather Inputs**: From the user's request, identify the `zone`, `record` name, and target `ip`.
3.  **Construct Command**: Build the full shell command to execute the script.
4.  **Execute Command**: Run the command using the `exec` tool.
5.  **Report Result**:
    - If the command succeeds, report the successful creation or update to the user.
    - If the command fails, analyze the error message from stderr and report the issue to the user in a clear, understandable way.

### **Example Usage**

**User Request:** "Point www.example.com to the server's public IP."

**AI's Thought Process:**
1.  The user wants to update a DNS record on Cloudflare. The `cloudflare-dns-updater` skill is perfect for this.
2.  I will use the `update-record.py` script.
3.  I need the zone, record name, and IP.
    - Zone: `example.com`
    - Record: `www`
    - IP: I need to find the server's public IP first. I can use `curl -s https://ipv4.icanhazip.com/`.
4.  I will first get the IP, then construct the final command.
5.  I will execute the command and report the outcome.

**AI's Actions:**
```bash
# Step 1: Get IP
PUBLIC_IP=$(curl -s https://ipv4.icanhazip.com/)

# Step 2: Run the skill's script
python3 skills/cloudflare-dns-updater/scripts/update-record.py \
  --zone "example.com" \
  --record "www" \
  --ip "$PUBLIC_IP"
```

### **Failure Strategy**

- **If `CLOUDFLARE_API_TOKEN` is not set:** Do not attempt to run the script. Inform the user that the required environment variable is missing and needs to be configured by the administrator.
- **If the script exits with an error:** Read the error message from stderr. Common errors include invalid API token, incorrect zone name, or insufficient permissions. Report the specific error to the user.

「运维安全」分类下的热门技能

数据月份:2026-09 · 下载/星标/安装数聚合自公开技能注册库(ClawHub、SkillHub),按月更新。口径说明见数据方法。