SLOPSHOPPER

prompt-cleanup

Fixes typos in what you type before Claude reads it

newtoastpromptmodel
v0.1.0no licenseupdated 2026-10-10bhargava-gumpula/claude-mods/prompt-cleanup
A shopper browsing a rack in a slop shop
README

claude-mods

Mods for Claude Code (terminal and the desktop Code tab).

ModWhat it does
usage-bandA band above the prompt: 5h and 7d limits as bars with time to reset, session cost with a mood emoji, total session tokens, and a pacing hint
chat-rosterA floating org-chart window for the sidebar group of the chat you're in: the orchestrator on top, the group's chats below, running subagents under their chat. Filled = working, hover a dot for its title, a flash runs along the lines when messages pass. Shown only while Claude is in front; opens when a chat starts
cube/cube, /cube 2, /cube 4: random-state scrambles (the WCA method, via cubing.js)
handoff/handoff [focus]: runs the project's checks, writes the dev log entry and HANDOFF.md update, commits (never pushes), and summarizes
streakYour streak of days in a row using Claude Code in the status line (streak ๐Ÿ”ฅ 3 days); /streak adds your longest streak and total days
prompt-cleanupFixes typos in what you type before Claude reads it (Haiku; skips commands, code and long pastes)
 5h โ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘ 52% (1h 30m)     7d โ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘ 23% (3d 5h)     $1.23   ๐Ÿ’ฉ     6.1M tokens     ๐Ÿ‘Œ on pace

Cost emoji: ๐Ÿ’ฉ $0โ€“$5 ยท ๐Ÿ˜’ >$5 ยท ๐Ÿฅฑ >$10 ยท ๐Ÿ˜ฎโ€๐Ÿ’จ >$25 ยท ๐Ÿซช >$50 ยท ๐Ÿ˜› >$100 ยท ๐Ÿค‘ >$500 ยท ๐Ÿ™€ >$1000. Pacing: ๐Ÿš€ spend freely (under an hour to reset, 70% or less used) ยท ๐Ÿข slow down (15+ points ahead of the clock) ยท ๐Ÿ‘Œ on pace ยท ๐Ÿ›‘ nearly out (90%+).

Needs: python3 (usage-band tokens, chat-roster, streak), Xcode command line tools for swiftc (chat-roster builds its window on first use, macOS only), node and npm (cube installs cubing.js on first use).

Install

In a Claude Code terminal session, one line per mod you want:

/plugin install usage-band --marketplace bhargava-gumpula/claude-mods
/plugin install chat-roster --marketplace bhargava-gumpula/claude-mods
/plugin install cube --marketplace bhargava-gumpula/claude-mods
/plugin install handoff --marketplace bhargava-gumpula/claude-mods
/plugin install prompt-cleanup --marketplace bhargava-gumpula/claude-mods
/plugin install streak --marketplace bhargava-gumpula/claude-mods

Answer y to add the marketplace, then pick the user scope.

Source 1 files
hooks/register.ts 35 lines
1import type { Register } from 'claude-code'
2
3const SYSTEM = `You fix typos and misspellings in a message someone typed to a coding assistant.
4Change only misspelled words and obvious typos. Keep everything else exactly: wording, grammar,
5slang, casing style, punctuation, line breaks, technical terms, code, identifiers, file paths,
6URLs, commands and numbers. Never answer, rephrase or add anything.
7Reply with the corrected message only. If nothing needs fixing, reply with it unchanged.`
8
9// Typed by a person, short enough to be prose, and not a command, shell line or code.
10export const shouldClean = (text: string) =>
11  text.trim().length >= 3 &&
12  text.length <= 1500 &&
13  !/^\s*[/!#]/.test(text) &&
14  !text.includes('```')
15
16// A typo fix keeps the length close; anything else means the model did more than fix typos.
17export const isTypoFix = (before: string, after: string) =>
18  after.length > 0 && Math.abs(after.length - before.length) <= Math.max(6, before.length * 0.15)
19
20export const register: Register = on => {
21  on('prompt.submit', async ($, e, next) => {
22    const isTyped = ['composer', 'bridge', 'sdk'].includes(e.origin.kind)
23    if (!isTyped || !shouldClean(e.text)) return next(e)
24
25    const r = await $.model
26      .complete({ model: 'haiku', system: SYSTEM, prompt: e.text, effort: 'low', timeoutMs: 4000, maxTokens: 1024 })
27      .catch(() => undefined)
28    const fixed = r?.isAnswered ? r.text.trim() : ''
29    if (!isTypoFix(e.text, fixed) || fixed === e.text.trim()) return next(e)
30
31    $.ui.toast('Fixed typos in your prompt')
32    return next({ ...e, text: fixed })
33  })
34}
35