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

mirror-pane

UI를 편집하는 동일한 단계에서 시각적 피드백을 제공하는 Claude Code mod입니다.

번역 완료

이 mod 소개

Claude가 UI 파일을 편집하면 Mirror Pane은 편집 직전에 iOS simulator 또는 Android emulator의 스크린샷을 찍습니다. hot reload를 기다린 뒤 두 번째 스크린샷을 찍고 패널에서 나란히 보여 줍니다. ImageMagick이 설치되어 있으면 작은 색상 허용 오차를 넘어서 바뀐 픽셀의 비율도 보고합니다. Claude에는 그 수치와 시계, spinner 또는 느린 reload가 영향을 줄 수 있다는 주의가 한 줄로 전달되므로 시각적 확인이 수행되었음을 알 수 있습니다. 이 메모에는 이미지 자체가 들어가지 않습니다.

설치

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

claude plugin marketplace add ccdwyer/mirror-pane
claude plugin install mirror-pane
원문 / README

Mirror Pane

A Claude Code mod that gives you visual feedback on the same step as a UI edit.

When Claude edits a UI file, Mirror Pane screenshots your iOS simulator or Android emulator just before the edit. It waits for hot reload, takes a second screenshot, and shows the two side by side in a pane. If ImageMagick is installed, it also reports what share of pixels changed (beyond a small colour tolerance). Claude gets a one-line note with that number and a caveat that clocks, spinners or a slow reload can affect it, so it knows a visual check happened. The note never includes the image itself.

  • Which edits: .tsx, .jsx, .swift, .dart, .css/.scss/.less, .vue, .svelte, storyboards/xibs, Android layout, drawable and colour/theme XML, Compose .kt under ui/, screens/ or components/, and .ts/.js under components/, screens/, app/, ui/, views/ or pages/ inside the project. Tests, stories, Package.swift and app/api/ routes are skipped. Add more in the plugin settings (extraPatterns).
  • Which device: the one you pick with /mirror device <udid|serial>, or else the only booted simulator or emulator-*. A physical Android phone is only ever used when you pick it, since its screen can show notifications. If several are running, it never guesses; it tells you once to pick.
  • Busy or silent devices: one capture runs per device at a time, across all your Claude Code sessions. An edit that would have to wait more than a few seconds just goes through without screenshots. A device that stops answering is paused for 5 minutes, with one hint.
  • Baselines: /mirror baseline pins the current screen as known-good for that file. Later edits also report drift against it.
  • History: the pane keeps the last 10 before/after pairs (configurable), with prev/next buttons.

Commands

/mirror                     open the pane
/mirror on | off            turn captures on or off
/mirror device <id|auto>    choose the simulator (UDID) or Android device (adb serial)
/mirror baseline            pin the current screen as the baseline for its file

Requirements

  • Images in the pane need a terminal with the kitty graphics protocol (kitty, Ghostty). Elsewhere the pane shows the screenshot paths as text, and the band and the note to Claude still work.
  • iOS: Xcode's xcrun simctl. Android: adb.
  • Changed-pixel percentage: ImageMagick (brew install imagemagick). Without it, captures still happen and the percentage is left out.

Settings (/plugin configure mirror-pane@ccdwyer-mods): delayMs (hot-reload wait, default 2000, at most 5000), noteToModel, extraPatterns, historySize.

Install

/plugin marketplace add ccdwyer/claude-mods
/plugin install mirror-pane@ccdwyer-mods
/reload-plugins

Develop

claude plugin validate .
claude plugin test .

What it hooks

Events this mod hooks, as claude plugin validate reads the module:

  • session.start
  • command.run{command=mirror}
  • tool.call
  • ui.render{component=Pane, requestId=mirror-pane}
  • ui.render{component=AbovePrompt}

A tool.call hook sits in the middle of every tool call: it can see the call, refuse it, or add context to its result. This mod never refuses anything; it only adds the one-line note to UI edits.

Privacy

It runs entirely on your machine and sends nothing over the network. Screenshots stay in ~/.cache/mirror-pane/ (readable only by you, and screenshots older than 7 days are deleted the next time Mirror Pane runs, except pinned baselines), and only a one-line note reaches Claude.

Full policy: PRIVACY.md.

License

MIT

비슷한 프로젝트