github.com/benlantaff/clawd-lamp

Clawd Lamp

A 144 mm Clawd, printed in translucent plastic, with LEDs inside that pulse orange whenever Claude Code is working on your prompt.

GET clawd.local/think

Drag to turn

Yes, it can flash while Claude works

  1. You hit enterClaude Code starts working on your prompt
  2. A hook firesClaude Code runs a command you configured
  3. curl over Wi-FiA request to clawd.local/think
  4. The ESP32 reactsThe LEDs switch pattern in a few milliseconds

Claude Code has hooks: commands it runs when something happens, such as a prompt being submitted, a tool being about to run, or a reply finishing. Each hook sends a tiny web request to an ESP32 on your Wi-Fi, and the ESP32 changes the light pattern. The hooks run in the background, so Claude never waits on Clawd, even when it's unplugged.

One limit: hooks can't see the model's reasoning as it happens. Clawd lights up for the whole turn, thinking and tool use together, from when you press enter until the reply is done.

Parts

10 items, 1 optional
PartQtyNotes
Seeed Studio XIAO ESP32-C31Thumb-sized Wi-Fi board with USB-C. Its stick-on antenna comes in the box, and you need it. If you'd rather not solder to the board, buy the version with headers already soldered.
WS2812B LED strip, 5 V, 60 LEDs/m, IP301 mAny density works. At 30 LEDs/m the spacing is 33 mm, so about 12 LEDs fill the inside; at 60 LEDs/m about 24 fit. Bare (IP30) strip is easiest to cut and stick; silicone-sleeved (IP65/IP67) is stiffer and needs glue, but diffuses the light nicely. Often sold as "NeoPixel strip".
330 Ω resistor1Goes in the data wire to protect the first LED.
Hookup wire, 26 AWG3 × 20 cmRed, black and green. Silicone insulation bends easiest.
Heat-shrink tubing, 2–3 mm10 cmCovers the solder joints.
USB-C data cable1Some cables only charge, and those can't upload firmware.
Filament~110 gTranslucent natural or white makes the whole body glow. Opaque filament, such as the dark grey of the first build, turns the eyes into the only openings, which looks sharper but needs the LEDs aimed at them.
Black or white PLAscrapFor the eye plugs: black for dark eyes on a glowing body, white to diffuse the light on an opaque body, or skip them for a raw pixel look.
Tools—Soldering iron and solder, hot glue gun, double-sided foam tape, flush cutters.
1000 µF capacitor, 6.3 V+optionalAcross 5V and GND at the strip. Only matters if you add a lot more LEDs.

Print

3 STL files, already oriented
About G-code

G-code only ever fits one printer, nozzle and filament, so the STLs are the portable files: open them in your slicer (Bambu Studio, OrcaSlicer, PrusaSlicer or Cura). If you happen to own a stock BIQU B1, gcode/ already holds sliced PLA files plus the PrusaSlicer profile that made them, ready for the SD card.

B1 fileFilamentTimeWeight
B1_clawd_shell_PLA.gcodeTranslucent PLA7 h 34 m83.5 g
B1_clawd_back_PLA.gcodeTranslucent PLA2 h 15 m26.1 g
B1_clawd_eyes_PLA_black.gcodeBlack PLA10 m1.4 g
FileFilamentLies on the bedSettings
clawd_shell.stlTranslucentFace downNo supports. 0.2 mm layers, 4 walls, 15% infill. Set elephant-foot compensation to about 0.15 mm so the eye holes print full size. 54 mm tall.
clawd_back.stlTranslucent or whiteOuter face downNo supports. The board shelf bridges 18.6 mm, which most printers handle fine.
clawd_eyes.stlBlackFlange downTwo plugs. Finer layers (0.12–0.16 mm) look crisper.

The back plate's lip has 0.25 mm clearance on each side. If it's too tight, sand the lip. If it's loose, add a wrap of tape. To change Clawd's size, run python generator\make_clawd.py --pixel 10 for a 160 mm Clawd. --depth changes the thickness, and the script re-checks every part before writing it.

Wire

3 wires, 5 solder joints
XIAO 5V to strip +5V with a red wire, GND to GND with a black wire, and D10 through a 330 ohm resistor to the strip's DIN with a green wire. USB-C to your PC or a 5 V charger XIAO ESP32-C3 5V GND 3V3 D10 D9 D8 D7 D0 D1 D2 D3 D4 D5 D6 red · 5V 330 Ω green · data black · GND +5V DIN GND WS2812B strip · 15 LEDs arrows point away from the input end
  • Wire the strip's input end, where the printed arrows point away from you and the pads read DIN rather than DO. Wired to the other end, nothing lights, and nothing is harmed.
  • Ground is often a white wire rather than black, and some strips add a spare red and white power pair for long runs: tape those off separately. The pad labels under the silicone are the authority, not the colours.
  • Put the resistor in the green wire, close to the strip, and heat-shrink it.
  • Cut each wire about 15 cm long, so the back plate can come out with the board on it.

Assemble

Test the lights before you glue
  1. Test-fit the plastic. Press the back plate into the shell, then pull it out with a fingernail in the notch on the top edge. Push the eye plugs in from inside, with a drop of glue on each flange.
  2. Cut 15 LEDs from the input end of the strip, straight across the copper pads on the cut line.
  3. Solder the three wires as shown above, and cover every joint with heat-shrink.
  4. Flash the firmware (next section) and check the LEDs animate while everything is still on the bench.
  5. Fit the antenna. Snap its tiny connector onto the XIAO, then stick the antenna flat against the inside top of the shell.
  6. Mount the board. Set the XIAO on the back plate's shelf with the USB-C port facing the window. Plug the cable in through the window so it lines the board up, then hot-glue the board's edges to the rails. Keep glue out of the port.
  7. Stick the strip in. On a translucent shell, run it up the left wall, across the ceiling and down the right wall, LEDs facing inward about 25 mm behind the front face. On an opaque shell, snake it across the inside of the front wall level with the eyes instead, and line the rest of the interior with white paper or paint so the light bounces toward them. Curve it gently at the corners and never crease it at an LED.
  8. Close it up. Tuck the wires in and press the back plate home.

Flash the firmware

Arduino IDE 2
  1. Install Arduino IDE 2.
  2. In Boards Manager, install esp32 by Espressif Systems.
  3. In Library Manager, install Adafruit NeoPixel.
  4. Open firmware/clawd_lamp/clawd_lamp.ino. Set WIFI_SSID and WIFI_PASS, which must be a 2.4 GHz network because the ESP32 can't join 5 GHz. If you used a different number of LEDs, change LED_COUNT.
  5. Plug in the XIAO. Choose Tools → Board → XIAO_ESP32C3, pick its COM port, and set USB CDC On Boot to Enabled. Click Upload.
  6. Open Serial Monitor at 115200 baud to see Clawd's address. Go to http://clawd.local/ in a browser and try the buttons.

On power-up, a chasing orange dot means Clawd is joining Wi-Fi. Red blinking means it can't connect. One warm flash that settles to a dim glow means it's ready.

Connect it to Claude Code

5 hooks
Hook eventRequestClawd does
UserPromptSubmit/thinkOrange pulse with sparkles
PreToolUse/toolQuick warm-white flash
PostToolUse/thinkBack to pulsing, including after you approve a permission
Notification · permission_prompt/waitSlow blue breathing
Stop/idleSteady green, the resting state

All five hooks are in hooks/clawd-hooks.json. Merge its "hooks" block into ~/.claude/settings.json so Clawd works in every project, then run /hooks in Claude Code to confirm they loaded. Each entry looks like this:

"UserPromptSubmit": [
  {
    "hooks": [
      {
        "type": "command",
        "command": "curl -s -m 2 -o /dev/null http://clawd.local/think || true",
        "async": true
      }
    ]
  }
]
  • "async": true runs the hook in the background, so Claude never waits for Clawd. || true keeps an unplugged Clawd from putting error notices in your chat.
  • Nothing from your prompt leaves your PC. The request is only the URL.
  • Pressing Esc to interrupt doesn't fire Stop. Clawd goes back to idle on your next prompt, or after 5 minutes on its own.
  • Anyone on your Wi-Fi can make Clawd blink. That's harmless, but good to know.

Tune it, and watch the numbers

no re-flashing

The page Clawd serves is a live view, not just buttons. It renders the colour the firmware computed for every LED, seven times a second, so what you see matches the strip exactly. That also means the whole software half can be built and tested before the hardware arrives.

  • leds sets the strip length, saved to the board's flash. Start near 12 for a 30 LEDs/m strip, or 24 for 60 LEDs/m, and adjust by eye.
  • brightness caps everything, and is what really sets your power budget.
  • idle glow sets how bright the resting green sits. Zero turns it off.

The tiles below it show thinking time, prompts answered, tool calls and permission asks, all measured by the board and kept through reboots, plus tokens and cost reported by hooks/clawd_stats.py once you wire it into the Stop hook. Those dollar figures are list-price equivalent: on a Claude subscription they are not your bill, but what the same tokens would cost on the pay-as-you-go API.

When it misbehaves

LEDs stay dark or show random colors
Check that the wires go to the strip's input end, that GND is connected, and that LED_PIN is 10 and LED_COUNT matches your strip. Try once with the resistor bypassed.
Red blinking at power-up
The Wi-Fi name or password is wrong, the network is 5 GHz only, or the antenna isn't clipped on.
No COM port appears
Try a different cable. Many USB-C cables only charge.
Serial Monitor stays blank
Set Tools → USB CDC On Boot → Enabled, upload again, and check the baud rate is 115200.
The browser works but Claude doesn't trigger it
Run curl http://clawd.local/think in a terminal. If clawd.local doesn't resolve, use the IP address from Serial Monitor in the hooks instead, and reserve that address in your router. Guest networks often stop devices from reaching each other.
Bright dots instead of an even glow
Move the strip further back from the front face, or line the inside of the front with a sheet of printer paper.

Files

repository layout
  • print/clawd_shell.stlBody, arms and legs, open at the back
  • print/clawd_back.stlBack plate with lip, USB-C window and board shelf
  • print/clawd_eyes.stlTwo eye plugs
  • gcode/B1_*.gcodeReady-to-print files for the BIQU B1, PLA
  • gcode/biqu_b1_pla.iniPrusaSlicer profile used to make them
  • generator/make_clawd.pyRebuilds the STLs from the pixel art, for any size
  • firmware/clawd_lamp/ESP32 sketch: Wi-Fi, web page, light patterns, counters
  • firmware/clawd_lamp/wifi_secrets_example.hCopy to wifi_secrets.h and add your network; that name is git-ignored
  • firmware/clawd_wifi_test/Wi-Fi diagnostic sketch: scans, joins, explains failures
  • hooks/clawd-hooks.jsonClaude Code hook settings to merge
  • hooks/clawd_stats.pyTotals your token use and cost, and reports it to the board
  • docs/This guide, the wiring diagram and the animation

Clawd and Claude belong to Anthropic. This is a personal desk build, not something to sell.