Token导航 LogoToken导航

Agent Skill · 开发

cloudflare-tunnel-setup(cloudflare 隧道设置)

cloudflare-tunnel-setup 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

cloudflare-tunnel-setup 是开发类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描有未通过项,按安装量在开发类的 21,746 个 Skill 里排第 11,127。

总安装 1,928周安装 78GitHub Stars 1下载 605核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:cloudflare-tunnel-setup(cloudflare 隧道设置)
来源仓库:https://github.com/dawiddutoit/custom-claude
仓库路径:skills/cloudflare-tunnel-setup
安装命令:
npx skills add https://github.com/dawiddutoit/custom-claude --skill cloudflare-tunnel-setup
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/dawiddutoit/custom-claude --skill cloudflare-tunnel-setup

这个 Skill 是做什么的

开发类 Skill 面向写代码、改代码和排查问题,一般会读写仓库文件,部分还会执行构建或测试命令。

交互式引导创建新的 Cloudflare Tunnel,替换过期 token 或新设备安装。包含 Dashboard 创建隧道、.env 配置 token、Docker 重启容器等步骤。支持 Public Hostnames 配置与 Connectivity 验证,确保端到端可达。

要求 Cloudflare 账户、已添加域名与 Docker 运行环境就绪。建议定期轮换 tunnel token 并监控日志中的注册状态。

来源仓库内路径:skills/cloudflare-tunnel-setup

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/dawiddutoit/custom-claude --skill cloudflare-t…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

cloudflare-tunnel-setup 怎么安装?

在终端执行 npx skills add https://github.com/dawiddutoit/custom-claude --skill cloudflare-tunnel-setu…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

cloudflare-tunnel-setup 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

cloudflare-tunnel-setup 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

cloudflare-tunnel-setup 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

cloudflare-tunnel-setup 用的人多吗?

公开数据是累计安装 1,928 次,近一周安装 78 次,下载 605 次,GitHub 1 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

cloudflare-tunnel-setup 安全吗?

第三方扫描有未通过项,风险较高。除非你确认过源码,否则不建议直接安装到常用环境。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理开发类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

开发类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
skill-vetter

技能审查员 · OpenClaw

8,779,018986操作浏览器MIT-0通过
ontology

本体论 · OpenClaw

6,636,960576只读MIT-0通过
entra-app-registration

内部应用程序注册 · Codex、Claude

6,631,872764接触敏感数据未明确通过
entra-app-registration

内部应用程序注册 · Codex、Claude

3,757,680201接触敏感数据未明确通过
nano-banana-pro

纳米香蕉专业版 · OpenClaw

3,526,898364接触敏感数据MIT-0有提醒
cloudflare-tunnel-setup

cloudflare 隧道设置 · 本页

1,9281需要联网未明确未通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Cloudflare Tunnel Setup Skill

Interactive guide for setting up a new Cloudflare Tunnel from scratch.

Quick Start

Run this skill when you need to:

  1. Create a new Cloudflare Tunnel
  2. Replace an expired or invalid tunnel token
  3. Set up remote access for a fresh installation

Minimum requirements: Cloudflare account, domain on Cloudflare, Docker installed.

Table of Contents

  1. When to Use This Skill
  2. What This Skill Does
  3. Instructions

- 3.1 Check Prerequisites - 3.2 Create Tunnel in Dashboard - 3.3 Configure Token in.env - 3.4 Restart Cloudflared Container - 3.5 Configure Public Hostnames - 3.6 Verify Connectivity

  1. Supporting Files
  2. Expected Outcomes
  3. Requirements
  4. Red Flags to Avoid

When to Use This Skill

Explicit Triggers:

  • "Setup cloudflare tunnel"
  • "Create a new tunnel"
  • "Configure remote access"
  • "Replace tunnel token"
  • "Tunnel from scratch"

Implicit Triggers:

  • Fresh installation of network infrastructure
  • Tunnel token expired or invalid
  • CLOUDFLARE_TUNNEL_TOKEN missing from.env
  • Moving infrastructure to new hardware

