prabowosd/clawd-buddy/tree/main/plugins/clawd-buddy
clawd-buddy
A Claude Code plugin that adds a small mascot and a two-line status band above the prompt, showing rate limit usage, context fill, cache countdown, current directory and git state.
About this mod
clawd-buddy 是一個 Claude Code 外掛,會在提示列上方繪製一個小吉祥物以及兩行狀態列。左側顯示 5 小時與 7 天用量視窗、context 使用比例、prompt cache 倒數、目前目錄與該目錄的 git 狀態(分支、已暫存、已修改、未追蹤、領先/落後、worktree 名稱);右側是與 Claude Code 啟動時相同、以象限區塊字元與 24-bit 色彩繪製的吉祥物,閒置時眨眼、Claude 工作時揮手。狀態列僅三行高,並會在 Claude Code 顯示問卷時讓位。
安裝方式為在 Claude Code 內執行 /plugin marketplace add prabowosd/clawd-buddy、/plugin install clawd-buddy@clawd-buddy、/reload-plugins;亦可 clone 後以 claude --plugin-dir plugins/clawd-buddy 試用。已在 Claude Code 2.1.289、macOS 終端機上測試。
git 資訊以唯讀方式讀取(git status --porcelain=v1 -b 與 git rev-parse,使用 --no-optional-locks,不觸及網路),並在每回合結束及每 30 秒更新;cache 倒數以 1 小時快取為前提。當 Claude 透過 SendUserFile 傳送圖片時,支援的終端機(kitty、Ghostty)會在 Image 面板顯示最後一張圖片,其他終端機則以預設檢視器開啟。專案以 MIT 授權釋出。
Installation
Check the author's README for the marketplace and plugin name first. Commands may change as the repository evolves.
claude plugin marketplace add prabowosd/clawd-buddy claude plugin install clawd-buddy
Original text / README
clawd-buddy
A small mascot and a two line status band above the Claude Code prompt.
The left side shows how much of your usage window is gone, how full the context is, how long the prompt cache stays warm, which directory you are in, and the git state of that directory. The right side is a small mascot that blinks while idle and waves while Claude works. It is three rows tall, so the band is three rows too.
5h ━━──── 3% 7d ━───── 7% ctx 30% cache 59:12
~/www/app main ~1 ?2 ↑1 wt:app-topic
The mascot is the same one Claude Code draws at startup, in quadrant-block characters and 24-bit colour, so there are no images and nothing to download.
Install
Inside Claude Code:
/plugin marketplace add prabowosd/clawd-buddy
/plugin install clawd-buddy@clawd-buddy
/reload-plugins
To try it without installing, clone the repo and start Claude Code with:
claude --plugin-dir plugins/clawd-buddy
It was built and tested on Claude Code 2.1.289, on macOS, in a terminal. The band is only drawn by Claude Code on the terminal and desktop surfaces.
What it shows
| Item | Meaning |
| --- | --- |
| model | The main loop's model, as /model shows it, in the mascot's colour on its own row under the directory and git state, then the context window and the effort level in grey: Opus 4.8 · 1M · high. The id is shortened, so claude-opus-4-8[1m] reads Opus 4.8, and a name that is no known family is cut at 28 characters. The effort shows after the first request of the session. A band with room for only two rows puts all of it at the end of the second row. |
| 5h, 7d | Rate limit usage for the 5 hour and 7 day windows, as a bar and a percentage. Green below 70%, amber from 70%, red from 90%. A dash means Claude Code has not reported a value yet. |
| ctx | Share of the context window in use, coloured the same way. |
| cache | Countdown of the prompt cache. It restarts after each response and turns amber in the last minute. cold means it has expired or nothing has been sent yet. |
| directory | The session directory, with your home folder shortened to ~. |
| git | Branch, then ✓ when clean. Otherwise +n staged, ~n modified, ?n untracked, ↑n ahead and ↓n behind. Inside a linked worktree the worktree name follows as wt:name. |
The mascot has three moods: idle (blinks every couple of seconds), working (waves and shuffles its feet while a turn runs) and done (waves for three seconds after a turn finishes).
Behaviour worth knowing
- The cache countdown assumes a 1 hour cache. There is no setting for the 5 minute cache yet.
- Git is read with
git status --porcelain=v1 -bandgit rev-parse. Both are read only,--no-optional-lockskeepsstatusfrom taking the index lock, and nothing touches the network. It refreshes when a turn ends and every 30 seconds, so acdcan take up to 30 seconds to show. - Outside a git repository only the directory is shown.
- If the terminal gives the band less room than the mascot needs, only its top row is drawn.
- The band steps aside while Claude Code is showing a survey.
- The font needs the block elements and box drawing ranges (U+2580 and U+2500). Most terminal fonts have them.
Images
When Claude sends you an image with the SendUserFile tool (PNG, JPEG, GIF, WebP, HEIC, BMP or TIFF, at most five per call):
- In a terminal that can draw pictures (kitty, Ghostty) the last image shows in an
Imagepane. A PNG is read as it is, anything else is converted once withsipsinto/tmp/clawd-buddy. Preview opens too, but only when Claude sent the file withdisplay: render. - In any other terminal (Warp, iTerm, Terminal) every image opens in the default viewer with
open, so on macOS it lands in Preview.
To force the pane in a terminal that is not guessed right, start Claude Code with CLAWD_BUDDY_IMAGES=pane. CLAWD_BUDDY_IMAGES=viewer always uses the default viewer.
Other files are left alone. If a viewer is missing or fails the file still reaches you and nothing is shown. Images are handled after the tool call succeeds. The pane needs a wide terminal to seat on its own, so on a narrow one it waits.
Layout
.claude-plugin/marketplace.json marketplace entry
plugins/clawd-buddy/
.claude-plugin/plugin.json plugin manifest
hooks/register.tsx hooks, state and the band
hooks/sprite.ts the mascot frames
hooks/stats.ts bars, colours, the clock
hooks/git.ts git and worktree parsing
hooks/images.ts which sent files count as images
hooks/*.test.ts tests
types/index.d.ts state types
The mascot lives in sprite.ts as plain strings, one character per pixel, so changing it is a matter of editing a few rows.
Development
claude plugin validate .
claude plugin test plugins/clawd-buddy
For a live loop, keep the plugin in a folder Claude Code watches for mods and edit it while a session is open. It reloads when a turn ends.
License
MIT
