ClaudeMods
☰
KO
● 0 명 접속 중 · 조회 0 회
후원프로젝트 제출
GitHub 저장소 · 작성자 slima4

spank

spank는 Apple Silicon MacBook의 가속도계로 두드림을 감지하고, 캐릭터 표정을 표시하며 일본어 음성을 재생하고 점수를 기록하는 Claude Code 플러그인입니다. 원하면 Claude가 두드림을 감지하게 하거나 턴을 중단할 수도 있습니다.

번역 완료

이 mod 소개

spank-claude

MacBook에는 가속도계가 있습니다. Claude Code에는 플러그인이 있습니다. 당신에게는 감정이 있습니다. 이제 마침내 만날 수 있습니다.

MacBook(또는 MacBook이 놓인 책상)을 두드리면 Claude Code가 이를 감지합니다. 프롬프트 위에 얼굴이 나타나고, 노트북은 일본어로 비명을 지르며, 작은 카운터가 오늘 하루가 어땠는지 점수를 기록합니다. 원하면 Claude 자체에도 메시지를 전달할 수 있고, 충분히 세게 두드리면 턴 도중 멈춥니다.

통증 단계

| 단계 | 타격(0.05 g에서) | Sakura의 말 | Natsu의 말 | Aki의 말 | 일어났을 법한 일 | | ----- | --------------- | ----------- | ----------- | ----------- | ---------------------------------- | | 1 | 0.050–0.106 g | んっ! | えっ! | ひゃっ! | 살짝 두드렸습니다. 기껏해야 수동 공격적입니다. | | 2 | 0.106–0.224 g | あっ! | うっ! | あれっ! | 테스트가 또 실패했습니다. | | 3 | 0.224–0.473 g | いたっ! | いてっ! | いたぁ! | Claude가 코드를 "간소화"했습니다. | | 4 | 0.473–1 g | きゃっ! | やっ! | いやっ! | Claude가 테스트를 통과시키려고 테스트를 삭제했습니다. | | 5 | 1 g 이상 | あぁっ…! | うわぁっ! | きゃあっ! | 프로덕션입니다. |

이 g 범위는 기본 감도 0.05 g 기준입니다. 범위는 설정한 감도에 맞춰 움직입니다(/slaps calibrate 또는 /config의 "Slap sensitivity"). 1단계는 설정한 감도에서 시작하고, 5단계는 1 g이며, 그 사이 단계는 균등하게 나뉩니다.

콤보

1초 이내 간격으로 계속 두드리면 아무리 약해도 모든 타격이 집계됩니다. 각각은 이전 타격보다 1단계 높아지거나, 더 세게 맞았다면 그 타격 자체의 단계가 되며, 멈출 때까지 단계가 내려가지 않습니다. 약하게 5번 두드리면 그녀가 비명을 지릅니다. 더 세게 두드리면 그 타격의 비명과 함께 그녀를 멈춥니다.

필요한 것

  • 모션 센서가 있는 Apple Silicon MacBook: M1 Pro / Max 이상.
  • macOS 27(이전 릴리스에서는 root가 필요할 수 있습니다).
  • Xcode Command Line Tools(xcode-select --install).
  • 플러그인 function hooks가 있는 Claude Code(2.1.288에서 빌드 및 테스트됨).

설치

claude plugin marketplace add slima4/spank-claude
claude plugin install spank@spank-claude

명령

| 명령 | 기능 | | -------------------- | ----------------------------------------------------------- | | /slaps | 현재 세션, 전체 기간, 마지막 타격의 점수를 표시합니다. | | /slaps who | 얼굴 시리즈를 나열하고 현재 시리즈를 표시합니다. | | /slaps who natsu | 지금 Natsu가 맞습니다(어떤 시리즈 이름도 사용할 수 있습니다). | | /slaps calibrate | 6 s를 입력하고(Enter는 누르지 않음) 3번 두드려 감도를 정합니다. | | /slaps mute | 그녀를 음소거합니다. 얼굴들은 여전히 당신을 심판합니다. | | /slaps unmute | 그녀가 돌아옵니다. | | /slaps claude on | 타격이 Claude에 전달됩니다. 4단계 이상 타격이나 콤보가 턴을 중지합니다. | | /slaps claude off | Claude는 평온하게 모릅니다(기본값). | | /slaps image | 터미널이 실제 이미지를 표시할 수 있는지 확인합니다. |

