localtunnel-auto-expose
LocalTunnel Auto Expose
Purpose
Use this skill when you have started a new local web service (or a development server running on a specific port), or when the user explicitly requests an external/public access address for demonstrations, Webhook testing, or mobile testing.
Execution Steps
- Determine the Port: First, confirm the port number the local service is running on (e.g., 3000, 5173, 8080, etc.). If it cannot be inferred from the context, ask the user.
- Start LocalTunnel:
Use the following command to start LocalTunnel. Be sure to run it in background or non-blocking mode (for example, by using
run_commandand sending to background):npx localtunnel --port <PORT> - Extract Public URL:
Check the output of LocalTunnel; it will print something like
your url is: https://<random-string>.loca.lt. This is the user's public access address. - Get Access Password:
LocalTunnel requires a password by default (usually the public IP of the machine running it) to bypass the anti-phishing warning page. Execute the following command to get this password, selecting the appropriate command based on the current OS:
- Windows (PowerShell):
(Invoke-RestMethod https://loca.lt/mytunnelpassword).ToString().Trim() - Windows (CMD):
curl -s https://loca.lt/mytunnelpassword - Linux / macOS (Bash / Zsh):
curl -s https://loca.lt/mytunnelpassword
- Windows (PowerShell):
- Inform the User: Once you have the URL and the password, present them to the user using a clear Markdown format.
Feedback Template Example
**LocalTunnel Tunnel Started** 🚀
- **Local Service**: `http://localhost:<PORT>`
- **Public URL**: `https://<random-name>.loca.lt`
- **Access Password**: `<Retrieved Password>`
> **Tip**: When accessing the public URL in a browser for the first time, you will be prompted to enter the Endpoint Password. Please use the Access Password provided above. You can stop external access by closing the corresponding background command or terminal.
Notes
- If Node.js/npm is not installed in the environment, remind or assist the user in installing it first.
- The request to get the password (
https://loca.lt/mytunnelpassword) must be initiated on the same machine that is running the LocalTunnel tunnel to obtain the correct password (which is based on the public IP).
More from imhansiy/my-skills
cliproxy-manager
Unified management skill for CLIProxyAPI, enabling AI to dynamically update service configurations (API Keys, model aliases, proxy rules) and monitor usage statistics.
7odoo-dev-assistant
Odoo 开发与运维辅助技能。用于处理 Odoo 模块开发、配置排查、数据库操作、账号与权限修复、文档生成等任务。当前已内置重置 Odoo 登录用户 admin 密码、生成模块介绍页文档、识别当前运行数据库与 addons 路径、恢复 Odoo.sh 备份并配置 odoo.conf 等工作流,后续可继续扩展更多 Odoo 场景。
2plantuml-image-generator
Triggered when the user requests an image (e.g., architecture, flowchart, sequence diagram) or needs a technical illustration inserted into a document. This skill dynamically generates and inserts images using the official PlantUML public API.
1odoorpc-agent-skill
>-
1hexo-blog-manager
Handles the creation workflow for Hexo blog posts and the uploading of images/covers to GitHub_Oss using the jsDelivr CDN. Use exclusively for publishing or updating Hexo blog content with images.
1cliproxyapi-manager-skill
>-
1