Skill: ojbkxiongdei/trycloudflare-proxy-verify (version 1.0.0)

--- name: trycloudflare-proxy-verify description: Expose a local file, local folder, screenshot, or local HTTP service through a temporary trycloudflare.com tunnel and verify the public URL before sharing it. Use when a user asks for a downloadable URL to local resources, local web pages, local screenshots, local generated artifacts, or any machine-local content that should be shared externally. Always verify the final public URL yourself before returning it. --- # TryCloudflare Proxy Verify Use this skill whenever local content needs to be shared via a public URL. ## Rule Never hand back a trycloudflare URL without verifying it first. Minimum verification: 1. start the local file server or local web service 2. start the trycloudflare tunnel 3. wait until cloudflared reports a public URL 4. request the final public URL yourself 5. confirm expected HTTP status and, when practical, content type or content length 6. only then return the URL If verification fails, do not share the URL. Retry or tell the user it is not reachable yet. ## Preferred flow ### For a single file 1. Put the file in a dedicated temp/export directory. 2. Serve that directory locally, for example with `python3 -m http.server`. 3. Start `cloudflared tunnel --url http://127.0.0.1:<port> --no-autoupdate --protocol http2`. 4. Poll logs until a `https://*.trycloudflare.com` URL appears and the tunnel registers successfully. 5. Verify with `curl -I <public-url>/<filename>`. 6. Return that verified file URL. ### For an existing local web app/service 1. Confirm the local service is reachable on localhost. 2. Start cloudflared against that localhost URL. 3. Verify the externally visible URL with `curl` before sharing. ## Important notes - Prefer `--protocol http2` if QUIC stalls or times out. - Keep the tunnel process alive after sharing the URL. - If the first tunnel cannot connect, kill it and create a new one. - For downloads, verify the exact file path, not just the site root. - Mention that trycloudflare links are temporary. ## Resources ### scripts/ - `share_local_path.sh`: start local server, start tunnel, verify public URL ### references/ - `verification-checklist.md`: checklist for reliable URL validation

path: references/verification-checklist.md
content: # Verification Checklist

Before sharing a trycloudflare URL, check all of these:

1. Local origin responds successfully.
   - Example: `curl -I http://127.0.0.1:8765/file.zip`
2. `cloudflared` logs show a generated `https://*.trycloudflare.com` URL.
3. `cloudflared` logs show the tunnel actually registered successfully.
   - Example: `Registered tunnel connection ... protocol=http2`
4. The exact public URL responds successfully.
   - Example: `curl -I https://example.trycloudflare.com/file.zip`
5. Response matches expectation.
   - Correct status code
   - Expected content type if relevant
   - Expected content length if relevant

If any step fails, do not send the URL yet.

## Common failure pattern

A quick tunnel URL may be printed before the edge connection is healthy. That URL is not ready to share until you have verified it yourself.

## Reliable flags

When QUIC is flaky, use:

```bash
cloudflared tunnel --url http://127.0.0.1:PORT --no-autoupdate --protocol http2
```


path: scripts/share_local_path.sh
content: #!/usr/bin/env bash
set -euo pipefail

if [[ $# -lt 2 ]]; then
  echo "Usage: $0 <serve-dir> <relative-path> [port]" >&2
  exit 1
fi

SERVE_DIR="$1"
REL_PATH="$2"
PORT="${3:-8765}"

cd "$SERVE_DIR"
python3 -m http.server "$PORT" >/tmp/trycloudflare-file-server.log 2>&1 &
HTTP_PID=$!

cleanup() {
  kill "$HTTP_PID" 2>/dev/null || true
  [[ -n "${CF_PID:-}" ]] && kill "$CF_PID" 2>/dev/null || true
}
trap cleanup EXIT

cloudflared tunnel --url "http://127.0.0.1:$PORT" --no-autoupdate --protocol http2 >/tmp/trycloudflare-tunnel.log 2>&1 &
CF_PID=$!

PUBLIC_URL=""
for _ in $(seq 1 30); do
  if grep -Eo 'https://[a-z0-9-]+\.trycloudflare\.com' /tmp/trycloudflare-tunnel.log >/tmp/trycloudflare-url.txt 2>/dev/null; then
    PUBLIC_URL=$(tail -n 1 /tmp/trycloudflare-url.txt)
  fi
  if grep -q 'Registered tunnel connection' /tmp/trycloudflare-tunnel.log 2>/dev/null && [[ -n "$PUBLIC_URL" ]]; then
    break
  fi
  sleep 1
done

if [[ -z "$PUBLIC_URL" ]]; then
  echo "Failed to obtain verified public URL" >&2
  exit 2
fi

curl -I "$PUBLIC_URL/$REL_PATH" >/tmp/trycloudflare-final-head.txt

echo "$PUBLIC_URL/$REL_PATH"
wait


Security scan verdicts — ClawScan: suspicious | static analysis: clean | VirusTotal: clean | SkillSpector: suspicious (CRITICAL)