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

halloween

Claude Code 終端機的萬聖節主題。

phuclh@phuclh

phuclh/claude-halloween/tree/main/plugins/halloween

已翻譯

關於這個 mod

🎃 Claude Code 的萬聖節

Claude Code 終端機的萬聖節主題。

<p align="center"> <img src="assets/demo.svg" alt="套用萬聖節主題的 Claude Code:蝙蝠飛過對話區,提示列由閃爍的南瓜燈、葉子和骷髏圍住" width="100%"> </p>
  • 提示列周圍的鬧鬼邊框。 蝙蝠、葉子和月亮停在提示列上方的紫羅蘭色邊緣。下方是一條苔蘚藤蔓,南瓜燈在上面隨機成簇生長,把閃爍的光映到藤蔓上。幽靈偶爾沿著頂端飄過,拖著一縷靈質。每個工作階段都有自己的隨機版面。
  • 飛過對話區的蝙蝠。 一小群蝙蝠會完整飛過聊天內容:從一側飛入、從另一側飛出,沿著平緩弧線上升或下降,有些慢慢巡航,有些快速掠過。
  • 詭異文字。 轉圈行會顯示 Brewing…、Summoning… 或 Stirring the cauldron… 等文字,完成的回合會顯示 Haunted for 12s。
  • 敢用的話,還有詭異音效。 每次按鍵都會發出蝙蝠般的吱聲,偶爾還會像閃電一樣劈啪作響。按 Enter 送出回答時,會播放反派的 mwah-ha-ha、女巫的尖笑、惡魔的笑聲、哀號幽靈、管風琴或雷鳴聲。每種 Enter 音效都會先播放一次才開始重複,而且同一種不會連續播放兩次。開啟前音效都是關閉的。

安裝

在 Claude Code 中:

/plugin marketplace add phuclh/claude-halloween
/plugin install halloween@phuclh-plugins

或從 shell 執行:

claude plugin marketplace add phuclh/claude-halloween
claude plugin install halloween@phuclh-plugins

接著啟動新的工作階段。

使用

  • /halloween 可切換主題。你的選擇會在不同工作階段之間保留。
  • /halloween sounds 可切換音效,設定也會被記住。音效只在 macOS 播放:Claude Code 會用 afplay 播放,Linux 或 Windows 不會播放任何聲音。
  • 如果 90 秒內沒有輸入,也沒有 Claude 的工作,動畫會暫停並停止使用 CPU。你開始輸入或 Claude 開始工作後,它會立即恢復。

需求

  • 全螢幕模式用於顯示邊框和蝙蝠:在 ~/.claude/settings.json 設定 "tui": "fullscreen",或使用 /tui 切換。在其他畫面中,你會看到詭異文字和提示列上的小花環。
  • 較新的 Claude Code。 主題使用 Claude Code 的 early-access function-hook API,這個 API 可能在版本之間變動。以 Claude Code 2.1.287 建置並測試。

效能

動畫執行時,主題每秒重繪畫面 8 次,在 110×40 的終端機上約使用一個 CPU 核心的 8–11%。暫停後不會耗用資源。

開啟音效時,每次按鍵都會啟動一個短暫的 afplay,間隔最多每 70 ms 一次。每次按鍵約增加 0.02 s 的 CPU 使用量,而且只在輸入時發生。

開發

claude --plugin-dir ./plugins/halloween       # 從此資料夾執行
claude plugin validate ./plugins/halloween    # 檢查 manifest 和 hooks
claude plugin test ./plugins/halloween        # 執行測試

上面的示範由外掛自己的邊框和飛行程式碼繪製。修改後要再次產生它:

npx -p typescript tsc -p scripts
node .demo-build/scripts/render-demo.js > assets/demo.svg

音效由 scripts/render-sounds.ts 使用振盪器、雜訊和濾波器合成;笑聲來自小型共振峰合成器。沒有錄音或取樣。要重新產生到 plugins/halloween/sounds/:

npx -p typescript tsc -p scripts
node .demo-build/scripts/render-sounds.js

安裝

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

claude plugin marketplace add phuclh/claude-halloween
claude plugin install halloween
原文 / README

🎃 Halloween for Claude Code

A Halloween theme for the Claude Code terminal.

<p align="center"> <img src="assets/demo.svg" alt="Claude Code with the Halloween theme: bats fly across the conversation above a prompt framed by flickering jack-o'-lanterns, leaves and skulls" width="100%"> </p>
  • A haunted frame around the prompt. Bats, leaves and a moon perch on a violet edge above the prompt. Below it runs a moss vine where jack-o'-lanterns grow in random clumps and flicker their glow onto the vine. A ghost drifts along the top every so often, trailing ectoplasm. Every session gets its own random layout.
  • Bats across the conversation. A small flock flies whole journeys over your chat: in from one side and out the other, rising or falling along a gentle arc, some cruising and some darting.
  • Spooky words. The spinner says things like Brewing…, Summoning… or Stirring the cauldron…, and finished turns read Haunted for 12s.
  • Spooky sounds, if you dare. Each keystroke squeaks like a bat or, now and then, cracks like lightning. Enter answers with a villain's mwah-ha-ha, a witch's cackle, a demon's laugh, a wailing ghost, a pipe organ or a thunderclap. Every Enter sound plays once before any repeats, and the same one never plays twice in a row. Sounds are off until you turn them on.

Install

In Claude Code:

/plugin marketplace add phuclh/claude-halloween
/plugin install halloween@phuclh-plugins

Or from a shell:

claude plugin marketplace add phuclh/claude-halloween
claude plugin install halloween@phuclh-plugins

Then start a new session.

Use

  • /halloween turns the theme off and on. Your choice is remembered across sessions.
  • /halloween sounds turns the sounds on and off, and is remembered too. Sounds play on macOS only: Claude Code plays them with afplay, and plays nothing on Linux or Windows.
  • After 90 seconds with no typing and no work from Claude, the animation pauses and stops using CPU. It wakes as soon as you type or Claude starts working.

Requirements

  • Fullscreen mode for the frame and the bats: set "tui": "fullscreen" in ~/.claude/settings.json, or switch with /tui. On other screens you get the spooky words and a small garland on the hint line.
  • A recent Claude Code. The theme uses Claude Code's early-access function-hook API, which may change between releases. Built and tested on Claude Code 2.1.287.

Performance

While animating, the theme redraws the screen 8 times a second, which costs about 8–11% of one CPU core on a 110×40 terminal. Once paused, it costs nothing.

With sounds on, each keystroke starts a short afplay, at most one every 70 ms. That adds about 0.02 s of CPU per keystroke, and only while you type.

Develop

claude --plugin-dir ./plugins/halloween       # run it from this folder
claude plugin validate ./plugins/halloween    # check the manifest and hooks
claude plugin test ./plugins/halloween        # run the tests

The demo above is drawn by the plugin's own frame and flight code. To render it again after a change:

npx -p typescript tsc -p scripts
node .demo-build/scripts/render-demo.js > assets/demo.svg

The sounds are synthesized from oscillators, noise and filters by scripts/render-sounds.ts; the laughs come from a small formant synthesizer. Nothing is recorded or sampled. To render them again into plugins/halloween/sounds/:

npx -p typescript tsc -p scripts
node .demo-build/scripts/render-sounds.js

更多類似作品