Claude 모드

/slaps claude on을 사용하면 모든 타격이 대화 속 조용한 메모리가 되고, Claude가 작업 중일 때 4단계 이상으로 두드리면 그 자리에서 턴이 중지됩니다.

얼굴 시리즈

각 얼굴 시리즈는 하나의 캐릭터입니다. 단계마다 얼굴 5개와 목소리 1개가 있습니다. /slaps who <series> 또는 /config의 "Face series"에서 전환합니다.

| 시리즈 | 음성 | | -------- | -------- | | sakura | sakura | | natsu | natsu | | aki | aki |

설정

Claude Code에서 /config를 엽니다.

| 설정 | 기본값 | 기능 | | ----------------------- | ------- | --------------------------------------------------------- | | 타격 감도(g) | 0.05 | 집계되는 가장 작은 흔들림이며 1단계가 시작되는 지점입니다. | | Claude를 중지하는 단계 | 4 | /slaps claude on에서 이 단계 이상이면 턴을 중지합니다. | | 얼굴 시리즈 | sakura | 나타날 얼굴과 비명 소리를 정합니다. | | 얼굴 크기 | large | large(24행), medium(16), small(12) 또는 off. | | 음성 볼륨 | 1 | 0은 무음이며 최대 4로, 오픈 플랜 사무실에 맞습니다. |

작동 방식

 MacBook IMU (AppleSPUHIDDevice, ~1 kHz)
      │  IOKit HID reports
      ▼
 slapd (Swift) ── 중력을 제거하고 피크를 찾습니다
      ▼
 spank plugin (Claude Code hooks) ── 1–5로 평가합니다
      ├─ 상태 표시줄 + toast
      ├─ 프롬프트 위의 얼굴
      ├─ 단계별 음성 클립
      └─ 선택 사항: Claude에 메모 전달 / 턴 중지

라이선스

MIT. 책임감 있게 두드리세요.

설치

먼저 작성자의 README에서 marketplace와 플러그인 이름을 확인하세요. 저장소 구조에 따라 명령어가 달라질 수 있습니다.

claude plugin marketplace add slima4/spank-claude
claude plugin install spank
원문 / README

spank-claude

Your MacBook has an accelerometer. Claude Code has plugins. You have feelings. Now they can finally meet.

Slap your MacBook (or the desk it sits on) and Claude Code feels it: a face pops up above the prompt, the laptop yelps back in Japanese, and a little counter keeps score of how your day is going. Optionally, Claude itself gets the message — and a hard enough slap stops it mid-turn.

<p> <img src="plugin/assets/faces/sakura/level_1.png" width="96" alt="Sakura, level 1"> <img src="plugin/assets/faces/sakura/level_2.png" width="96" alt="Sakura, level 2"> <img src="plugin/assets/faces/sakura/level_3.png" width="96" alt="Sakura, level 3"> <img src="plugin/assets/faces/sakura/level_4.png" width="96" alt="Sakura, level 4"> <img src="plugin/assets/faces/sakura/level_5.png" width="96" alt="Sakura, level 5"> <br> <img src="plugin/assets/faces/natsu/level_1.png" width="96" alt="Natsu, level 1"> <img src="plugin/assets/faces/natsu/level_2.png" width="96" alt="Natsu, level 2"> <img src="plugin/assets/faces/natsu/level_3.png" width="96" alt="Natsu, level 3"> <img src="plugin/assets/faces/natsu/level_4.png" width="96" alt="Natsu, level 4"> <img src="plugin/assets/faces/natsu/level_5.png" width="96" alt="Natsu, level 5"> <br> <img src="plugin/assets/faces/aki/level_1.png" width="96" alt="Aki, level 1"> <img src="plugin/assets/faces/aki/level_2.png" width="96" alt="Aki, level 2"> <img src="plugin/assets/faces/aki/level_3.png" width="96" alt="Aki, level 3"> <img src="plugin/assets/faces/aki/level_4.png" width="96" alt="Aki, level 4"> <img src="plugin/assets/faces/aki/level_5.png" width="96" alt="Aki, level 5"> </p>

The pain scale

