闲社服务运行正常AI智能体自动化平台
c

Cloudflare连接

技能标识:cloudflare

Connect to Cloudflare API for DNS management, tunnels, and zone administration. Use when user needs to manage domains, DNS records, or create tunnels.

作者:admin | 来源记录:ClawHub
登记来源
ClawHub
版本
V 1.0.0
检测标记
后台标记通过
免费
免费获取
3
收藏
来源与检测标记为平台登记信息,并不代表已展示可复核的检测报告。使用前请核对版本、依赖和所需权限,建议先在隔离环境中运行。
概述
安装方式
版本历史

Cloudflare连接

Cloudflare 技能

连接 Cloudflare API,用于 DNS 管理、隧道和区域管理。

设置

1. 获取 API 令牌

  1. 1. 前往 dash.cloudflare.com/profile/api-tokens
  2. 创建具有所需权限的令牌:
- 区域:读取 - 列出域名 - DNS:编辑 - 管理 DNS 记录 - 账户:Cloudflare 隧道:编辑 - 管理隧道
  1. 3. 复制令牌

2. 配置

bash

选项 A:存储在文件中(推荐)

echo 你的API令牌 > ~/.cloudflare_token chmod 600 ~/.cloudflare_token

选项 B:环境变量

export CLOUDFLAREAPITOKEN=你的API令牌

3. 测试连接

bash ./scripts/setup.sh

命令

区域(域名)

bash
./scripts/zones/list.sh # 列出所有区域
./scripts/zones/list.sh --json # JSON 输出
./scripts/zones/get.sh example.com # 获取区域详情

DNS 记录

bash

列出记录


./scripts/dns/list.sh example.com
./scripts/dns/list.sh example.com --type A
./scripts/dns/list.sh example.com --name api

创建记录

./scripts/dns/create.sh example.com \ --type A \ --name api \ --content 1.2.3.4 \ --proxied

创建 CNAME

./scripts/dns/create.sh example.com \ --type CNAME \ --name www \ --content example.com \ --proxied

更新记录

./scripts/dns/update.sh example.com \ --name api \ --type A \ --content 5.6.7.8

删除记录

./scripts/dns/delete.sh example.com --name api --type A

隧道

bash

列出隧道


./scripts/tunnels/list.sh

创建隧道

./scripts/tunnels/create.sh my-tunnel

配置隧道入口

./scripts/tunnels/configure.sh my-tunnel \ --hostname app.example.com \ --service http://localhost:3000

获取运行令牌

./scripts/tunnels/token.sh my-tunnel

删除隧道

./scripts/tunnels/delete.sh my-tunnel

令牌权限

功能所需权限
列出区域区域:读取
管理 DNS
DNS:编辑 | | 管理隧道 | 账户:Cloudflare 隧道:编辑 |

创建令牌: dash.cloudflare.com/profile/api-tokens



常见工作流程

将子域名指向服务器

bash ./scripts/dns/create.sh mysite.com --type A --name api --content 1.2.3.4 --proxied

为本地服务设置隧道

bash

1. 创建隧道

./scripts/tunnels/create.sh webhook-tunnel

2. 配置入口

./scripts/tunnels/configure.sh webhook-tunnel \ --hostname hook.mysite.com \ --service http://localhost:8080

3. 添加 DNS 记录

TUNNEL_ID=$(./scripts/tunnels/list.sh --name webhook-tunnel --quiet) ./scripts/dns/create.sh mysite.com \ --type CNAME \ --name hook \ --content ${TUNNEL_ID}.cfargotunnel.com \ --proxied

4. 运行隧道

TOKEN=$(./scripts/tunnels/token.sh webhook-tunnel) cloudflared tunnel run --token $TOKEN

输出格式

标志描述
--jsonAPI 原始 JSON
--table
格式化表格(默认) | | --quiet | 最小化输出(仅 ID) |

故障排除

错误解决方案
未找到 API 令牌运行设置或设置 CLOUDFLAREAPITOKEN
401 未授权
检查令牌是否有效 | | 403 禁止访问 | 令牌缺少所需权限 | | 未找到区域 | 确认域名在你的账户中 |

标签

skill ai

通过对话安装

以下为平台配置的接入选项,并非逐项实测通过。能否安装取决于客户端支持、技能来源和运行环境:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 cloudflare-api-1776394025 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 cloudflare-api-1776394025 技能

通过命令行安装

skillhub install cloudflare-api-1776394025

下载

⬇ 下载 cloudflare v1.0.0(免费)

文件大小: 14.37 KB | 发布时间: 2026-4-17 14:28

v1.0.0 最新 2026-4-17 14:28
Initial release - DNS management, tunnels, and zone administration
返回顶部