Shows the session id in the prompt footer; click to copy

Mods for Claude Code: small plugins that add to its screen and behavior. Each folder is one mod. Turn on the ones you want (see Setup) and change their settings in /config, under the mod's name.
Each mod works on its own, and a few work better together. notify tells you when something happens; with say it can tell you out loud, with tldr its turn summaries reuse tldr's line instead of writing their own, and with ghostty it stays quiet while you're looking at the session. In Ghostty, clicking its notification brings you back to the session's tab.
Shows how full Claude's context window is, as a colored bar above the prompt.
/context-bar hides or shows it for this session.Shows how much of your 5-hour and weekly usage limits you've used, as two small meters under the context bar. They turn yellow at 70% and red at 90%, and you get a warning inside Claude once a limit passes 90%. (notify also warns, as a desktop notification or out loud, at a threshold you set.)
Shows this session's ID in the bottom-right corner of the screen.
claude --resume <id> command.Adds a receipt to the line that closes each turn ("✻ Baked for 42s"): how many tools ran, which files were edited, the tokens used and what the turn cost.
Adds a one-sentence summary under Claude's longer replies, written by Claude Haiku.
/config sets how long a reply must be (600 characters by default).Tells you when something happens in a session: as a desktop notification, out loud through say, or both. With the ghostty mod on, it only tells you when you're away from the session (another app or tab in front), so it never interrupts you while you're watching. Without it, nothing can tell whether you're looking, so it always tells you.
/config under notify: both, banner (the desktop notification), voice (spoken by say) or off. By default the first three are both, and background tasks and check-ins are voice.voice alerts are skipped and the banners still go out.| Command | What it does |
|---|---|
/notify test | Sends a desktop notification right away. macOS can't tell a mod whether your terminal may show notifications, so this is how to check. The first time notify starts, it reminds you once. |
/notify settings | Opens the switch in System Settings: Ghostty's own entry in Ghostty, the Notifications list elsewhere. |
Gives Claude a voice, through murmur. The notify mod decides what gets said and when; say is the voice it speaks in.
/config./config under say.Everything else is one command, /say:
| Command | What it does |
|---|---|
/say | Names this session's voice and plays a short sample of it. |
/say pick | Lists every voice with its grade and switches this session to the one you pick, with a sample in it. The choice sticks to the conversation, so resuming it keeps the voice. |
/say pick <name> | Switches directly, like /say pick emma. Part of the name is enough. |
/say pick random | Switches to a random voice, other than the current one. Better-graded voices come up more often. |
/say read | Reads Claude's last reply aloud. |
/say tldr | A spoken 2–3 sentence summary of the session so far. |
/say hush | Mutes this session; run it again to unmute. |
/say help | Lists these. |
Ties Claude into the Ghostty terminal. All its settings start with "Ghostty" in /config.
/title gets a new one right away. A resumed session gets its old title back./workspace saves and reopens whole windows of sessions: see Workspaces./goto lists your open Claude sessions, the ones waiting on you first, and jumps to the one you pick. /goto next jumps straight to the one waiting longest; /goto <words> jumps to the one whose title matches./keybind add <keys> <text> makes a Ghostty key type something into Claude, like /keybind add super+ctrl+h /say hush for ⌘⌃H. /keybind lists them, and /keybind remove <keys> removes one. For ⌘⌃G to open /goto, run /keybind add super+ctrl+g /goto, or turn on Ghostty: install Claude keybinds in /config. The mod changes your Ghostty config only when you do one of these: it adds one line that loads its own claude-keybinds file.A workspace is a Ghostty window of Claude sessions you can put away and bring back later. It remembers every tab and split: each Claude session with its conversation, and each shell with its folder. Reopening it brings back the whole window, with every conversation picking up where it left off.
| Command | What it does |
|---|---|
/workspace save [name] | Saves this window. With no name, it keeps the name the window already had, or Claude Haiku picks one from the tabs. |
/workspace close [name] | Saves this window, then exits every Claude session in it and closes their tabs. Your current tab stays open at the shell, and shell tabs stay open. If another session is still working or waiting on you, it closes nothing and names them; /workspace close --force closes them anyway. |
/workspace list | Shows your saved workspaces, newest first. Press a number or Enter to reopen one, or Tab to ✕ delete to remove it. |
/workspace open <name> | Reopens a saved workspace in a new window. Part of the name is enough. |
claude --resume, so they continue their own conversation, with the tab title they had when you saved. A tab saved without a title gets a new one from its conversation. Shell tabs open at the prompt./workspace close. Pick it up tomorrow: /workspace list, then press its number.~/.claude/workspaces/, one JSON file per workspace. Saving never overwrites a different workspace that happens to have the same name: the new one gets a file of its own.Install the mods you want, one line each, at the prompt of a Claude Code session:
/plugin install context-bar --marketplace whilestevego/claude-mods
Answer y to add the marketplace, then pick a scope. The mods are context-bar, rate-limits, session-id, turn-receipt, tldr, notify, say and ghostty.
CLAUDE_CODE_PLUGIN_DIRS, separated by :, in the env block of ~/.claude/settings.json: "env": {
"CLAUDE_CODE_PLUGIN_DIRS": "/path/to/claude-mods/context-bar:/path/to/claude-mods/say"
}
To try one mod for a single session: claude --plugin-dir /path/to/claude-mods/tldr.
CLAUDE_CODE_DISABLE_TERMINAL_TITLE=1 in the same env block, so Claude Code doesn't overwrite the tab title./notify test checks; /notify settings opens the page.The first time a mod controls Ghostty, macOS asks for permission. Allow it.
Editing a mod's files reloads it in running sessions. A mod newly added to CLAUDE_CODE_PLUGIN_DIRS loads only in sessions started after that.
claude plugin validate context-bar # check a mod the way Claude Code will load it
claude plugin test context-bar # run its tests
Mods can call each other through nouns on $: say adds $.voice.say({ text }), which notify speaks through, and ghostty adds $.ghostty.isFocused(), which notify asks before alerting. Their types are in each mod's types/index.d.ts.
IDEAS.md has ideas for more mods.
hooks/register.tsx 62 lines1import { atom, read, update } from 'claude-code'
2import type { EngineInterface, Register } from 'claude-code'
3
4// OSC 22 sets the mouse pointer's shape (Ghostty, Kitty, foot; other terminals ignore it).
5// A mod can't print to the screen, so it's written straight to the tty of the nearest ancestor that has one,
6// found once: the walk up the process tree costs a few `ps` runs.
7const FIND_TTY = `p=$$
8while [ "$p" -gt 1 ]; do
9 t=$(ps -o tty= -p "$p" | tr -d ' ')
10 case "$t" in ''|'?'|'??') p=$(ps -o ppid= -p "$p" | tr -d ' ') ;; *) echo "/dev/$t"; exit ;; esac
11done`
12const SET_POINTER = `printf '\\033]22;%s\\033\\\\' "$1" > "$2"`
13
14let tty: Promise<string> | undefined
15const ttyOf = ($: EngineInterface) => (tty ??= $.process.run(['sh', '-c', FIND_TTY]).then(r => r.stdout.trim()))
16
17let wantedPointer = 'default'
18let sentPointer = 'default'
19
20const copied = atom({ plugin: 'session-id', key: 'copied' } as const, false)
21
22export const register: Register = on => {
23 // The footer's mode labels: no plugin-name prefix, always visible, and the id follows /clear.
24 on('ui.render', { component: 'SessionMode' }, async ($, e, next) => {
25 if (e.surface !== 'terminal' && e.surface !== 'desktop') return next(e) // no Client elsewhere
26 const { Box, Text, Client } = $.ui.resolve(e)
27 const id = await $.session.id()
28 const isCopied = await read($, copied)
29
30 return (
31 <Box>
32 {e.props.modes.length > 0 && <Text dimColor>{e.props.modes.join(' & ')} & </Text>}
33 <Client key="session-id" module="./sid.tsx" props={{ id, copied: isCopied }} />
34 </Box>
35 )
36 })
37
38 // sid.tsx posts hovers and clicks here, where $ can reach the tty and the clipboard.
39 on('ui.message', { element: 'session-id' }, async ($, e, next) => {
40 if (e.data === 'enter' || e.data === 'leave') {
41 // The hover redraws the id (its underline turns blue) at this very moment, and bytes written to the tty mid-frame
42 // garble the screen, so let that redraw finish first. The last hover wins; a quick enter-leave writes nothing.
43 wantedPointer = e.data === 'enter' ? 'pointer' : 'default'
44 await $.clock.sleep(100)
45 if (wantedPointer !== sentPointer) {
46 sentPointer = wantedPointer
47 const to = await ttyOf($)
48 if (to) await $.process.run(['sh', '-c', SET_POINTER, 'sh', sentPointer, to])
49 }
50 return next(e)
51 }
52 const id = await $.session.id()
53 const text = e.data === 'copy-command' ? `claude --resume ${id}` : id
54 const { isCopied } = await $.ui.copy({ text, surface: e.surface })
55 if (isCopied) {
56 await update($, copied, () => true)
57 $.clock.after(1500, () => update($, copied, () => false))
58 }
59 return next(e)
60 })
61}
62hooks/sid.tsx 19 lines1import type { ClientModule } from 'claude-code'
2
3// Drawn by the surface itself, so it keeps its own colors and isn't inverted on hover like a Button.
4const SessionId: ClientModule<{ id: string; copied: boolean }, boolean> = ({ id, copied }, surface) => {
5 const { Text } = surface.elements
6 surface.onPointer(ev => {
7 if (ev.type === 'enter' || ev.type === 'leave') {
8 surface.setState(ev.type === 'enter')
9 surface.post(ev.type)
10 }
11 // Ctrl-click copies the whole resume command; macOS terminals may report it as a right click.
12 if (ev.type === 'up') surface.post(ev.ctrl || ev.button === 'right' ? 'copy-command' : 'copy')
13 })
14 return copied
15 ? <Text color="green">✓ Copied</Text>
16 : <Text>🏷️ <Text color={surface.state ? 'blue' : undefined} underline>{id}</Text></Text>
17}
18export default SessionId
19types/index.d.ts 8 lines1export type Copied = boolean
2
3declare module 'claude-code' {
4 interface PluginState {
5 'session-id': { copied: Copied }
6 }
7}
8