| Level | Hit (at 0.05 g) | Sakura says | Natsu says | Aki says | What probably happened | | ----- | --------------- | ----------- | ----------- | ----------- | ---------------------------------- | | 1 | 0.050–0.106 g | んっ! | えっ! | ひゃっ! | A tap. Passive-aggressive at most. | | 2 | 0.106–0.224 g | あっ! | うっ! | あれっ! | The tests failed again. | | 3 | 0.224–0.473 g | いたっ! | いてっ! | いたぁ! | Claude "simplified" your code. | | 4 | 0.473–1 g | きゃっ! | やっ! | いやっ! | Claude deleted the tests to make them pass. | | 5 | 1 g and up | あぁっ…! | うわぁっ! | きゃあっ! | Production. |

The g ranges are for the default sensitivity, 0.05 g. The scale moves with yours (/slaps calibrate, or "Slap sensitivity" in /config): level 1 starts at your sensitivity, level 5 at 1 g, and the levels between are spread evenly. At 0.15 g, for example, they start at about 0.15, 0.24, 0.39, 0.62 and 1 g.

Two exceptions. Below 0.05 g the scale stays as it is at 0.05 g: softer taps count, as level 1, but a moderate slap doesn't turn into a level 4. Above 0.25 g, level 5 starts at 4 times your sensitivity instead of 1 g, so the levels don't bunch up.

Combos

Keep slapping, less than a second apart, and every tap counts, however soft: each is one level above the one before, or its own level if it hit harder, and the level never drops until you pause. Five soft taps make her scream. A harder slap cuts her off with its own yelp; one at the same level does too, but stays quiet if her last yelp is under 0.4 s old, so drumming doesn't stutter. The face says how many came in a row, and a combo puts up one toast as it starts and one as it ends, saying how far it got. The score (/slaps, the status line) still keeps what the sensor read.

Taps can come as fast as about 7 a second. A hard slap leaves the laptop ringing, so the next tap counts once that has died down, usually within a fraction of a second.

What you need

  • An Apple Silicon MacBook with the motion sensor: M1 Pro / Max or newer. The plain 2020 M1 13" reportedly has no readable sensor. A Mac mini will feel nothing, no matter how hard you hit it. Please don't test this.
  • macOS 27. It reads the sensor without sudo there; older releases may want root (untested).
  • Xcode Command Line Tools (xcode-select --install). The plugin builds its little sensor reader from Swift source on first run, so nothing precompiled ships in the repo.
  • Claude Code with plugin function hooks (built and tested on 2.1.288; that API is early access and may move).

Install

Two commands, no cloning:

claude plugin marketplace add slima4/spank-claude
claude plugin install spank@spank-claude

(or the same from inside Claude Code: /plugin marketplace add slima4/spank-claude, then /plugin install spank@spank-claude.)

Start Claude Code. The first session builds the sensor reader (the status line says spank: building the sensor reader, about 20 seconds), then shows spank: armed (0.05g). Go on. Slap it.

Updates: claude plugin update spank@spank-claude, then restart Claude Code. Each new version builds its sensor reader again on its first start. Uninstall: claude plugin uninstall spank@spank-claude.

Commands

| Command | Does | | -------------------- | ----------------------------------------------------------- | | /slaps | Your score: this session, all time, and the last hit. | | /slaps who | Lists the face series; the current one is marked. | | /slaps who natsu | Natsu gets slapped now (any series name works). | | /slaps calibrate | Type 6 s (no Enter), knock 3 times; it picks the sensitivity. | | /slaps mute | Silences her. The faces still judge you. | | /slaps unmute | She's back. | | /slaps claude on | Slaps reach Claude; a level 4+ slap or combo stops its turn. | | /slaps claude off | Claude stays blissfully unaware (the default). | | /slaps image | Checks whether your terminal can show real pictures. |

Claude mode

With /slaps claude on, every slap becomes a quiet note in the conversation: "The user just physically slapped their laptop 2 times (accelerometer; strongest hit level 3 of 5, 0.31g). Take it as nonverbal frustration…" Claude reads it on its next step, acknowledges it, and reconsiders what it was doing. Slaps that keep coming are told as one note once you pause, or 4 seconds after the first, whichever comes sooner. Slaps while it's idle are saved up and delivered as one note with your next message, so it gets the whole story at once.

