Lucas Synnott

Cloudflare API

IT運用・セキュリティv1.0.0
作者:Lucas Synnott更新日 2026-05-11cloudflare-api@clawhub_lucassynnott/cloudflare-api
サーバー運用設定生成

AlphaMoatによると、2026-09時点でCloudflare APIのダウンロード数は4,105、スター数は3で、AIスキル全体5,078件中2,463位、IT運用・セキュリティでは264件中144位です。

インストール数
148
ダウンロード数
4105
スター数
3
総合順位
#2,463
全体の上位 49% · IT運用・セキュリティの上位 55%
プラットフォームインストール数ダウンロード数スター数コメント
ClawHub ↗13540063-
SkillHub ↗14841053—

プラットフォームごとに集計方法と集計時点が異なります。

このスキルでできること

curl、jq、Cloudflare APIトークンを使用します。操作には対応する権限が必要で、DNSやトンネルのコマンドは稼働中のリソースを変更する場合があります。必要最小限の権限のトークンを使い、実行前にゾーン、レコード名、トンネル名、IDを確認してください。APIトークンとトンネル実行トークンを保護し、ログや録画されたセッションに出力しないでください。

資料公開日 2026-10-29

できること

  • ゾーンの一覧やDNSレコードを確認する
  • 指定ホスト名のDNSレコードを作成または更新する
  • Cloudflare Tunnelを設定してローカルサービスへ接続する

使う場面

  • APIトークンが必要な権限だけを持つ場合
  • 対象ゾーン、レコード名、トンネルIDを確認した後
  • 変更や削除の前に実行コマンドを確認した後

プロンプト例

スキルのドキュメントをもとに生成した例であり、実際の実行結果ではありません。

指定ゾーンのDNSレコードを確認し、変更を計画する方法を説明してください。アカウントへのアクセス、トークン表示、作成・更新・削除の実行はしないでください。

月次の推移

ダウンロード数4105
2622341942152026-03 · ダウンロード数 27322026-05 · ダウンロード数 33002026-06 · ダウンロード数 34472026-07 · ダウンロード数 36822026-08 · ダウンロード数 38802026-09 · ダウンロード数 410526-0326-09
スター数3
2342026-03 · スター数 32026-05 · スター数 32026-06 · スター数 32026-07 · スター数 32026-08 · スター数 32026-09 · スター数 326-0326-09

2026-09 から集計方法を変更し、同名スキルを作者ごとに分けて集計し、全スキルを対象にしました。破線は変更前の月で、変更後のデータとは直接比較せず、変更をまたぐ増減も計算していません。

月ダウンロード数前月比スター数
2026-094105—3
2026-083880+5.4%3
2026-073682+6.8%3
2026-063447+4.5%3
2026-053300—3
2026-032732—3

SKILL.md 原文

作者が公開した元のファイルをテキストのまま表示しています。AlphaMoat による編集や審査はしていません。リンクはクリックできません。コマンドは内容を確認してから実行してください。取得日 2026-10-23。

3.8 KB・ClawHub v1.0.0
---
name: cloudflare
description: Connect to Cloudflare API for DNS management, tunnels, and zone administration. Use when user needs to manage domains, DNS records, or create tunnels.
read_when:
  - User asks about Cloudflare DNS or domains
  - User wants to create or manage DNS records
  - User needs to set up Cloudflare tunnels
  - User wants to list their Cloudflare zones
metadata:
  clawdbot:
すべて表示(全 174 行)
    emoji: "☁️"
    requires:
      bins: ["curl", "jq"]
---

# Cloudflare Skill

Connect to [Cloudflare](https://cloudflare.com) API for DNS management, tunnels, and zone administration.

## Setup

### 1. Get Your API Token
1. Go to [dash.cloudflare.com/profile/api-tokens](https://dash.cloudflare.com/profile/api-tokens)
2. Create a token with required permissions:
   - **Zone:Read** - List domains
   - **DNS:Edit** - Manage DNS records
   - **Account:Cloudflare Tunnel:Edit** - Manage tunnels
3. Copy the token

### 2. Configure
```bash
# Option A: Store in file (recommended)
echo "YOUR_API_TOKEN" > ~/.cloudflare_token
chmod 600 ~/.cloudflare_token

# Option B: Environment variable
export CLOUDFLARE_API_TOKEN="YOUR_API_TOKEN"
```

### 3. Test Connection
```bash
./scripts/setup.sh
```

---

## Commands

### Zones (Domains)

```bash
./scripts/zones/list.sh                    # List all zones
./scripts/zones/list.sh --json             # JSON output
./scripts/zones/get.sh example.com         # Get zone details
```

### DNS Records

```bash
# List records
./scripts/dns/list.sh example.com
./scripts/dns/list.sh example.com --type A
./scripts/dns/list.sh example.com --name api

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

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

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

# Delete record
./scripts/dns/delete.sh example.com --name api --type A
```

### Tunnels

```bash
# List tunnels
./scripts/tunnels/list.sh

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

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

# Get run token
./scripts/tunnels/token.sh my-tunnel

# Delete tunnel
./scripts/tunnels/delete.sh my-tunnel
```

---

## Token Permissions

| Feature | Required Permission |
|---------|-------------------|
| List zones | Zone:Read |
| Manage DNS | DNS:Edit |
| Manage tunnels | Account:Cloudflare Tunnel:Edit |

Create token at: [dash.cloudflare.com/profile/api-tokens](https://dash.cloudflare.com/profile/api-tokens)

---

## Common Workflows

### Point subdomain to server
```bash
./scripts/dns/create.sh mysite.com --type A --name api --content 1.2.3.4 --proxied
```

### Set up tunnel for local service
```bash
# 1. Create tunnel
./scripts/tunnels/create.sh webhook-tunnel

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

# 3. Add DNS record
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. Run tunnel
TOKEN=$(./scripts/tunnels/token.sh webhook-tunnel)
cloudflared tunnel run --token $TOKEN
```

---

## Output Formats

| Flag | Description |
|------|-------------|
| `--json` | Raw JSON from API |
| `--table` | Formatted table (default) |
| `--quiet` | Minimal output (IDs only) |

---

## Troubleshooting

| Error | Solution |
|-------|----------|
| "No API token found" | Run setup or set CLOUDFLARE_API_TOKEN |
| "401 Unauthorized" | Check token is valid |
| "403 Forbidden" | Token missing required permission |
| "Zone not found" | Verify domain is in your account |

IT運用・セキュリティの人気スキル

Lucas Synnottのその他のスキル

データ月:2026-09 · ダウンロード数、スター数、インストール数は公開スキルレジストリ(ClawHub、SkillHub)から月単位で集計しています。詳しくはデータの方法論をご覧ください。