skills/zellij/SKILL.md
Zellij 終端多工管理操作指南。Use for: (1) 在 zellij pane 中啟動/停止服務, (2) 讀取其他 pane 的畫面輸出, (3) 多 pane 佈局管理, (4) 從 claude pane 遠端控制其他 pane。Use when: 需要在多個終端中同時運行前後端服務、需要讀取其他 pane 的日誌輸出、需要管理 zellij session 和 pane。
npx skillsauth add tarrragon/claude zellijInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
從 Claude Code pane 操作其他 zellij pane 的實戰經驗。
Claude Code 運行在 zellij 的一個 pane 中。所有 zellij action 指令都從 claude 的 shell 發出,但操作對象是 focused pane。
關鍵限制:write / write-chars 只能送到 focused pane。從 claude pane 執行 move-focus 後,焦點確實會切換,但必須在同一個 shell 命令鏈中完成 focus + write。
# 查看完整佈局結構(pane 數量、名稱、command)
zellij action dump-layout 2>&1 | head -20
# 查看 tab 名稱
zellij action query-tab-names
# 列出 sessions
zellij list-sessions
# 切到目標 pane → 滾動到底部 → dump 畫面 → 讀取
zellij action move-focus right && \
zellij action scroll-to-bottom && \
zellij action dump-screen /tmp/pane-output.txt && \
tail -30 /tmp/pane-output.txt
重要:dump-screen dump 的是 當前 focused pane 的畫面。必須先 move-focus 到目標 pane。
# 切到目標 pane → 送文字 → 送 Enter → 切回
zellij action move-focus right && \
zellij action write-chars "go run ." && \
zellij action write 10 && \
zellij action move-focus left
write 10 = 送 Enter(ASCII 10 = LF)write 3 = 送 Ctrl-C(ASCII 3 = ETX)&& 鏈中完成,分開的 Bash 呼叫無法保證焦點狀態這是最容易犯的錯誤:送出指令後不驗證就假設成功。
正確流程:
# Step 1: 送指令
zellij action move-focus right && \
zellij action write-chars "go run ." && \
zellij action write 10
# Step 2: 等待執行 + 讀取驗證(分開的命令)
sleep 5 && \
zellij action move-focus right && \
zellij action scroll-to-bottom && \
zellij action dump-screen /tmp/verify.txt && \
tail -15 /tmp/verify.txt
# Step 3: 切回 claude pane
zellij action move-focus left
# 在右側新增 pane
zellij action new-pane --direction right
# 重命名 pane(必須先 focus 到目標 pane)
zellij action move-focus right && \
zellij action rename-pane "後端"
# 關閉當前 focused pane
zellij action close-pane
zellij 佈局可以用 command="go" 啟動 pane,這些 pane 的 shell 被包裝在:
bash -c 'go run . 2>&1; echo "=== EXITED ==="; read'
特徵:
read 等待 Enterwrite-chars 新指令會被 read 吃掉write 10)結束 read,再送新指令如果 pane 中有前台程序在運行(如 go run .),write 3(Ctrl-C)會送到該前台程序。如果程序忽略了 signal,可以改用 kill PID 從 claude pane 直接殺。
# 從 claude pane 找到目標 PID
ps aux | grep "go run" | grep -v grep
# 直接殺程序(不需要切 pane)
kill <PID>
dump-screen 只 dump 終端可見範圍的內容。如果輸出很長,先 scroll-to-bottom 確保看到最新內容。
pane 佈局是 [claude | 前端 | 後端] 時:
move-focus right && move-focus rightmove-focus left && move-focus leftfocus-next-pane 也可以,但方向不如 move-focus 明確# 1. 啟動後端(右側第二個 pane)
zellij action move-focus right && zellij action move-focus right && \
zellij action write-chars "cd /path/to/server && go run ." && \
zellij action write 10
# 2. 等待編譯 + 驗證
sleep 10 && \
zellij action move-focus right && zellij action move-focus right && \
zellij action scroll-to-bottom && \
zellij action dump-screen /tmp/backend.txt && \
tail -10 /tmp/backend.txt
# 3. 啟動前端(右側第一個 pane)
zellij action move-focus right && \
zellij action write-chars "cd /path/to/ui && flutter run -d macos" && \
zellij action write 10
# 4. 等待 + 驗證
sleep 30 && \
zellij action move-focus right && \
zellij action scroll-to-bottom && \
zellij action dump-screen /tmp/frontend.txt && \
tail -15 /tmp/frontend.txt
# 5. 切回 claude pane
zellij action move-focus left
# 切到前端 pane → 送 R → 驗證
zellij action move-focus right && \
zellij action write-chars "R"
sleep 5 && \
zellij action move-focus right && \
zellij action scroll-to-bottom && \
zellij action dump-screen /tmp/restart.txt && \
tail -10 /tmp/restart.txt
操作其他 pane 時:
&& 鏈中?Last Updated: 2026-03-02 Version: 1.0.0
development
Use when the user wants to design, redesign, shape, critique, audit, polish, clarify, distill, harden, optimize, adapt, animate, colorize, extract, or otherwise improve a frontend interface. Covers websites, landing pages, dashboards, product UI, app shells, components, forms, settings, onboarding, and empty states. Handles UX review, visual hierarchy, information architecture, cognitive load, accessibility, performance, responsive behavior, theming, anti-patterns, typography, fonts, spacing, layout, alignment, color, motion, micro-interactions, UX copy, error states, edge cases, i18n, and reusable design systems or tokens. Also use for bland designs that need to become bolder or more delightful, loud designs that should become quieter, live browser iteration on UI elements, or ambitious visual effects that should feel technically extraordinary. Not for backend-only or non-UI tasks.
development
Claude Code release notes 框架影響評估工具。比對 last-reviewed 版本篩出新版本,逐項分類(對框架有幫助 / 需評估 / 無影響 / 不適用),對採用項引導建 ANA + WRAP + spawn 落地。Use when: 執行 /release-notes 看到新版本、定期檢查 CC 更新、評估新功能對專案框架的影響時。Triggers: release notes, release-notes, CC 更新, claude code 更新, 版本更新評估, 新功能評估, 框架影響評估。
development
Assertion design judgment framework for flaky and design-quality issues. Use when writing tests, reviewing assertions, diagnosing flaky tests, or deciding if a timing/float/cache assertion is appropriate. Do NOT use for API syntax or refactoring.
tools
Chrome Extension 實機測試與 debug 工作流,以 chrome-devtools-mcp 為核心工具。Use when: (1) 完成功能後實機驗證 / manual test / 試看看 / 跑看看 / verify feature, (2) extension debug / popup 不作動 / content script 不注入 / service worker 報錯 / background 出問題, (3) 安裝 unpacked extension / load unpacked / 載入未封裝, (4) 看 console / 看 network / 看 log / view console / inspect requests, (5) 功能更新後重新載入 extension / rebuild reload / reload extension。涵蓋 Manifest V3 service worker / content script / popup / options page 的 chrome-devtools-mcp 工具呼叫流程。不取代 Puppeteer / Playwright 自動化 E2E(CI 用),定位為開發期手動驗證與 LLM-assisted debug。