Debugging Triggers:

  • "Tunnel token not found"
  • "cloudflared container won't start"
  • "No CLOUDFLARE_TUNNEL_TOKEN in.env"

What This Skill Does

  1. Checks Prerequisites - Verifies.env exists and cloudflared is in docker-compose
  2. Guides Tunnel Creation - Step-by-step instructions for Cloudflare dashboard
  3. Configures Token - Adds tunnel token to.env file
  4. Restarts Container - Restarts cloudflared to apply new token
  5. Guides Hostname Setup - Instructions for configuring public hostnames
  6. Verifies Connectivity - Confirms tunnel is connected and working

Instructions

3.1 Check Prerequisites

Step 1: Verify.env file exists

ls -la /home/dawiddutoit/projects/network/.env

If missing, create from example:

cp /home/dawiddutoit/projects/network/.env.example /home/dawiddutoit/projects/network/.env

Step 2: Check if CLOUDFLARE_TUNNEL_TOKEN exists

grep -E "^CLOUDFLARE_TUNNEL_TOKEN" /home/dawiddutoit/projects/network/.env

Possible outcomes:

  • Line exists with value: Token already configured (check if valid)
  • Line exists but empty/placeholder: Needs real token
  • Line not found: Token needs to be added

Step 3: Verify docker-compose has cloudflared service

grep -A 10 "cloudflared:" /home/dawiddutoit/projects/network/docker-compose.yml

If cloudflared service is missing, it needs to be added. See references/reference.md for service definition.

3.2 Create Tunnel in Dashboard

Provide these instructions to the user:

  1. Go to: https://one.dash.cloudflare.com -> Access -> Tunnels
  2. Click "Create a tunnel" -> Select "Cloudflared" connector
  3. Name tunnel (e.g., "pi-home") -> Choose "Docker" as connector type
  4. Copy the tunnel token (long base64 string after --token)
  5. Save token securely

Token format: Base64-encoded JSON containing Account ID, Tunnel ID, and Secret.

3.3 Configure Token in.env

Step 1: Check current token status

grep "CLOUDFLARE_TUNNEL_TOKEN" /home/dawiddutoit/projects/network/.env

Step 2: Add or update token

If line exists, update it. If not, add it.

# If line exists, use sed to replace
# If not, append to file

# The token should look like:
# CLOUDFLARE_TUNNEL_TOKEN=eyJhIjoiYWJjZDEyMzQ...

Use the Edit tool to update .env:

  • Look for existing CLOUDFLARE_TUNNEL_TOKEN= line
  • Replace with new token value
  • Or add new line if not present

Validate token format:

# Token should be base64 decodable
TUNNEL_TOKEN=$(grep "CLOUDFLARE_TUNNEL_TOKEN=" /home/dawiddutoit/projects/network/.env | cut -d'=' -f2)
echo "$TUNNEL_TOKEN" | base64 -d 2>/dev/null | python3 -c "import sys, json; d=json.load(sys.stdin); print('Valid token for account:', d.get('a', 'unknown'))"

3.4 Restart Cloudflared Container

Step 1: Restart the container

cd /home/dawiddutoit/projects/network && docker compose restart cloudflared

Or if container doesn't exist yet:

cd /home/dawiddutoit/projects/network && docker compose up -d cloudflared

Step 2: Check container is running

docker ps | grep cloudflared

Expected output:

CONTAINER ID   IMAGE                         STATUS         NAMES
abc123...      cloudflare/cloudflared:latest Up X seconds   cloudflared

Step 3: Check logs for successful connection

docker logs cloudflared --tail 30

Look for these success indicators:

INF Registered tunnel connection connIndex=0 location=...
INF Registered tunnel connection connIndex=1 location=...
INF Registered tunnel connection connIndex=2 location=...
INF Registered tunnel connection connIndex=3 location=...

