Skip to content
Agentmart
Submit a tool

cloudflare-tunnel

Expose localhost to the internet via Cloudflare Tunnel.

Skill by PrashamTrivedi

IndexedMIT
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/prashamtrivedi-cloudflare-tunnel

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Expose localhost to the internet via Cloudflare Tunnel. Use when user says "open the tunnel", "use the tunnel", "start the tunnel", "close the tunnel", "stop the tunnel", "kill the tunnel". The word "tunnel" is the key trigger.

Use cases: documents, cloud

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/cloudflare-tunnel

Tools it pre-approves 11

From allowed-tools in SKILL.md: the agent may use these without asking you each time.

  • Bash(cloudflared:*),
  • Bash(lsof:*),
  • Bash(kill:*),
  • Bash(ps:*),
  • Bash(pkill:*),
  • Bash(nohup:*),
  • Bash(yq:*),
  • Read,
  • Edit,
  • Grep,
  • Glob

What's inside

Skill name
cloudflare-tunnel
Description
Expose localhost to the internet via Cloudflare Tunnel. Use when user says "open the tunnel", "use the tunnel", "start the tunnel", "close the tunnel", "stop the tunnel", "kill the tunnel". The word "tunnel" is the key trigger.
License
MIT
Allowed tools
Bash(cloudflared:*),, Bash(lsof:*),, Bash(kill:*),, Bash(ps:*),, Bash(pkill:*),, Bash(nohup:*),, Bash(yq:*),, Read,, Edit,, Grep,, Glob
Instructions
62 lines in SKILL.md · view on GitHub

Before installing

  • Pre-approves some shell commands

Files (1)

  • SKILL.md

SKILL.md (first lines)

# Cloudflare Tunnel — Config-Based Setup

All tunnel routing is managed via `~/.cloudflared/config.yml`. The tunnel is always a named tunnel (`cloudflared tunnel run`).

## Setup: Ensure Current Project Is in Config

### Step 1: Determine the project hostname

Read `wrangler.jsonc` / `wrangler.toml` / `wrangler.json` in the current project to find:
- Check `routes` or custom domain config for a `*.prashamhtrivedi.app` URL — if found, extract the subdomain part (without `.prashamhtrivedi.app`) and use `localhost-<subdomain>.prashamhtrivedi.app` as the hostname.
- Otherwise, use the worker `name` field and set hostname to `localhost-<name>.prashamhtrivedi.app`.

### Step 2: Read `~/.cloudflared/config.yml`

Check if the hostname from Step 1 already exists in the ingress rules.

- **If it exists:** Note its port. Done — proceed to running the tunnel.
- **If it does NOT exist:** Add it. Follow the port rules below.

### Step 3: Port assignment

Read all existing ingress entries in `~/.cloudflared/config.yml`:
- **Exactly one** project may use port `8787`. If no project currently uses `8787`, assign it to this project.
- If `8787` is already taken, pick the next available port starting from `8788` (check existing entries to avoid collisions).
- Add the new ingress entry **before** the catch-all `- service: http_status:404` line.

### Step 4: Update `package.json`

If the assigned port is NOT `8787`, ensure the project's `package.json` dev script includes the correct `--port <assigned-port>` flag. Update the `dev` script (or `start` script) accordingly.

## Opening a Tunnel

```bash
nohup cloudflared tunnel run > /tmp/cloudflared-tunnel.log 2>&1 &
echo $! > /tmp/cloudflared-tunnel.pid
```

Wait a few seconds, then verify:
```bash
sleep 3 && tail -20 /tmp/cloudflared-tunnel.log
```

Report to user: **Tunnel open at `https://<hostname>`**

## Closing a Tunnel

```bash
if [ -f /tmp/cloudflared-tunnel.pid ]; then
  kill $(cat /tmp/cloudflared-tunnel.pid) 2>/dev/null
  rm /tmp/cloudflared-tunnel.pid
fi
pkill -f "cloudflared tunnel" 2>/dev/null
```

## Checking Tunnel Status

```bash
ps aux | grep 'cloudflared tunnel' | grep -v grep
tail -10 /tmp/cloudflared-tunnel.log 2>/dev/null
```

From PrashamTrivedi/CursorPlugin, MIT.

Signals

Stars
0
Forks
0
Open issues
0
Last commit (this folder)
Sep 1, 2026 (1 month ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from PrashamTrivedi

Cite this page

cloudflare-tunnel skill. Agent Mart. https://agentmart.dev/skills/prashamtrivedi-cloudflare-tunnel (last updated 2026-10-24)