0xGondarxyz/claude-code-mods/tree/main/quote-buttons
關於這個 mod
quote-buttons 是一個 Claude Code 外掛,會在聊天介面新增四項功能。1. 引用按鈕:每則使用者訊息和助理文字區塊在滑過時都會顯示 [ ↩ quote ];點擊後會把訊息以引用形式放進提示框(每行前加 > ,最多 6 行/400 個字元,截斷處顯示 …),位置在草稿上方。2. 編輯按鈕:你自己的訊息也會顯示 [ ✎ edit ],把原文放回輸入框;如果輸入框已有文字,會顯示 Clear the box first 且不做任何變更(真正的倒帶仍然是 Esc Esc)。3. 撤回傳送:回合執行時送出的提示會保留 5 秒,頻帶顯示 Sending in 5s: <text> 和 [ undo ];撤回會丟棄提示,並把文字放回草稿下方的輸入框;閒置時送出的提示不受影響。4. 交接按鈕:每則訊息都會顯示 [ ⇢ with context ] 和 [ ⇢ fresh ],各自會在工作階段的專案根目錄開啟新的 Konsole 分頁──帶上下文的執行 `claude --resume <session id> --fork-session "Take this over and do it now:
<message>",全新的執行 claude "<message>";分頁透過 argv 由 konsole --new-tab --workdir <root> -e claude ...啟動,因此引號和換行都安全。如果缺少 Konsole、啟動失敗,或沒有工作階段 ID,提示會給出原因,並把完整指令複製到剪貼簿。提示列上方的頻帶是共用的,因此這個外掛會包住其他 mod 在那裡繪製的內容。限制:交接需要 Konsole 使用單一程序視窗(預設)才能使用--new-tab,否則會開新視窗;按鈕需要全螢幕終端機版面配置(滑鼠點擊),因為主畫面會把內容印到捲動緩衝區,沒有指標;5 秒的保留會消耗 hook 的 10 秒預算。使用 claude plugin validate .和claude plugin test .` 開發。
安裝
請先查看作者 README,確認 marketplace 與外掛名稱;指令可能隨儲存庫結構而變動。
claude plugin marketplace add 0xGondarxyz/claude-code-mods claude plugin install quote-buttons
原文 / README
quote-buttons
A Claude Code mod. It adds four things.
- Quote button. Every user message and every assistant text block shows
[ ↩ quote ]on hover (top right of the message). A click puts the message in the prompt box as a quote (>per line, at most 6 lines and 400 characters,…when cut) above your draft. - Edit button. Your own messages also show
[ ✎ edit ]. It puts the original text in the box. If the box has text, it showsClear the box firstand changes nothing. Real rewind stays Esc Esc. - Undo send. A prompt you submit while a turn runs is held for 5 seconds. The band above the prompt shows
Sending in 5s: <text>and[ undo ]. Undo drops the prompt and puts the text back in the box (below any draft). Prompts sent while idle are untouched. - Hand-off buttons. Every message also shows
[ ⇢ with context ]and[ ⇢ fresh ]in the same hover box. Each opens a new Konsole tab in the session's project root.⇢ with contextrunsclaude --resume <session id> --fork-session "Take this over and do it now:\n\n<message>", a fork of the whole conversation.⇢ freshrunsclaude "<message>", a new session.- The tab is opened with
konsole --new-tab --workdir <root> -e claude ..., by argv (no shell, so quotes and newlines are safe). Toast:Opened a new tab (with context)or(fresh). - If Konsole is missing, the launch fails or there is no session id yet, the toast gives the reason and the full command goes to the clipboard to paste into any terminal.
The band above the prompt is shared: the mod wraps what other mods draw there.
Limits
- The hand-off buttons need Konsole, and
--new-tabneeds "Run all Konsole windows in a single process" (the default); otherwise Konsole opens a new window. - Buttons need the fullscreen terminal layout (mouse clicks). On the main screen (
CLAUDE_CODE_NO_FLICKER=0, tmux by default) the transcript is printed into scrollback and there is no pointer, so the message buttons cannot be clicked. The undo band button is a normal Button (click, or Tab focus and Enter where the band holds the keys); not tested on the main screen. - The 5 second hold costs 5 s of the hook's 10 s budget.
Develop
claude plugin validate .
claude plugin test .
