natea/move-coach/tree/main/plugins/move-coach
move-coach
一個 Claude Code 外掛,加入攝影機面板:顯示畫上綠色 MediaPipe 姿勢標記的網路攝影機畫面、旁邊對應的 *Built to Move* 插圖,以及你進行測試時的語音指導。
關於這個 mod
Move Coach
一個 Claude Code 外掛,加入攝影機面板:顯示畫上綠色 MediaPipe 姿勢標記的網路攝影機畫面、旁邊對應的 Built to Move 插圖,以及你進行測試時的語音指導。
/move-coach [test] [camera#]開啟面板。不指定測試時只顯示一般攝影機預覽。/move-coach stop結束執行。- 工具
mcp__move-coach__camera_test讓 Claude 執行測試。built-to-move-mobility-test技能會使用它。 - 測試:
sit_and_rise、couch、airport_scanner、shoulder_rotation、squat、solec、old_man。
組成部分
helper/pose_coach.py:一個 uv 指令碼(mediapipe 0.10.14、opencv)。它擷取攝影機畫面,執行 Pose Landmarker(模型快取於~/.cache/move-coach),並為每項測試執行一個狀態機。它播報提示,並把 JSON 行串流給外掛。hooks/register.tsx:面板、斜線指令和工具。Ghostty 把攝影機畫面繪製為 PNGImage;Desktop 應用程式則繪製成嵌入 JPEG 畫格、上面疊加向量骨架的Svg。assets/book/:可選插圖。書中的插圖受著作權保護,不會隨附;請把自己的插圖放到~/.config/move-coach/book/(見assets/book/README.md)。沒有插圖時面板也能運作。
語音
預設情況下,教練使用 macOS 內建語音(say)播報,不需要設定。
如果想要更自然的聲音,可以在外掛設定中加入 ElevenLabs API 金鑰(/config → move-coach → "ElevenLabs API key",儲存在安全儲存區),也可以選擇性設定 voice ID。金鑰會透過私有檔案傳給 helper,讀取後刪除,從不出現在命令列上。也可以使用含有 ELEVENLABS_API_KEY=... 的 ~/.config/move-coach/keys.env。如果 ElevenLabs 無法播報某條提示,該提示會退回 say。音訊片段快取於 ~/.cache/move-coach/tts。
需求
需要有攝影機的 macOS、uv(helper 是 uv 指令碼,第一次執行時會安裝自己的 Python 套件),以及 Xcode 命令列工具(xcode-select --install,只需使用一次來建置小型 "Move Coach Camera" 應用程式)。可選:ffmpeg(攝影機名稱)、Muse 頭帶和 liblsl(brew install labstreaminglayer/tap/lsl)以取得 EEG。
攝影機權限
Claude 應用程式會以不負責攝影機存取權的狀態啟動工作階段,因此直接從外掛產生的 helper 永遠無法取得攝影機權限(macOS 也無法提示授權)。所以 helper/launch.sh 會建置一個小型 Move Coach Camera.app(位於 ~/Library/Application Support/move-coach/,來源是 helper/camera-app/),透過 open 在其中執行 helper,並透過 FIFO 轉送標準輸出。第一次執行時,macOS 會顯示 "Move Coach Camera" 的攝影機權限提示;授權會在 Claude 更新後繼續保留。要撤銷權限,請到系統設定 → 隱私權與安全性 → 攝影機。
可選:使用 Muse 頭帶讀取腦波
/move-coach eeg(或面板中的 Connect Muse EEG 按鈕,或工具的 eeg_start 動作)會執行 helper/eeg_stream.py,透過 muse-lsl 讀取 Muse。它會連接已經執行中的 LSL EEG 串流(muselsl stream);如果沒有,就掃描藍牙尋找 Muse,並自行啟動 muselsl stream。/move-coach eeg Muse-1A2B 按名稱選擇頭帶;/move-coach eeg stop 結束執行。
面板會繪製每個頻道最近 4 s 的資料(TP9、AF7、AF8、TP10)、每個感測器一個接觸點,以及最近 1 s 的相對頻帶功率。測試進行時,結果還會帶有測試期間的平均頻帶功率(eeg_mean_relative_band_power)。
和攝影機一樣,helper 會在 "Move Coach Camera.app" 內執行,因此 macOS 會詢問一次是否允許藍牙。pylsl 需要 liblsl;如果 wheel 沒有內含它,請執行 brew install labstreaminglayer/tap/lsl。
安裝
請先查看作者 README,確認 marketplace 與外掛名稱;指令可能隨儲存庫結構而變動。
claude plugin marketplace add natea/move-coach claude plugin install move-coach
原文 / README
Move Coach
A Claude Code mod that adds a camera pane: your webcam feed with MediaPipe pose landmarks drawn in green, the matching Built to Move illustration beside it, and spoken coaching while you do the test.
/move-coach [test] [camera#]opens the pane. With no test it's a plain camera preview./move-coach stopends a run.- Tool
mcp__move-coach__camera_testlets Claude run a test. Thebuilt-to-move-mobility-testskill uses it. - Tests:
sit_and_rise,couch,airport_scanner,shoulder_rotation,squat,solec,old_man.
Pieces
helper/pose_coach.py: a uv script (mediapipe 0.10.14, opencv). It captures the camera, runs the Pose Landmarker (model cached in~/.cache/move-coach), and runs one state machine per test. It speaks cues and streams JSON lines to the mod.hooks/register.tsx: the pane, the slash command and the tool. Ghostty draws the camera as a PNGImage; the Desktop app draws it as anSvgthat embeds the JPEG frame with a vector skeleton on top.assets/book/: illustrations, optional. The book's illustrations are copyrighted and aren't shipped; put your own in~/.config/move-coach/book/(seeassets/book/README.md). The pane works without them.
Voice
By default the coach speaks with the built-in macOS voice (say); nothing to set up.
For a more natural voice, add an ElevenLabs API key in the plugin's settings (/config → move-coach →
"ElevenLabs API key", stored in secure storage), and optionally a voice ID. The key reaches the helper
in a private file it deletes on read, never on the command line. ~/.config/move-coach/keys.env with
ELEVENLABS_API_KEY=... also works. If ElevenLabs fails for a cue, that cue falls back to say.
Audio clips are cached in ~/.cache/move-coach/tts.
Requirements
macOS with a camera, uv (the helpers are uv scripts that install their own
Python packages on first run), and the Xcode command-line tools (xcode-select --install, used once to
build the small "Move Coach Camera" app). Optional: ffmpeg (camera names), a Muse headband and liblsl
(brew install labstreaminglayer/tap/lsl) for EEG.
Camera permission
The Claude app starts its sessions with camera responsibility disclaimed, so a helper spawned straight from the mod can never get camera access (and macOS can't prompt for it). helper/launch.sh therefore builds a tiny Move Coach Camera.app (in ~/Library/Application Support/move-coach/, from helper/camera-app/) and runs the helper inside it with open, relaying its stdout through a FIFO. The first run shows the macOS camera prompt for "Move Coach Camera"; the grant then sticks across Claude updates. Revoke it in System Settings → Privacy & Security → Camera.
Optional: brain waves from a Muse headband
/move-coach eeg (or the pane's Connect Muse EEG button, or the tool's eeg_start action) runs
helper/eeg_stream.py, which reads a Muse through muse-lsl.
It attaches to an LSL EEG stream if one is already running (muselsl stream), and otherwise scans
Bluetooth for a Muse and starts muselsl stream itself. /move-coach eeg Muse-1A2B picks a headband
by name; /move-coach eeg stop ends it.
The pane draws the last 4 s of each channel (TP9, AF7, AF8, TP10), a contact dot per sensor, and
relative band power over the last second. While a test runs, its result also carries the mean band
power during the test (eeg_mean_relative_band_power).
The helper runs inside "Move Coach Camera.app", like the camera, so macOS asks once to allow Bluetooth.
pylsl needs liblsl: if the wheel doesn't bundle it, brew install labstreaminglayer/tap/lsl.