Use this skill when the user wants to manage TunnelBox sites — add, list, or remove sites. Trigger phrases include: "add a site", "create a site", "register a site", "list sites", "show my sites", "remove a site", "delete a site", "建立 site", "新增站台", "列出 site", "刪除 site", "移除站台", "幫我建一個 site", "我的站台有哪些".
管理 TunnelBox 站台(靜態 / Proxy 模式的 add / list / remove)。全程使用中文回應(除非使用者用英文提問)。
靜態模式:
tunnelbox site add <name> <folder>
<name> — 站台名稱(不可重複)<folder> — 本地資料夾路徑(會自動轉為絕對路徑)Proxy 模式:
tunnelbox site add <name> --proxy <url>
--proxy <url> — 代理目標 URL(如 http://localhost:3000),僅接受 http: / https: 協定JSON 輸出範例(靜態模式):
{ "success": true, "data": { "id": "uuid", "name": "my-blog", "serveMode": "static", "folderPath": "/abs/path/dist" } }
JSON 輸出範例(Proxy 模式):
{ "success": true, "data": { "id": "uuid", "name": "my-api", "serveMode": "proxy", "proxyTarget": "http://localhost:3000" } }
tunnelbox site list
tunnelbox site list --json
No items found.JSON 輸出範例:
{ "success": true, "data": [ { "id": "uuid", "name": "my-blog", "serveMode": "static", "folderPath": "/abs/path" }, ... ] }
data 為空陣列 []tunnelbox site remove <nameOrId> --json
JSON 輸出範例:
{ "success": true, "data": { "id": "uuid", "name": "my-blog", "serveMode": "static", "folderPath": "/abs/path" } }
當使用者要求管理站台時,依照以下步驟:
tunnelbox site add <name> <folder> --json
或 proxy 模式:
tunnelbox site add <name> --proxy <url> --json
Folder not found — 資料夾不存在,確認路徑是否正確Folder path is required for static sites — 靜態模式未提供資料夾路徑Site name already exists — 名稱重複,建議換一個名稱Invalid proxy URL — proxy URL 格式不正確(僅接受 http/https)tunnelbox site list --json
tunnelbox site add 新增。tunnelbox site list --json 查詢,再讓使用者確認。tunnelbox site remove <nameOrId> --json
Site not found),告知使用者站台不存在,並列出現有站台供參考。所有指令加上 --json 以取得結構化輸出。錯誤格式:
{ "success": false, "error": "error message" }
遇到錯誤時,向使用者說明原因並提供可行的解決建議。