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

Markdown Lint

Use this skill immediately when the user needs to: set up markdownlint-cli2 and pre-commit hooks in a repository, fix or batch-repair markdownlint errors lik...

Registry SourceRecently Updated
Coding

Code Sync

Use this skill to batch-sync all git repos across machines — pushing uncommitted changes at end of day or pulling latest at start of day. Invoke when the use...

Registry SourceRecently Updated
Coding

Workspace Init

Use this skill to initialize or update a multi-repo workspace created from dev-config-template. Invoke whenever the user wants to: set up a fresh workspace c...

Registry SourceRecently Updated
Coding

GitHub Issue Auto Triage

自动分类 GitHub Issue,AI 打标签、分配负责人、检测重复、回复 FAQ

Registry SourceRecently Updated