360 Secure SkillHub
360 安全技能中心

Cloudflare Global

这是基于Cloudflare全局API密钥的运维技能,替代现代API Token需用环境变量配置邮箱、密钥等凭证。核心功能涵盖DNS记录增删改查及导入导出、Zone管理、SSL设置、缓存清理、规则查看及隧道运维等,还提供脚本支持重复操作,适合用户需通过全局密钥运维Cloudflare资源的场景,执行操作后返回对应结果。

ugvfpdcuwfnh
ugvfpdcuwfnh
热度 37.20
最近更新 2026-05-11 17:42:41
分类:开发依赖:代码执行 / 第三方 API应用场景:API 集成 / 自动化脚本 / DevOps

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add cloudflare-global
Metadata
name
cloudflare-global
description
Cloudflare DNS and zone operations using a Global API Key. Use when the user needs to list, create, update, delete, export, or import DNS records, inspect zone settings or SSL mode, purge cache, inspect page rules or firewall rules, or work with Cloudflare tunnels using a Global API Key instead of a modern API token.

Cloudflare Global

Use this skill to work with Cloudflare via the legacy Global API Key flow.

Authentication

Read credentials from environment variables:

  • CLOUDFLARE_GLOBAL_API_KEY — required
  • CLOUDFLARE_EMAIL — required
  • CLOUDFLARE_ACCOUNT_ID — required only for tunnel operations

Do not use Bearer auth for this flow.

Workflow

  1. Resolve the zone id for the domain.
  2. List existing records when the user asks or when you need to avoid duplicates.
  3. Create, update, delete, or export DNS records with the legacy headers:
    • X-Auth-Email: $CLOUDFLARE_EMAIL
    • X-Auth-Key: $CLOUDFLARE_GLOBAL_API_KEY
  4. Keep DNS records proxied: false unless the user explicitly asks for proxying.
  5. Use ttl: 1 for Cloudflare auto TTL.
  6. For tunnel operations, require CLOUDFLARE_ACCOUNT_ID.

Script

Use scripts/cf-global.sh for repeatable Cloudflare operations.

Available operations

  • verify
  • zones / zones-list
  • zone-get
  • zone-id
  • dns-list
  • dns-create
  • dns-update
  • dns-delete
  • dns-export
  • dns-import
  • settings-list
  • setting-get
  • setting-set
  • ssl-get
  • ssl-set
  • cache-purge
  • pagerules-list
  • firewall-list
  • tunnels-list
  • tunnel-get
  • tunnel-create
  • tunnel-delete
  • analytics

Publishing Notes

  • This skill is safe to publish as-is: it does not contain embedded API keys, tokens, or account secrets.
  • It relies on environment variables for credentials; users must provide their own values locally.
  • Keep any examples, logs, and future edits free of real zone IDs, account IDs, emails, and record contents.
  • Ensure scripts/cf-global.sh is included in the published package.
  • The generated dist/cloudflare-global.skill file is a build artifact and should be regenerated before publishing if the source changes.

Notes

  • Prefer small, deterministic batches for bulk updates.
  • If the API returns authorization or header-format errors, verify that the user provided a Global API Key and the correct Cloudflare account email.