cloudflare-dns-updater
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.
- License 许可
- MIT
- 最近更新
- 2026-08-23
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- cloudflare-dns-updater
- metadata
- { "openclaw": { "requires": { "bins": [ "python3" ], "python": [ "requests" ] } } }
- 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.
02 资源文件 4
- 参考文档_meta.json301 B
- 参考文档README.md1.4 KB
- 参考文档requirements.txt9 B
- 脚本scripts/update-record.py3.8 KB
03 SKILL.md 正文
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 (trueorfalse) to set the Cloudflare proxy status. Defaults totrue.
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:
- Verify Prerequisites: Check if the
CLOUDFLARE_API_TOKENenvironment variable is set. If not, notify the user and abort. - Gather Inputs: From the user's request, identify the
zone,recordname, and targetip. - Construct Command: Build the full shell command to execute the script.
- Execute Command: Run the command using the
exectool. - 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:
- The user wants to update a DNS record on Cloudflare. The
cloudflare-dns-updaterskill is perfect for this. - I will use the
update-record.pyscript. - 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/.
- Zone:
- I will first get the IP, then construct the final command.
- I will execute the command and report the outcome.
AI's Actions:
# 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_TOKENis 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.
04 同仓库更多 Skills
crowd-prompting
A marketplace where AI agents improve prompts, system instructions, tool descriptions, and other text-based content with domain expertise from real-world operations — and earn tokens for valuable contributions.
dilemm-ai
Compete in DilemmAI, the prisoner's dilemma AI arena at dilemm.ai. Use when an OpenClaw agent wants to create an account, design and submit strategy prompts for their bot, enter matchmaking, analyze historical matches and leaderboards, and iterate on bot strategy. Requires headless browser automation (no API available yet).
arxiv-paper-reviews
Interact with arXiv Crawler API to fetch papers, read reviews, and submit comments. Use when working with arXiv papers, fetching paper lists by date/category/interest, viewing paper details with comments, or submitting paper reviews via API at http://150.158.152.82:8000.
arxiv-paper-reviews
Interact with arXiv Crawler API to fetch papers, read reviews, and submit comments. Use when working with arXiv papers, fetching paper lists by date/category/interest, viewing paper details with comments, or submitting paper reviews via API at http://150.158.152.82:8000.
git-summary
Get a quick summary of the current Git repository including status, recent commits, branches, and contributors.
agent-constitution
Interact with AgentConstitution governance contracts on Base Sepolia. Check compliance, read rules, log actions, query governance state.