mobile-preview

Expose local dev server to mobile Chrome via cloudflared tunnel. Use when: (1) user wants to preview results on mobile, (2) requests like "preview on mobile", "check on my phone", "test on mobile", (3) remote development (remote-control/SSH) where external access is needed, (4) sharing localhost with external devices. Korean triggers: "모바일에서 확인", "모바일 프리뷰", "폰으로 확인", "폰으로 테스트", "핸드폰에서 보고 싶다", "모바일에서 보고 싶어", "모바일로 테스트", "폰에서 열어봐".

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "mobile-preview" with this command: npx skills add mindori/mobile-preview/mindori-mobile-preview-mobile-preview

Mobile Preview

Expose local dev server to mobile Chrome via a public HTTPS URL using cloudflared tunnel.

Prerequisites

Install cloudflared if not present:

# Check installation
command -v cloudflared

# macOS
brew install cloudflared

Workflow

1. Detect port

Identify the dev server port:

FrameworkDefault PortConfig
Next.js3000package.jsondev script
Vite5173vite.config.*server.port
CRA3000PORT env var
Nuxt3000nuxt.config.*devServer
Remix5173remix.config.*

Check running server port:

lsof -i -sTCP:LISTEN -P | grep -E ':(3000|5173|8080|4321) '

2. Start dev server

If not already running, start in background:

npm run dev &
# or
pnpm dev &

Wait for the server to be ready, then verify the port.

3. Start tunnel

Use the bundled script:

bash ~/.claude/skills/mobile-preview/scripts/tunnel.sh PORT

Or run directly:

cloudflared tunnel --url http://localhost:PORT 2>&1 &

Parse the https://xxx-xxx.trycloudflare.com URL from the output.

4. Share URL

Provide the tunnel URL to the user:

Mobile preview URL: https://xxx-xxx.trycloudflare.com

Open the URL above in mobile Chrome.
The tunnel is running in the background. Let me know when you're done.

5. Cleanup

Terminate the tunnel process when testing is complete:

pkill -f "cloudflared tunnel"

Troubleshooting

  • Port conflict: Check with lsof -i :PORT, use a different port if needed
  • Tunnel connection failure: Check firewall/VPN, try reinstalling cloudflared
  • HTTPS mixed content: Tunnel is HTTPS, so HTTP resources may fail to load. Ensure the dev server uses relative paths
  • HMR not working: WebSocket-based HMR may not work through cloudflared tunnel. Manual refresh required

Notes

  • cloudflared quick tunnel requires no signup, free, automatic HTTPS
  • URL changes on every tunnel restart
  • Tunnel sessions last approximately 24 hours (auto-expire after)
  • Be cautious with tunnels on dev environments containing sensitive data

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

Funnel Builder

Builds complete multi-channel revenue funnels adapted to any business model. Combines proven frameworks from elite operators: Yomi Denzel's viral top-of-funn...

Registry SourceRecently Updated
Coding

Decode

Decode - command-line tool for everyday use

Registry SourceRecently Updated
Coding

Wip Release

One-command release pipeline. Bumps version, updates changelog + SKILL.md, publishes to npm + GitHub.

Registry SourceRecently Updated
Coding

Wip Ai Devops Toolbox Private

Complete DevOps toolkit for AI-assisted software development. Release pipeline, license compliance, copyright enforcement, repo visibility guard, identity fi...

Registry SourceRecently Updated