4 registered connections = healthy tunnel (2 connections per Cloudflare edge location)

If errors appear:

  • token is invalid: Token was copied incorrectly or expired
  • already registered: Another instance using same token (stop other instances)
  • network error: Check internet connectivity

3.5 Configure Public Hostnames

After tunnel is connected, configure services in Cloudflare dashboard:

  1. Go to: https://one.dash.cloudflare.com -> Access -> Tunnels
  2. Click tunnel name -> Configure -> Public Hostname -> Add
  3. For each service, enter subdomain, domain (temet.ai), Type (HTTP), and URL

Example hostnames:

ServiceSubdomainURL
Pi-holepiholepihole:80
Webhookwebhookwebhook:9000
Jaegerjaeger192.168.68.135:16686

URL patterns:

  • Docker container: container:port (e.g., pihole:80)
  • Host service: host-ip:port (e.g., 192.168.68.135:16686)
  • LAN device: device-ip:port (e.g., 192.168.68.105:80)

Important: Use HTTP (not HTTPS) for backends. Do NOT use host.docker.internal on Linux.

3.6 Verify Connectivity

Step 1: Verify tunnel is registered

docker logs cloudflared 2>&1 | grep -E "Registered tunnel|connIndex"

Expected: 4 "Registered tunnel connection" messages

Step 2: Check tunnel status in dashboard

Go to: https://one.dash.cloudflare.com
Navigate to: Access -> Tunnels
Status should show: "HEALTHY" with green indicator

Step 3: Test external access (from mobile data or external network)

# From a device NOT on home network:
curl -I https://pihole.temet.ai

# Expected: HTTP 302 (redirect to Cloudflare Access) or HTTP 200 (if no auth)

Step 4: Run diagnostic script (optional)

./scripts/cf-tunnel-config.sh show

Supporting Files

FilePurpose
references/reference.mdDocker-compose service definition, token format details
examples/examples.mdExample configurations for common setups

Expected Outcomes

Success:

  • CLOUDFLARE_TUNNEL_TOKEN in.env
  • cloudflared container running
  • 4 tunnel connections registered in logs
  • Tunnel shows "HEALTHY" in dashboard
  • Services accessible via *.temet.ai from external network

Partial Success:

  • Token configured but hostnames not set up (user reminder provided)
  • Tunnel connected but services return 502 (backend configuration issue)

Failure Indicators:

  • "token is invalid" in logs -> Re-copy token from dashboard
  • Container restart loop -> Check token format
  • 0 registered connections -> Network/firewall issue

Requirements

Environment:

  • Cloudflare account with domain
  • Docker and Docker Compose installed
  • Internet connectivity
  • .env file in project root

Accounts/Access:

  • Cloudflare dashboard access
  • Zero Trust enabled (free tier works)

Tools needed:

  • Read, Write, Edit (for.env configuration)
  • Bash (for docker commands and verification)
  • Grep (for checking existing configuration)

Red Flags to Avoid

  • Do not commit tunnel token to git (keep in.env only)
  • Do not use host.docker.internal on Linux hosts
  • Do not use HTTPS URLs for internal service backends
  • Do not share tunnel tokens between environments
  • Do not skip the verification step (3.6)
  • Do not forget to configure public hostnames after tunnel connects
  • Do not leave placeholder token values in.env

Notes

  • Tunnel tokens do not expire but can be revoked in dashboard
  • Each tunnel can have multiple connectors (for redundancy)
  • Tunnel configuration changes apply automatically (no restart needed)
  • Use ./scripts/cf-tunnel-config.sh configure to update ingress via API
  • For authentication, use the configure-google-oauth skill after tunnel setup
  • The existing troubleshoot-tunnel-connectivity skill handles issues with running tunnels

平台分布

Codex

35.55%
按下载量换算215

Claude

34.51%
按下载量换算209

Cursor

17.66%
按下载量换算107

Gemini CLI

9.31%
按下载量换算56

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

未通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills