← ClaudeAtlas

project-tunnellisted

Expose local dev server via Cloudflare Tunnel. Use with /project-tunnel.
AirMile/claude-config · ★ 0 · DevOps & Infrastructure · score 75
Install: claude install-skill AirMile/claude-config
# Project Tunnel Start the dev server with Cloudflare Tunnel for HTTPS access from any device. ## 1. Detect framework Check `package.json` dependencies: - `"vite"` → Vite project - `"next"` → Next.js project - Otherwise → error: "No supported framework found in package.json" **Start commands:** | Framework | Command | | --------- | ------------------------------------------------ | | Vite | `node node_modules/.bin/vite --port 3000 --host` | | Next.js | `node node_modules/.bin/next dev -p 3000` | > **Important:** Always use `node node_modules/.bin/...` instead of `npx`. `npx` wrapper processes sometimes die silently under `nohup`, while direct `node` invocation is stable. ## 2. Pre-flight checks **Dependencies:** If `node_modules` does not exist → run `npm install` first. **Vite allowedHosts:** If Vite project, check whether `vite.config` has a `server.allowedHosts` that allows `.trycloudflare.com`. If not → add: ```js server: { allowedHosts: [".trycloudflare.com"]; } ``` **Port 3000:** Use `curl` to detect whether a server is already running: ```bash curl -s -o /dev/null -w "%{http_code}" http://127.0.0.1:3000 ``` - **200/3xx** → something is running. Check `/tmp/devserver.log` for the project path. - **Same project** → skip to step 4 - **Different project** → report which project, kill everything (step 2b), continue to step 3 - **000 (no connection)** → free, continue to step 3 ### 2b. Cleanup (when