← 返回 Skills 市场
ctz168

Live Preview

作者 SamAI.cc · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
19
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install live-preview
功能描述
Share a live preview of a website under development via aitun tunnel, with hot-reload support so users see changes in real time as you edit. Perfect for AI a...
使用说明 (SKILL.md)

Live Preview - Share Real-Time Website Preview via Aitun Tunnel

When to Use

Use this skill when:

  • You are iteratively building or modifying a website and want the user to see live changes
  • You need user feedback on a design while you continue editing
  • You are prototyping a UI and want to share each iteration instantly
  • You are debugging a web application and need the user to confirm fixes in real time
  • You want to demo a development workflow where changes appear live

Do NOT use this skill when:

  • The website is already deployed to a public server
  • You only need a one-time share (use aitun-tunnel instead)
  • The content is a static file that does not change (use sendfile instead)

Instructions

Step 1: Install aitun

pip install aitun

Or verify it is already installed:

which aitun || pip show aitun

Step 2: Start the development server

Start the local dev server with hot-reload enabled. The command depends on your framework:

# For a static HTML directory (use a live-reload tool)
pip install livereload
python3 -c "
from livereload import Server, shell
server = Server()
server.watch('/path/to/html/dir')
server.serve(root='/path/to/html/dir', port=8080)
" &
DEV_PID=$!
sleep 2

# For Next.js
npm run dev -- -p 8080 &

# For Vite
npx vite --port 8080 --host &

# For Flask
flask run --port 8080 --host 0.0.0.0 &

# For any HTTP server (no auto-reload)
python3 -m http.server 8080 --directory /path/to/html/dir &

Step 3: Create a tunnel

Expose the dev server to the internet:

aitun -p 8080 &
AITUN_PID=$!
sleep 3

The output will contain the public URL, e.g.:

  • https://aitun.cc/abc123

Step 4: Share the preview link with the user

Your live preview is ready: https://aitun.cc/abc123

I'm still working on it — just refresh the page to see my latest changes.
This preview link will remain active while I'm editing.

Step 5: Iterate and update

Continue editing files in your project directory. As you save changes:

  • If using a hot-reload dev server: the user's browser will auto-refresh
  • If using a basic HTTP server: tell the user to refresh the page manually

After each significant change, notify the user:

I've updated the navigation bar — refresh the page to see it.

Step 6: Clean up

When the preview session is complete, stop the servers:

kill $AITUN_PID 2>/dev/null
kill $DEV_PID 2>/dev/null

CLI Reference

The aitun command (installed via pip install aitun) accepts these flags:

Flag Description
-p PORT Local service port (default: 8080)
-k TOKEN Auth token for registered subdomain (omit for free tunnel)
--host HOST Local service address (default: localhost)
--tcp-ports PORTS TCP forwarding ports, comma-separated (e.g., 22,3306; requires -k)
--p2p Enable P2P direct connection (default: enabled)
--no-p2p Disable P2P, force server relay mode
--daemon Run as background daemon
--stop Stop running daemon

Notes

  • Free tunnels use proxy address mode (path-based URL like aitun.cc/abc123), NOT subdomains
  • Free tunnels expire after 24 hours, auto-renewed on restart
  • For a permanent preview subdomain, register at https://aitun.cc
  • Hot-reload works best with frameworks that support it natively (Vite, Next.js, etc.)
  • For static files, use Python's livereload package to enable auto-refresh
  • The tunnel stays active as long as the aitun process is running — no need to restart the tunnel when files change
  • All traffic is encrypted end-to-end
安全使用建议
Install only if you are comfortable making a local development server reachable through a public preview link. Before using it, serve only the intended app or directory, remove secrets from client bundles, avoid debug/admin routes and private test data, and stop the tunnel when the preview session ends.
能力评估
Purpose & Capability
The stated purpose is live sharing of a website under development, and the artifact consistently describes starting a local dev server, opening an aitun tunnel, and sharing the resulting preview URL.
Instruction Scope
The instructions disclose that the dev server is exposed to the internet, but they do not include an explicit pre-share privacy/authentication warning or confirmation step before creating the tunnel.
Install Mechanism
Installation is limited to the declared aitun package via uv metadata and pip examples in the skill text; no hidden scripts or additional artifact files were present.
Credentials
Network exposure, dev-server commands, and optional framework-specific server binding are proportionate to live preview sharing, though users should avoid serving projects with secrets, debug/admin routes, or private data.
Persistence & Privilege
The tunnel and dev server run as user-started background processes and the skill documents cleanup with kill commands; no hidden persistence, credential harvesting, or privileged system changes were found.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install live-preview
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /live-preview 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release - share real-time website preview via aitun tunnel
元数据
Slug live-preview
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Live Preview 是什么?

Share a live preview of a website under development via aitun tunnel, with hot-reload support so users see changes in real time as you edit. Perfect for AI a... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 19 次。

如何安装 Live Preview?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install live-preview」即可一键安装,无需额外配置。

Live Preview 是免费的吗?

是的,Live Preview 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Live Preview 支持哪些平台?

Live Preview 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Live Preview?

由 SamAI.cc(@ctz168)开发并维护,当前版本 v1.0.0。

💬 留言讨论