
oikon48/prompt-rail/tree/main/plugins/prompt-rail

oikon48/prompt-rail/tree/main/plugins/prompt-rail
prompt-rail 为你的会话添加一个提示栏,水平显示在提示输入框上方,或垂直显示在记录旁边。悬停某个条可预览提示及其回合摘要,然后点击可将记录滚动回该提示。它列出活动分支的提示,因此被 /rewind 丢弃的提示会被排除,并支持 horizontal/vertical/off、next/prev/first/last、跳转到提示 #12 和 find <words> 等命令,以及用于在回合中间步进的快捷键。通过插件市场安装;需要函数钩子(早期访问,Claude Code 2.1.280+)。
请先查看作者 README 确认 marketplace 和插件名称;命令可能随仓库结构改变。
claude plugin marketplace add oikon48/prompt-rail claude plugin install prompt-rail@oikon48
A rail of your prompts for Claude Code. Hover to read one, click to jump back to it.
Turn on function hooks (early access, Claude Code 2.1.280+) in ~/.claude/settings.json:
{ "env": { "CLAUDE_CODE_ENABLE_FUNCTION_HOOKS": "1" } }
Install, from your shell or inside a session:
claude plugin marketplace add oikon48/prompt-rail
claude plugin install prompt-rail@oikon48
/plugin marketplace add oikon48/prompt-rail
/plugin install prompt-rail@oikon48
Start a new session. The rail opens on its own.
Mouse works best with "tui": "fullscreen".
| Command | |
| --- | --- |
| /prompt-rail horizontal | Bars above the prompt input |
| /prompt-rail vertical | A pane beside the transcript |
| /prompt-rail off | Hide the rail |
| /prompt-rail next | Jump to the next prompt |
| /prompt-rail prev | Jump to the previous prompt |
| /prompt-rail first, last | Jump to the first or the newest prompt |
| /prompt-rail 12, #12 | Jump to prompt #12 |
| /prompt-rail find <words> | Jump to the newest prompt that holds the words |
| /prompt-rail-next, /prompt-rail-prev | Jump to the next or previous prompt, with no argument, for a keybinding |
| /prompt-rail | Reopen the rail in the current layout |
The layout is also the "Rail mode" row in /config, and it is kept across sessions.
Bind the step commands in ~/.claude/keybindings.json; they run mid-turn too:
{
"bindings": [
{ "context": "Chat", "bindings": { "ctrl+k": "command:prompt-rail-prev", "meta+j": "command:prompt-rail-next" } }
]
}
In the horizontal layout, ctrl+x tab moves the focus to the bars: the ring starts on the prompt you are reading, ← → move it across the bars on screen and show its prompt, Enter jumps there, Esc returns to the prompt input.
| Tick | Meaning |
| --- | --- |
| ━ ┃ | The prompt you are reading |
| ─ │ | Any other prompt |
| ┄ ┆ | A prompt Claude Code refused to scroll to; next and prev skip it |
flowchart LR
T[transcript .jsonl] -->|every prompt on the live branch| R[rail]
S[rows on screen] -->|topmost row's prompt| R
R -->|click, next/prev| J[scroll that prompt's row into view]
The rail lists the prompts of the live branch, so prompts abandoned with /rewind drop out, and prompts from before a resume are listed too. The prompt you are reading owns the topmost row on screen. The transcript is read again only when its size or time changed.
/compact command's own row cannot be jumped to; its tick turns dotted after the first try.next cannot scroll further.claude --plugin-dir plugins/prompt-rail # load this checkout; saving reloads it
claude plugin validate plugins/prompt-rail
claude plugin test plugins/prompt-rail
Run /plugin-types .claude/types in a session here for type declarations. Bump the version in plugins/prompt-rail/.claude-plugin/plugin.json with each release, since installed copies update only when it changes.