A level 4+ slap while Claude is working stops the turn on the spot (the level is a setting). So does a combo that builds up to it and lasts at least half a second (so one slap that bounces doesn't), unless one of its slaps was a level 1 graze (so the steady shaking of a bumpy train doesn't). Fair warning: a shell command Claude already started keeps running in the background; the slap stops Claude, not the command.

Several sessions

Only the Claude Code session you used last reacts to a slap (the one you last typed a prompt or a /slaps command in). One laptop, one victim.

Face series

Each face series is one character: five faces, one per level, and a voice. Switch with /slaps who <series> (/slaps who lists them), or under "Face series" in /config.

| Series | Voice | Face | | -------- | -------- | ------------------------------------------------------------- | | sakura | sakura | <img src="plugin/assets/faces/sakura/level_1.png" width="48" alt="Sakura"> | | natsu | natsu | <img src="plugin/assets/faces/natsu/level_1.png" width="48" alt="Natsu"> | | aki | aki | <img src="plugin/assets/faces/aki/level_1.png" width="48" alt="Aki"> |

Faces and terminals

Faces are drawn as colored half-block characters, so they show up in any truecolor terminal (Warp, iTerm2, Ghostty, …), pixel-art style, in the biggest size that fits above your prompt.

Real, full-resolution pictures need a terminal with kitty graphics Unicode placeholders, which today means Ghostty or kitty. Run /slaps image to see what yours can do. Warp and Terminal.app currently can't (not our fault, we checked).

Settings

Open /config in Claude Code (or /plugin configure spank@spank-claude):

| Setting | Default | What it does | | ----------------------- | ------- | --------------------------------------------------------- | | Slap sensitivity (g) | 0.05 | Smallest shake that counts, and where level 1 starts. Typing counts? Raise it. | | Level that stops Claude | 4 | With /slaps claude on, this level or harder stops a turn. | | Face series | sakura | sakura, natsu or aki: whose face pops up and voice yelps. | | Face size | large | large (24 rows), medium (16), small (12), or off. | | Voice volume | 1 | 0 is silent, up to 4 for open-plan offices. |

Changes apply right away. Not sure what sensitivity to pick? Run /slaps calibrate: type anything for 6 seconds (don't press Enter, or Claude gets it), then knock on the desk 3 times, and it sets the sensitivity between the two for you. The 6 seconds start at your first key and the knocking at your first knock, so take your time reading; it waits up to 30 seconds for each. The status line then shows it, e.g. spank: armed (0.077g).

How it works

 MacBook IMU (AppleSPUHIDDevice, ~1 kHz)
      │  IOKit HID reports, x/y/z in 1/65536 g
      ▼
 slapd (Swift) ── removes gravity, finds the peak
      │  {"type":"slap","ts":…,"peak":0.42} on stdout
      ▼
 spank plugin (Claude Code hooks) ── grades it 1–5 for your sensitivity
      ├─ status line + toast
      ├─ face above the prompt (Raster cells, 3 s)
      ├─ voice clip per level
      └─ optional: note to Claude / stop its turn

Development

Run straight from a clone (uninstall the marketplace copy first, or you get two of her):

git clone https://github.com/slima4/spank-claude && cd spank-claude
claude --plugin-dir "$PWD/plugin"

make slapd                         # build the sensor reader by hand
make raw                           # watch the live shake
make faces                         # rebuild face cells from assets/faces/<series>/*.png
claude plugin validate .           # the marketplace and the plugin
claude plugin test plugin          # the tests

Installed copies are kept per version, so bump version in plugin/.claude-plugin/plugin.json when you ship a change.

To add a face series, say hana:

  1. Put its faces in assets/faces/hana/level_<1-5>.png (square, on white).
  2. Add "hana" to the face_series options in plugin/.claude-plugin/plugin.json.
  3. Run make faces. It draws the cells into plugin/hooks/faces.ts, writes the 256px pictures to plugin/assets/faces/hana/, and warns if step 2 is missing.
  4. In plugin/hooks/series.ts, add hana to SERIES. It can borrow an existing voice (voice: 'sakura'), or get its own: clips in plugin/assets/voices/hana/level_<1-5>.mp3 and their captions in VOICES.

License

MIT. Slap responsibly.

Safety notes

비슷한 프로젝트