简介
一键生成临时公网链接,打通本地AI成果与移动端预览,零配置安全分享
原始描述
Generate short-lived, mobile-friendly ngrok preview links for local artifacts and share them in Telegram. Use when OpenClaw produces images/charts/generated...
通过你的 Agent 添加
点「快速安装」复制一段指令,粘给你正在用的 Agent(Claude Code、Codex、OpenClaw 等),它会自己完成安装。
或者手动安装
包里是 SKILL.md 加作者附带的文件,解压后目录名就是技能名。
技能申请的权限由作者决定,装之前请确认它能读什么、能执行什么。
技能正文
name: ngrok-preview description: High-utility ngrok preview skill for AI agents to share local artifacts (HTML, images, web apps) via temporary public URLs. Use when OpenClaw runs locally but users need mobile access (Telegram/mobile browser) where localhost links are unreachable.
🌐 Ngrok Preview Skill
A high-utility skill for AI agents to share local artifacts (HTML, images, web apps) with users via temporary, secure public URLs.
This skill is designed to bridge the gap between a local development environment and a mobile-first user experience (Telegram or mobile browsers), where localhost links are inaccessible.
🚀 Why use this?
- Mobile-friendly workflows: Preview agent-generated web content on your phone while the agent runs locally.
- OpenClaw integration: Works smoothly with the OpenClaw local gateway. Instead of local file paths or long text dumps, the agent can return a clickable ngrok link.
- Zero-config sharing flow: Handles short-lived preview session creation and cleanup through one script.
🛠 Installation
Install via the skills.sh ecosystem:
npx skills add https://github.com/wynnsu/skills-ngrok-preview --skill ngrok-preview
⚙️ Prerequisites
ngrokCLI installed locally.- ngrok authenticated with your account token:
ngrok config add-authtoken "$NGROK_AUTHTOKEN"
ngrok config check
📖 How it works
When the agent generates a local artifact (visualization, mockup, report, generated page), this skill can:
- Start a local HTTP server scoped to the artifact directory.
- Tunnel that local server through ngrok.
- Return a temporary public URL back to the user through OpenClaw.
Default agent workflow
Create a preview session:
python3 scripts/ngrok_preview.py up \
--title "<task title>" \
--session-id "<task-id>" \
--ttl-minutes 120 \
--source "<artifact-path-1>" \
--source "<artifact-path-2>"
The script returns JSON with:
public_urlexpires_atsession_idstop_command
Stop and clean up when done:
python3 scripts/ngrok_preview.py down --session-id "<task-id>" --delete-session-dir
List sessions:
python3 scripts/ngrok_preview.py status
Clean expired sessions:
python3 scripts/ngrok_preview.py cleanup
Skill structure
SKILL.md: Skill metadata + operational guidance.scripts/ngrok_preview.py: Core Python logic for tunnel/session management.references/troubleshooting.md: Common fixes for ngrok auth, tunnel timeout, and stale sessions.
🤝 Compatibility
Optimized for:
- Gateway: OpenClaw
- Ecosystem: skills.sh
- Platforms: Telegram and web-based agent UIs
Safety boundaries
- Publish only task-specific outputs (never broad directories like workspace root).
- Keep TTL short and explicit.
- Treat every link as temporary access, not persistent hosting.
- Always stop/delete sessions after task completion.
Troubleshooting
If preview creation fails, follow:
references/troubleshooting.md
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。