SLOPSHOPPER

turn-band

Dim band above the prompt showing the last turn's duration and tool-call count.

newbandguardprompt
v0.1.0MITupdated 2026-10-06nankris/claude-code-mods/turn-band
A shopper browsing a rack in a slop shop
Preview · a replayed session in a sandbox
claude · ~/work/app · turn-band
› fix the failing auth test and add an audit log call ⏺ Read(src/auth.ts) ⎿ Read 6 lines ⏺ Update(src/auth.ts) ⎿ Added 2 lines, removed 1 line ⏺ Bash(bun test) ⎿ 3 pass, 1 fail ● Done. refresh now rejects expired claims and logs an audit event. ✻ Worked for 42s · done 4:20 PM Last turn: 42s, 9 tool calls ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── › ? for shortcuts

Draws

Band
Last turn: 42s, 9 tool calls
README

claude-code-mods

Three small Claude Code mods. A mod is a plugin made of function hooks that runs inside a Claude Code session and can draw a band above the prompt, a side pane, or a status-line note.

ModWhat it does
turn-bandA dim line above the prompt after each reply: Last turn: 5s, 1 tool calls.
tool-callsType /tool-calls to open a side pane listing tool calls as they run (runs) and finish (done). Keeps the last 200.
bash-watchShows failed: <command> in the status line when a Bash command fails, and clears it on the next success.

Install once (all sessions)

claude plugin marketplace add nankris/claude-code-mods
claude plugin install turn-band@claude-code-mods
claude plugin install tool-calls@claude-code-mods
claude plugin install bash-watch@claude-code-mods

Check with claude plugin list. Switch one off with claude plugin disable turn-band.

Try one for a single session

Clone the repo, then point Claude Code at a mod folder:

claude --plugin-dir /path/to/claude-code-mods/turn-band

Repeat the flag to load several mods at once.

Check and test

claude plugin validate ./turn-band
claude plugin test ./turn-band

Each mod folder holds .claude-plugin/plugin.json, hooks/hooks.json, hooks/register.tsx and a hooks/register.test.ts. turn-band and tool-calls also have types/index.d.ts, which declares the state they keep.

Limits

  • Mods only draw inside Claude Code (a terminal, or the desktop app's Code tab). They do not appear in the regular Chat or Cowork views.
  • Install commands like /plugin install are typed in a terminal session.
  • Mods run inside the Claude Code process. Read the source of any mod, including these, before installing it.

License

MIT. See LICENSE.

Source 2 files
hooks/register.tsx 49 lines
1import { atom, read, update } from 'claude-code'
2import type { Register } from 'claude-code'
3
4import type { Turn } from '../types'
5
6const last = atom({ plugin: 'turn-band', key: 'last' } as const, null)
7
8export const register: Register = on => {
9  let tools = 0
10
11  on('prompt.submit', ($, e, next) => {
12    tools = 0
13
14    return next(e)
15  })
16
17  on('tool.call', ($, e, next) => {
18    tools += 1
19
20    return next(e)
21  })
22
23  on('turn.complete', async ($, e, next) => {
24    const seconds = Math.round(e.durationMs / 1000)
25    const turn: Turn = { seconds, tools }
26    await update($, last, () => turn)
27
28    return next(e)
29  })
30
31  on('ui.render', { component: 'AbovePrompt' }, async ($, e, next) => {
32    const turn = await read($, last)
33
34    if (e.props.hasSurvey || turn === null) {
35      return next(e)
36    }
37
38    const { Box, Text } = $.ui.resolve(e)
39
40    return (
41      <Box>
42        <Text dimColor>
43          Last turn: {turn.seconds}s, {turn.tools} tool calls
44        </Text>
45      </Box>
46    )
47  })
48}
49
types/index.d.ts 8 lines
1export type Turn = { seconds: number; tools: number }
2
3declare module 'claude-code' {
4  interface PluginState {
5    'turn-band': { last: Turn | null }
6  }
7}
8