SLOPSHOPPER

my-mod

One sentence: what the mod does and how you use it.

newcommand
v0.1.0MITupdated 2026-10-07vynnlee/mods/.template
A shopper browsing a rack in a slop shop
Preview · a replayed session in a sandbox
claude · ~/work/app · my-mod
› 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 › /my-mod ⎿ my-mod: Hello. This session has run /my-mod 1 times. ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── › ? for shortcuts
README

my-mod

One sentence: what the mod does and how you use it.

Install

Requires Claude Code 2.1.287 or later.

claude plugin marketplace add vynnlee/mods
claude plugin install my-mod@vynnlee

Usage

ToDo
Say hello/my-mod

Settings

/plugin configure my-mod@vynnlee

SettingDefaultValues
languageenen, ko (Korean)

What it touches

Hookssession.start, command.run (my-mod)
Calls$.command.register, $.state.get, $.state.set

No network requests, no processes, no files.

License

MIT

Source 3 files
hooks/register.tsx 22 lines
1// my-mod: replace this with what the mod does and how it is used.
2import { atom, update } from 'claude-code'
3import type { Register } from 'claude-code'
4import { text, type Lang } from './text'
5
6const runs = atom({ plugin: 'my-mod', key: 'runs' } as const, 0)
7
8export const register: Register = (on, options) => {
9  const lang: Lang = options.language === 'ko' ? 'ko' : 'en'
10  const t = text[lang]
11
12  on('session.start', async ($, e, next) => {
13    await $.command.register({ name: 'my-mod', description: t.cmd })
14    return next(e)
15  })
16
17  on('command.run', { command: 'my-mod' }, async ($) => {
18    const n = await update($, runs, v => v + 1)
19    return { text: t.hello(n) }
20  })
21}
22
hooks/text.ts 14 lines
1// The pure part of the mod: logic and every message in both languages. Tested in text.test.ts.
2export type Lang = 'en' | 'ko'
3
4export const text = {
5  en: {
6    cmd: 'Say hello',
7    hello: (n: number) => `Hello. This session has run /my-mod ${n} times.`,
8  },
9  ko: {
10    cmd: '인사하기',
11    hello: (n: number) => `안녕하세요. 이 세션에서 /my-mod 를 ${n}번 실행했습니다.`,
12  },
13} satisfies Record<Lang, Record<string, unknown>>
14
types/index.d.ts 8 lines
1export type Runs = number
2
3declare module 'claude-code' {
4  interface PluginState {
5    'my-mod': { runs: Runs }
6  }
7}
8