Replaces the 'Brewed for 34s' line with a details toggle that folds the turn's duration, tools and model open in place.

Personal Claude Code mods for a calmer, more readable terminal.
| Mod | What it does |
|---|---|
readable-width | Draws each piece of a reply in a grey rounded card, as wide as its longest line and wrapped at 80 columns; tables and code blocks that name a language keep the full width; an unlabelled or text block wraps like prose. Your prompts are bold and accent-colored, in a rounded accent-colored bubble as wide as their longest line, with a blank line above each message. |
usage-meters | The bottom of the band above the prompt, under the other mods' buttons: ctx, 5h and 7d meters in one rounded frame. Each bar runs teal to green to yellow to red along its length, so a fuller bar reaches warmer colors; 5h and 7d also show the time left until they reset (2h 16m, 3d 4h). The pointer on a meter shows a card over the buttons: the context's tokens and the session's cost, or when a limit resets (today 18:00, Fri 16:00). |
tool-log | Folds tool calls and their results in the chat into a ◆ N tools line, one per run of calls with no text between them, and keeps them in a side log grouped by prompt. Toggle it with the framed ☰ panel button, /panel or a key bound to app:toggleDiffPreSession (ctrl+t in ~/.claude/keybindings.json, see below; this replaces the built-in todo list toggle); a click on a chat line opens it on that prompt's steps, until the next prompt or ✕ returns it to live. The chat line also sums file changes and failures (◆ 6 tools · 2 files changed +14 −3 · 1 failed). A turn longer than 30 s ends with a desktop notification. Successful Bash rows expand to show their command, and Edit/Write rows to show their diff. Inside a git repo a framed ± diff button opens the built-in /diff panel. The panel has three tabs: Log, Files (every file changed this session with its diff, new files included) and Agents (subagents with status, time, tool count and their latest step); ☰ panel reopens it on the tab last in view. The active tab is orange, a tab with something new since you last looked is bright, the rest are dim. Replaces the spinner with a minimal one that names the current step, e.g. ⠋ 12s · Reading register.tsx or ⠙ 3s · Thinking. |
turn-details | Replaces the Brewed for 34s · done 1:09 PM line with ◆ details ▸, which folds the turn's duration, finish time, tool calls and model open in place. |
ask-mode | A read-only mode for when you want an answer, not changes. Beside the panel button, a framed quick │ ask │ deep switch: a click picks a level, a click on the active one turns it off; /quick, /ask and /deep do the same, /ask off leaves any. While on, the frame and the level are yellow beside a 🔒, every prompt carries a brief to answer and report, and every call that may change something is refused, in subagents too: Edit, Write, Bash commands off a read-only list (ls, cat, rg, git log/diff/status/show, gh pr view…; redirects and command substitution included), MCP tools whose name does not read (send, create, update…). quick answers briefly on Haiku 5.5 at low effort, ask investigates on your model, deep analyzes at max effort on Opus. It stays on until you turn it off; a new session starts with it off. |
From GitHub:
claude plugin marketplace add Tvrtk0/claude-code-mods
claude plugin install readable-width@local-mods
claude plugin install usage-meters@local-mods
claude plugin install tool-log@local-mods
claude plugin install turn-details@local-mods
claude plugin install ask-mode@local-mods
From a local clone (edits apply after /reload-plugins, no reinstall):
claude plugin marketplace add ~/.claude/mods
claude plugin install readable-width@local-mods
claude plugin install usage-meters@local-mods
claude plugin install tool-log@local-mods
claude plugin install turn-details@local-mods
claude plugin install ask-mode@local-mods
Installed from a local clone, plugins are read straight from the folder.
claude plugin validate ~/.claude/mods/<mod>
claude plugin test ~/.claude/mods/<mod>
A mod cannot add a key of its own, so the ⌃T hint beside ☰ panel borrows an engine action that only the /diff panel handles. Bind any key to it:
{
"$schema": "https://www.schemastore.org/claude-code-keybindings.json",
"bindings": [
{ "context": "Global", "bindings": { "ctrl+t": "app:toggleDiffPreSession" } }
]
}
ctrl+t hands the panel the keyboard (opening it if needed) and closes it when it already has it. Inside: h/l or 1–3 switch tabs, j/k move between rows (starting from the newest), enter opens one, d/u scroll half a window, g/b jump to the first or last row, esc returns to the prompt and leaves the panel open. The panel scrolls itself, so its tabs and keys stay at the top; Bottom is b, not G: a button hotkey cannot tell shift+g from g.
hooks/register.tsx 124 lines1import { atom, read, update } from 'claude-code'
2import type { Register } from 'claude-code'
3
4import type { TurnRecord } from '../types'
5
6const turns = atom({ plugin: 'turn-details', key: 'turns' } as const, {})
7const expanded = atom({ plugin: 'turn-details', key: 'expanded' } as const, [])
8
9// The label: the band's grey.
10const LABEL = '#9a9a9a'
11
12const pad = (n: number) => String(n).padStart(2, '0')
13
14const clockTime = (ms: number) => {
15 const d = new Date(ms)
16
17 return `${pad(d.getHours())}:${pad(d.getMinutes())}`
18}
19
20const duration = (ms: number) => {
21 const s = Math.round(ms / 1000)
22
23 return s < 60 ? `${s}s` : `${Math.floor(s / 60)}m ${s % 60}s`
24}
25
26// TurnDuration carries no turn id, only the duration it formats, which is the
27// one turn.complete reported: that is the key a row finds its turn by.
28const keyOf = (durationMs: number) => String(durationMs)
29
30export const register: Register = on => {
31 let tools: Record<string, number> = {}
32
33 on('turn.start', ($, e, next) => {
34 tools = {}
35
36 return next(e)
37 })
38
39 on('tool.call', ($, e, next) => {
40 tools = { ...tools, [e.tool]: (tools[e.tool] ?? 0) + 1 }
41
42 return next(e)
43 })
44
45 on('turn.complete', async ($, e, next) => {
46 const done = await next(e)
47 const turn: TurnRecord = {
48 durationMs: e.durationMs,
49 endedAt: await $.clock.now(),
50 model: e.usage?.model,
51 tools,
52 }
53 await update($, turns, all => {
54 const kept = Object.entries(all ?? {}).slice(-199)
55
56 return { ...Object.fromEntries(kept), [keyOf(e.durationMs)]: turn }
57 })
58
59 return done
60 })
61
62 // The duration line becomes one pressable '📋 details' that folds the
63 // turn's details open right beneath it, in the chat.
64 on('ui.render', { component: 'TurnDuration' }, async ($, e, next) => {
65 const key = keyOf(e.props.durationMs)
66 const turn = (await read($, turns))[key]
67
68 if (turn === undefined) {
69 return next(e)
70 }
71
72 const { Box, Button, Text } = $.ui.resolve(e)
73 const isOpen = (await read($, expanded)).includes(key)
74
75 const used = Object.entries(turn.tools).sort((a, b) => b[1] - a[1])
76 const total = used.reduce((sum, [, n]) => sum + n, 0)
77 const row = (label: string, value: string) => (
78 <Box>
79 <Box width={14} flexShrink={0}>
80 <Text dimColor>{label}</Text>
81 </Box>
82 <Text>{value}</Text>
83 </Box>
84 )
85
86 // An accent diamond marks the toggle; the details fold open beneath it,
87 // in line with its label.
88 return (
89 <Box key="details-card" marginY={1} flexDirection="column">
90 <Box>
91 <Text color="claude">◆ </Text>
92 <Button
93 key="details"
94 plain
95 hover={{ color: 'white' }}
96 onPress={() =>
97 update($, expanded, keys =>
98 (keys ?? []).includes(key)
99 ? (keys ?? []).filter(k => k !== key)
100 : [...(keys ?? []), key].slice(-100),
101 )
102 }
103 >
104 <Text color={LABEL}>details {isOpen ? '▾' : '▸'}</Text>
105 </Button>
106 </Box>
107 {isOpen && (
108 <Box flexDirection="column" marginTop={1} marginLeft={2}>
109 {row('duration', duration(turn.durationMs))}
110 {row('finished', clockTime(turn.endedAt))}
111 {row(
112 'tool calls',
113 total === 0
114 ? 'none'
115 : `${total} (${used.map(([tool, n]) => `${tool} ${n}`).join(', ')})`,
116 )}
117 {turn.model !== undefined && row('model', turn.model)}
118 </Box>
119 )}
120 </Box>
121 )
122 })
123}
124types/index.d.ts 16 lines1export type TurnRecord = {
2 durationMs: number
3 endedAt: number
4 model?: string
5 tools: Record<string, number>
6}
7
8declare module 'claude-code' {
9 interface PluginState {
10 'turn-details': {
11 turns: Record<string, TurnRecord>
12 expanded: string[]
13 }
14 }
15}
16