cloudflare-tunnel-publish
БесплатноЗапускает вложенные скриптыНе проверенPublish a local service to a user-owned custom domain via Cloudflare Tunnel. Use when the user wants their own domain instead of community.iamstarchild.com…
от Starchild-ai-agent★ 34 звезды на GitHubОб этом скилле
What this skill does
Turns a service running on a local port (default: a Starchild preview, but works for any HTTP service) into something the world can reach at app.userdomain.com, using Cloudflare Tunnel. No public IP required, no inbound ports opened, free SSL.
Two roles in the flow:
- User does manually (must, can't be automated): create Cloudflare account, buy/transfer domain to Cloudflare, create API Token.
- Agent does automatically (this skill): verify token, pick zone, create tunnel, configure ingress, create DNS, install + start
cloudflared, verify the public URL works.
Audience assumption
Treat the user as a beginner. They may have never used Cloudflare. Walk them through one micro-step at a time, wait for confirmation, then move on. Do NOT dump the whole 10-step plan and disappear.
Workflow
Phase 0 — Set the stage (1 message)
Tell the user in plain language what's about to happen, in 4 phases:
- They register a Cloudflare account + add a domain (manual, ~5 min)
- They create an API Token and give it to you securely (manual, ~2 min)
- You build the tunnel + DNS + start it (automatic, ~1 min)
- You test the URL together (automatic)
Ask: "Do you already have a domain on Cloudflare, or do we need to start from scratch?" Branch on the answer.
Phase 1 — Get the user a domain on Cloudflare
If they don't have one yet:
- Direct them to https://dash.cloudflare.com/sign-up to register
- Then https://dash.cloudflare.com/?to=/:account/domains to buy a domain (Cloudflare sells
.com / .net / .org / .io / .dev / .appetc. at registry cost), OR add an existing domain and change nameservers - Wait for them to confirm "domain is active in Cloudflare" before proceeding
Beginner hint to share: "When the domain shows status Active in your Cloudflare dashboard, we're good to continue."
If they already have one: skip to Phase 2.
Phase 2 — Create the API Token
Send them this exact link (it pre-fills the right permissions when possible, and the user can also build it manually):
https://dash.cloudflare.com/profile/api-tokens → Create Token → Create Custom Token
Required permissions (tell them to add these three):
- Account → Cloudflare Tunnel → Edit
- Zone → DNS → Edit
- Zone → Zone → Read
Account Resources: their account. Zone Resources: Include All zones (or specifically the domain). TTL: leave default.
After they click Continue to summary → Create Token → Cloudflare shows the token once. Tell them: do not paste it in chat.
Phase 3 — Receive the token securely
Call request_env_input with:
env_vars=[{"key": "CLOUDFLARE_API_TOKEN", "label": "Cloudflare API Token", "required": true}]
reason="Used to create the tunnel and DNS record on your domain. Stored locally in workspace/.env, never echoed in chat."
Wait for the user to submit it via the secure popup. Do not retry-loop if they don't submit immediately — just wait.
Phase 4 — Verify token + pick the zone
Run python3 skills/cloudflare-tunnel-publish/scripts/verify.py. It prints:
- Token validity
- The user's account_id (saves to
workspace/.cf_state.json) - All zones (domains) on the account
If multiple zones, ask the user which domain to use. Save zone_id and zone_name to state.
Phase 5 — Decide what to publish
Ask the user two things:
- Subdomain (e.g.,
app,demo,www) → final hostname will be<sub>.<zone_name>. Apex domain (@) is also allowed. - Local port (e.g.,
8080,3000). If they say "my Starchild preview", runcat /data/previews.json 2>/dev/nullto look up an existing preview's port; otherwise ask explicitly.
Default service URL: http://localhost:<port>.
Phase 6 — Build the tunnel (automated)
Run python3 skills/cloudflare-tunnel-publish/scripts/setup.py --hostname <full_hostname> --port <port>.
Tunnel reuse is the default. If a healthy tunnel already exists on the
account, setup.py adds the new hostname to that tunnel's ingress and points
the DNS CNAME at it — instead of creating a separate tunnel. One tunnel =
one cloudflared process = one keepalive watchdog. Creating a new tunnel per
site is how you end up with N processes to babysit and N ways to silently go
dark (the exact bug that prompted this: a second tunnel's cloudflared died
and nothing was watching it, because the watchdog only knew about the first).
Pass --new-tunnel only when you have a reason to isolate traffic (e.g. very
high volume on one site that would saturate the shared edge connections).
The script does, in order:
- Reuse a healthy tunnel if one exists (or create one named
starchild-<hostname>if none, or use--new-tunnelto force a new one) - Fetch the tunnel run token (a long base64 string used to start
cloudflared) - PUT the ingress configuration: merge
<hostname>→http://localhost:<port>into the existing ingress rules (preserving oth
Установить cloudflare-tunnel-publish в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл cloudflare-tunnel-publish?
Publish a local service to a user-owned custom domain via Cloudflare Tunnel. Use when the user wants their own domain instead of community.iamstarchild.com (e.g. app.mydomain.com, fix SSL 521 on a custom domain).
Как установить скилл cloudflare-tunnel-publish?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл cloudflare-tunnel-publish запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic