ClaudeMods
☰
ZH-TW
● 0 人在線上 · 瀏覽 0 次
贊助提交作品
GitHub 儲存庫 · 發布者 5omeOtherGuy

slab-deck

面向 Claude Code 的 SLAB 風格控制中心:帶有上下文與速率限制儀表的真彩色狀態列、提示列上方即時狀態帶、包含 overview/context/tools/agents/git/tmux/usage 的 `/deck` 面板、彈出視窗和 tmux 導覽。

5omeOtherGuy@5omeOtherGuy

5omeOtherGuy/slab-deck/tree/main/mod/slab-deck

原貼文圖片1
已翻譯

關於這個 mod

slab-deck 是採用 SLAB 設計語言(深色表面,只在字形和結果標記上使用色相,不繪製方框)的 Claude Code 控制中心。它包含兩個部分:statusline-slab.sh 佔用 Claude Code 的狀態列槽位,以真彩色儀表顯示模型、儲存庫/分支、effort、上下文、5h 和 7d 速率限制(70% 起琥珀色、90% 起紅色、重設倒數)、提示快取命中率、每回合輸出迷你折線圖、工作階段時鐘和行數;mod/slab-deck 是基於 function-hooks 外掛 API(Claude Code 2.1.289 以上)的模組,在提示列上方加入即時狀態帶(帶有經過時間、步驟、token、tok/s 和執行中工具的動畫 ▪▪▪ working 指示器;閒置時提供 tmux 視窗連結和操作),並透過 /deck [section] 開啟包含 overview、context、tools、agents、git、tmux 和 usage 的停駐面板,還為工具呼叫、回合、tmux 面板和按鍵清單提供彈出視窗。動畫會在原位置重繪儲存格,可使用 P1_REDUCED_MOTION=1 或 SLAB_REDUCED_MOTION=1 凍結。/deck-band full|compact|off 切換狀態帶;上下文或速率限制超過 80% 時會顯示 toast。複製儲存庫並執行 claude --plugin-dir slab-deck/mod/slab-deck 安裝,或在 ~/.claude/settings.json 中設定 CLAUDE_CODE_PLUGIN_DIRS 和 statusLine。狀態列需要 jq 和 git;在 tmux 中或 git 儲存庫內會自動啟用 tmux 和 git 功能。採用 MIT 授權。

安裝

請先查看作者 README,確認 marketplace 與外掛名稱;指令可能隨儲存庫結構而變動。

claude plugin marketplace add 5omeOtherGuy/slab-deck
claude plugin install slab-deck
原文 / README

slab-deck

A control center for Claude Code in the SLAB design language: dark surfaces, hue only on glyphs and outcome markers (› ▸ ✓ ✗ ! · ↳ ▪), no box drawing. Two parts that work together:

  • statusline-slab.sh fills Claude Code's own status line slot with gauges in true colour.
  • mod/slab-deck is a mod on the function-hooks plugin API (Claude Code 2.1.289+): a live band above the prompt, a docked deck pane, popups and tmux navigation.

slab-deck while a turn runs

What it shows

Statusline (Claude Code's status line slot): model, repo and branch, effort | context, 5h and 7d rate-limit gauges (amber from 70 %, red from 90 %, reset countdown once a window passes 70 %), prompt-cache hit rate, output-per-turn sparkline (handed over by the mod), session clock, lines +N −N. Facts drop by priority when the terminal narrows; a window at 70 % or more outlasts the repo name.

Band above the prompt: while a turn runs, the animated ▪▪▪ working indicator with elapsed time, step, tokens, tok/s and the tools running; when idle, your tmux windows as links (1–9) and actions (d deck, n window, s split, h keys).

Deck pane — /deck [section]

| section | contents | | --- | --- | | overview | session facts, context, rate limits and resets, output per turn, recent tool calls | | context | the /context grid, categories, autocompact mark, memory files | | tools | calls by tool, 30-minute timeline, recent calls | | agents | subagents and their status | | git | changed files with diff bars, commits, history graph in a new tmux window | | tmux | all panes of the session: live peek, window minimap, go there, new window, split, zoom | | usage | rate limits, token totals, cache hit, turn durations |

Popups for a tool call, a turn, a tmux pane and the key list (esc closes).

Animations: the ▪▪▪ indicator breathes while a turn runs; the deck's context and rate-limit gauges sweep up when it opens and glide to each new value. Both repaint cells in place ($.ui.blit), no redraw. P1_REDUCED_MOTION=1 or SLAB_REDUCED_MOTION=1 freezes them.

Also /deck-band full|compact|off and toasts when context or a rate limit crosses 80 %. The tmux actions only select, open or split; nothing closes, kills or types into another pane.

slab-deck idle

Install

git clone https://github.com/5omeOtherGuy/slab-deck
claude --plugin-dir slab-deck/mod/slab-deck

For every session, in ~/.claude/settings.json:

"env": { "CLAUDE_CODE_PLUGIN_DIRS": "/path/to/slab-deck/mod/slab-deck" },
"statusLine": { "type": "command", "command": "/path/to/slab-deck/statusline-slab.sh", "padding": 0, "refreshInterval": 2 }

The statusline needs jq and git, and works without the mod (no sparkline then). refreshInterval re-fits it after a resize and keeps its clock and countdowns current; one run takes about 60 ms.

tmux and git features turn on by themselves when Claude Code runs inside tmux or a git repository. P1_REDUCED_MOTION=1 or SLAB_REDUCED_MOTION=1 freezes the working indicator.

Develop

claude plugin validate mod/slab-deck
claude plugin test mod/slab-deck

| file | role | | --- | --- | | hooks/register.tsx | events, timers, commands, every $ call (the engine follows $ only within one file) | | hooks/views.tsx | band, deck sections and popups | | hooks/ink.ts | design tokens and the Raster painters (gauges, charts, minimap, working indicator) | | hooks/data.ts | git and tmux output parsers | | types/index.d.ts | the $.state contract |

License

MIT

更多類似作品