ClaudeMods
☰
ZH-CN
● 0 人在线 · 浏览 0 次
赞助提交作品
GitHub 仓库 · 发布者 natea

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 把摄影机画面绘制为 PNG Image;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 stop ends a run.
  • Tool mcp__move-coach__camera_test lets Claude run a test. The built-to-move-mobility-test skill 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 PNG Image; the Desktop app draws it as an Svg that 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/ (see assets/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.

更多类似作品