GruperTal/claude-pin-message
关于这个 mod
Claude Pin Message 会在 Claude Code 中添加侧边面板,让你固定选中的文本或 Claude 的上一条回复,使其在对话滚动时仍然可见。使用 /plugin marketplace add GruperTal/claude-pin-message 安装,然后运行 /plugin install pin-message@claude-pin-message 和 /reload-plugins。使用 /pin 固定鼠标选区或上一条回复(以 markdown 渲染),使用 ✕ unpin 移除单个固定内容,使用 /unpin 清除所有固定内容并关闭面板。固定内容会集中在一个 Pinned 面板中,在会话期间持续存在,每条上限为 10,000 个字符。选取文本需要全屏布局。它以仅限本机的 hooks 模组实现(hooks/register.tsx 约 90 行),不会发出网络请求、写入文件或调用模型。需要支持 mods 的 Claude Code;在 v2.1.289 上完成构建和测试。采用 MIT 授权。
安装
请先查看作者 README 确认 marketplace 和插件名称;命令可能随仓库结构改变。
claude plugin marketplace add GruperTal/claude-pin-message claude plugin install pin-message
原文 / README
Claude Pin Message
A Claude Code mod that pins a response beside the conversation, so the plan, the command or the answer you keep scrolling back to stays on screen while the session goes on.
❯ what's the rollout plan? │ ✕ unpin
● 1. Ship behind a flag │ 1. Ship behind a flag
2. Canary at 5% │ 2. Canary at 5%
3. Full rollout Thursday │ 3. Full rollout Thursday
❯ /pin │
❯ ok, start with step 1 │ ✕ unpin
● Adding the flag... │ npm run deploy -- --canary
(the conversation keeps scrolling) │
Install
Inside Claude Code, run:
/plugin marketplace add GruperTal/claude-pin-message
/plugin install pin-message@claude-pin-message
/reload-plugins
Use
| You do | What happens |
| --- | --- |
| Select text with the mouse, then /pin | The selection is pinned |
| /pin with nothing selected | Claude's last response is pinned, drawn as markdown |
| Press ✕ unpin above a pin | That pin is removed |
| /unpin | Every pin is removed and the pane closes |
Pin as many things as you like; they stack in one "Pinned" pane. Close the pane and your pins are kept: the next /pin brings it back.
Good to know
- Selections need the fullscreen layout. Claude Code only reports a mouse selection there. Elsewhere
/pinpins the last response, and the pane sits above the prompt instead of beside the transcript. - Pins last for the session. A new session starts with none.
- A pin holds up to 10,000 characters. A longer one is cut.
How it works
It is a mod: one hooks module, about 90 lines, in hooks/register.tsx. /pin reads the selection and the session's messages, keeps the text in session state, and opens a pane that draws the pins.
It is local-only: no network requests, no files written, no model calls. Run claude plugin validate on the repo to see every event it hooks and every call it makes.
Requirements
Claude Code with mods support. Built and tested on v2.1.289.
Development
claude --plugin-dir . # run it from a checkout
claude plugin validate .
claude plugin test .
