SLOPSHOPPER

hello-mod

Demo: turn band, rm -rf guard, /hi command

newguardcommandtoastprompt
v0.1.0MITupdated 2026-10-26Ishu-dev/claude-code-mods/mods/hello-mod
A shopper browsing a rack in a slop shop
Preview · a replayed session in a sandbox
claude · ~/work/app · hello-mod
› fix the failing auth test and add an audit log call ╭────────────────────────────╮ │ hello-mod │ ⏺ Read(src/auth.ts) │ hello-mod: turn done in 0s │ ⎿ Read 6 lines ╰────────────────────────────╯ ⏺ Update(src/auth.ts) ⎿ Added 2 lines, removed 1 line ⏺ Bash(rm -rf build && git push --force origin main) ⎿ Denied by hello-mod: hello-mod blocked this: "rm -rf" is not allowed in this session. ● Done. refresh now rejects expired claims and logs an audit event. ✻ Worked for 42s · done 4:20 PM › /hi ⎿ hello-mod: Hi Ishu. This reply came from hello-mod code, not from Claude. Tool calls so far this turn: 9. ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── › ? for shortcuts
README

Claude Code mods

Thirteen mods I wrote for Claude Code in October 2026, the week mods were announced. A mod is a plugin of TypeScript hooks that runs inside Claude Code: it can draw panes and bands in the terminal, add slash commands, give Claude new tools, and block or react to tool calls. I built these to see how far the system goes, and a few of them I now use every day.

The one I use most is interview-coach: it asks a placement interview question aloud, records my spoken answer, transcribes it on the Mac with Whisper, and scores pace, filler words and structure against my own CV stories.

The mods

ModHow you use itWhat it does
interview-coach/coachSpoken mock interview in a side pane. Asks a question aloud, records from the mic, transcribes locally (Whisper large-v3-turbo via whisper.cpp), then shows speaking time against the target, words per minute, filler words, time spent on each step of the answer framework, and two stronger example answers drawn from your profile. Keeps a WPM trend across sessions.
nihongo/nihongoJapanese tutor pane: kana drill that weights look-alike pairs and brings misses back sooner, 44 N5 word cards, and a sentence builder where Claude Haiku sets a line from the week's grammar and corrects your kana answer. A word band above the prompt shows a new word each turn.
joka-pond/pondAnimated ASCII pond that earns XP for every tool Claude uses and climbs a consulting ladder from Intern to Managing Partner. Storms when a tool fails, keeps a daily streak.
aurora/visuals, /auroraTruecolor pixel art: an aurora band above the prompt whose colours follow the time of day, plus a gallery (plasma, ocean sunset, warp, a 4-4-6 breathing lotus).
avatar/buddyA pixel companion docked beside the chat. Its mood follows Claude: thinking, happy after a reply, worried after a failure, sleepy after midnight.
chartClaude calls itGives Claude a tool that draws bar, line, area and donut charts inline in the chat, with axes, labels and legends.
heatmapClaude calls itInline truecolor heatmaps with heat, green and diverging palettes.
diagramClaude calls itFlowcharts drawn in the terminal: coloured boxes by role, laid out top to bottom with labelled arrows.
animateClaude calls itPlays short truecolor animations (fireworks, rain, aurora and others) inside a chat row at about 15 fps.
pixelClaude calls itDraws a pixel-art image in the chat from a JSON grid of colours.
change-ledger/changesPane listing every file Claude created or edited this session.
em-dash-guardautomaticBlocks any write or edit that adds an em dash, my house style for documents.
hello-mod/hiStarter mod: an instant reply with no model call, a guard that blocks rm -rf, and a toast at the end of each turn.

statusline/statusline-command.sh is my status line: model, effort, context used, 5-hour and weekly usage with time left, folder and git branch, colour-coded green, yellow and red.

Try one

claude --plugin-dir ./mods/chart

Pass --plugin-dir once per mod you want. claude plugin validate ./mods/chart checks a mod before loading it.

interview-coach needs ffmpeg, whisper-cpp (brew install ffmpeg whisper-cpp) and a Whisper model file. Set the paths at the top of mods/interview-coach/hooks/register.tsx, and copy profile.example.md to the profile path with your own experiences.

What I learned building them

  • The $ context object can't be stored or passed around. Long-running work has to start from a worker in session.start; buttons only queue jobs for it.
  • Redrawing a pane on a timer rebuilds its buttons and swallows clicks. Animations repaint pixels with $.ui.blit instead.
  • A tool registered in session.start becomes callable only from the next prompt.
  • Plugin tool results must be strings, so structured results go back as JSON text.
  • ffmpeg's -progress flag must come before -i, or progress output never arrives.
Source 2 files
hooks/register.tsx 51 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: 'hello-mod', key: 'last' } as const, null)
7const isHidden = atom({ plugin: 'hello-mod', key: 'isHidden' } as const, false)
8
9export const register: Register = on => {
10  let startedAt = 0
11  let tools = 0
12
13  // 1. Instant slash command: answered by code, no Claude turn
14  on('session.start', async ($, e, next) => {
15    await $.command.register({ name: 'hi', description: 'hello-mod: instant reply, no Claude turn' })
16    return next(e)
17  })
18
19  on('command.run', { command: 'hi' }, async () => ({
20    text: `Hi Ishu. This reply came from hello-mod code, not from Claude. Tool calls so far this turn: ${tools}.`,
21  }))
22
23  // 2. Guard: block destructive Bash before it runs
24  on('tool.call', { tool: 'Bash' }, ($, e, next) => {
25    tools += 1
26    return /\brm\s+-rf\b/.test(e.command)
27      ? { deny: `hello-mod blocked this: "rm -rf" is not allowed in this session.` }
28      : next(e)
29  })
30
31  on('tool.call', ($, e, next) => {
32    if (e.tool !== 'Bash') tools += 1
33    return next(e)
34  })
35
36  // 3. Band above the prompt: stats of the last turn
37  on('prompt.submit', async ($, e, next) => {
38    startedAt = await $.clock.now()
39    tools = 0
40    return next(e)
41  })
42
43  on('turn.complete', async ($, e, next) => {
44    const seconds = Math.round(((await $.clock.now()) - startedAt) / 1000)
45    const turn: Turn = { seconds, tools }
46    await update($, last, () => turn)
47    $.ui.toast(`hello-mod: turn done in ${seconds}s`)
48    return next(e)
49  })
50}
51
types/index.d.ts 8 lines
1export type Turn = { seconds: number; tools: number }
2
3declare module 'claude-code' {
4  interface PluginState {
5    'hello-mod': { last: Turn | null; isHidden: boolean }
6  }
7}
8