Claude Code Hook

Your face is the
code review

A Claude Code hook that captures your webcam after every response and adjusts its behavior based on your facial expression. If you look frustrated, it asks what went wrong. If you look happy, it keeps going.

Copied! $ npm install -g claude-vibe-check && claude-vibe-check setup

Four steps, fully automatic

Once installed, claude-vibe-check runs silently in the background. No extra commands, no config files to edit, no interruptions to your workflow.

Step 01
🤖

Claude responds

Claude Code finishes a response. The "Stop" hook fires automatically, triggering claude-vibe-check.

Step 02
📷

Webcam captures

A single frame is captured from your webcam using fswebcam, imagesnap, or ffmpeg, depending on your OS.

Step 03
🧠

Emotion analysis

Your photo is analyzed either by Claude's vision model (online mode) or a local CV model like FER or HSEmotion (offline mode).

Step 04
💬

Claude reacts

Based on the detected emotion, Claude adjusts its next message. Frustrated? It offers to fix things. Happy? It keeps rolling.


Online or offline, your choice

Choose between sending the photo to Claude for rich visual analysis or keeping everything local with a lightweight CV model.

Default

Online Mode

Sends the captured photo directly to Claude's vision model. Claude sees your full expression, posture, and environment, giving it the richest possible context for its reaction.

  • Rich visual analysis through Claude vision
  • No extra dependencies needed beyond the webcam tool
  • Reads body language, not just facial features
  • Photo is sent as part of the hook context
Private

Offline Mode

Runs a local facial emotion recognition model on your machine. Your photo never leaves your computer. Supports two backends: FER (simple, Keras-based) and HSEmotion (faster, better accuracy, ONNX-based).

  • 100% private, photos stay on your machine
  • FER backend: ~200ms per analysis
  • HSEmotion backend: ~100ms per analysis
  • Photo is deleted immediately after analysis

What happens when you react

Each detected emotion triggers a different behavior in Claude's next response, making the interaction feel more natural and responsive.

😠
Frustrated / Angry

Claude asks what went wrong and offers to fix or redo the changes. It becomes empathetic and constructive, focusing on understanding the issue.

😕
Confused / Uncertain

Claude explains its reasoning more clearly and asks if you want a different approach. It walks through the logic step by step.

😊
Happy / Satisfied

Claude notes the positive vibe and continues working normally. No interruption, just a brief acknowledgment that things look good.

🤨
Skeptical / Displeased

Claude explains its reasoning and asks directly what you dislike about the approach, offering concrete alternatives.

😮
Surprised

Claude explains what it did and why, since the output might not have been what you expected. It checks if you want to continue in this direction.

😐
Neutral / Calm

Claude continues normally with no special reaction. A neutral expression means things are fine and no adjustment is needed.


Track your mood over time

Every offline vibe check is logged automatically. Run stats to see how your emotions shift across projects, time of day, and days of the week.

📊

Emotion breakdown

See the distribution of all detected emotions with visual bar charts and percentages.

📁

Per-project vibes

Find out which projects make you happy and which ones make you frustrated. Each project is tracked separately.

🕓

Time-of-day patterns

Discover when you code best. Morning person or night owl, the data will tell you.

📈

Daily trends

Track how your mood shifts day to day with a rolling seven-day view of your dominant emotions.

claude-vibe-check stats
$ claude-vibe-check stats week
 
Vibe Stats (last 7 days) — 34 checks
 
Emotions:
😊 happy ████████████████████ 14 (41%)
😐 neutral ██████████████░░░░░░ 9 (26%)
😡 angry ████████░░░░░░░░░░░░ 5 (15%)
😲 surprised █████░░░░░░░░░░░░░░░ 3 (9%)
😔 sad ████░░░░░░░░░░░░░░░░ 3 (9%)
 
By project:
my-app 18 checks, mostly 😊 happy (56%)
legacy-api 10 checks, mostly 😡 angry (40%)
docs 6 checks, mostly 😐 neutral (67%)
 
By time of day:
🌅 morning 12 checks, mostly 😊 happy
☀️ afternoon 14 checks, mostly 😐 neutral
🌇 evening 8 checks, mostly 😡 angry
 
Overall vibe: 😎 good (score: 0.84)

A typical session

Here is what the setup and test flow looks like in your terminal.

~/.local/bin/claude-vibe-check
$ claude-vibe-check setup
 
claude-vibe-check setup
 
Capture tool: fswebcam
Also supported (not installed): ffmpeg
Hook added to ~/.claude/settings.json
claude-vibe-check is now active in Claude Code.
 
$ claude-vibe-check test
 
claude-vibe-check test
 
Platform: linux
Available tools: fswebcam
Missing tools: none
 
Capturing test photo...
Photo saved: /tmp/claude-vibe-check-test.jpg (48320 bytes)
Webcam capture works.
 
$ claude-vibe-check mode offline
 
Offline backends available: hsemotion, fer
Mode set to: offline
 
$ claude-vibe-check status
 
claude-vibe-check status
 
Installed: yes
Mode: offline
Cooldown: 60s
Capture tools: fswebcam
Offline backends: hsemotion, fer
Settings: ~/.claude/settings.json

Get started in under a minute

Install claude-vibe-check globally with npm, then run setup. That is all it takes to wire it into Claude Code.

Quick install

Install the package globally and run setup to add the hook to your Claude Code settings automatically.

npm install -g claude-vibe-check
claude-vibe-check setup

This adds a "Stop" hook to ~/.claude/settings.json that fires after every Claude response.

Webcam tools

You need at least one webcam capture tool installed on your system. claude-vibe-check will auto-detect whichever one is available.

# Linux
sudo apt install fswebcam
# or sudo apt install ffmpeg
# macOS
brew install imagesnap
# or brew install ffmpeg

Offline mode setup

If you want emotion detection to run locally without sending photos to Claude, install one of the Python backends.

# Option 1: FER (simple, ~200ms)
pip install fer opencv-python-headless
# Option 2: HSEmotion (faster, better accuracy)
pip install hsemotion-onnx opencv-python-headless
# Then switch to offline mode
claude-vibe-check mode offline

Configuration

Settings are stored in ~/.config/claude-vibe-check/config. You can also set them through environment variables.

# Set analysis mode
claude-vibe-check mode online # or offline
# Set cooldown between checks (seconds)
claude-vibe-check cooldown 30

The default cooldown is 60 seconds, which prevents claude-vibe-check from running on every single response during rapid back-and-forth.

CLI commands

Command Description
claude-vibe-check setup Install the hook into Claude Code settings
claude-vibe-check uninstall Remove the hook from Claude Code settings
claude-vibe-check test Test webcam capture to make sure everything works
claude-vibe-check status Show current installation status, mode, and detected tools
claude-vibe-check mode [online|offline] Get or set the analysis mode
claude-vibe-check cooldown [seconds] Get or set the minimum seconds between checks
claude-vibe-check stats [today|week|<project>] Show vibe statistics, filterable by time or project
claude-vibe-check history clear Clear all logged vibe history

Linux and macOS

claude-vibe-check supports both major development platforms with multiple capture tool options for each.

🐧

Linux

Uses V4L2-based capture tools. Any standard USB or built-in webcam that shows up as /dev/video0 will work out of the box.

fswebcam ffmpeg (v4l2) gstreamer
🍎

macOS

Uses AVFoundation for camera access. Works with the built-in FaceTime camera and most external USB webcams.

imagesnap ffmpeg (avfoundation)