modscode JA

modscode / Gallery / haunted-repo

haunted-repo

Delete a file and its ghost haunts your prompt, whispering fragments of its lost code until you restore it. Seances, exorcisms, poltergeists and secrets.

Code you can checkTerminal + desktopPaneBandStatus lineToastBoxText

What it does

  • Draws a band above the prompt, a pane, the status line, toasts
  • Adds /graveyard, /haunt-demo, /exorcise, /seance
  • Watches tool calls and can refuse them
  • Hooks prompt.submit, session.start, turn.complete
  • Keeps its own state between turns

Good points

  • No network calls
  • Starts no processes
  • Written in TypeScript
  • Writes no files

Code to start from

Two kinds: a starter modscode writes from the design above, and the lines of the mod's own code that draw it.

Starter (register.tsx)

register.tsx
import type { Register } from 'claude-code'

// Drawn like haunted-repo by Jason Plimpton (pane, band, status, toast), as modscode read it from the mod's code:
// https://modscode.com/gallery/choaticpixels-haunted-repo/
// Written by modscode from that reading, not copied from the mod: use it as you like.
// Each value below stands for one the mod works out at run time; put in your own.
export const register: Register = on => {
  // the band above the prompt; what else goes there is drawn under it
  on('ui.render', { component: 'AbovePrompt' }, async ($, e, next) => {
    const { Box, Text } = $.ui.resolve(e)
    const out = '…'
    return (
      <Box flexDirection="column">
        <Box>
          <Text color="red">
            {out}
          </Text>
          <Text dimColor>
            {`  ${out}`}
          </Text>
        </Box>
        <Text italic color="gray">
          {`  ${out}`}
        </Text>
        {await next(e)}
      </Box>
    )
  })

  // the pane: open it with $.ui.open({ id: 'my-pane', title: "⚰️ Graveyard" })
  on('ui.render', { component: 'Pane', requestId: 'my-pane' }, async ($, e) => {
    const { Box, Text } = $.ui.resolve(e)
    const length = '…'
    const rested = '…'
    const line = '…'
    const line2 = '…'
    const line3 = '…'
    const line4 = '…'
    const line5 = '…'
    const line6 = '…'
    const line7 = '…'
    const line8 = '…'
    const line9 = '…'
    const line10 = '…'
    const line11 = '…'
    const line12 = '…'
    const line13 = '…'
    const line14 = '…'
    const line15 = '…'
    const line16 = '…'
    const line17 = '…'
    const line18 = '…'
    const line19 = '…'
    const line20 = '…'
    const line21 = '…'
    const line22 = '…'
    const line23 = '…'
    const line24 = '…'
    const line25 = '…'
    const line26 = '…'
    const line27 = '…'
    return (
      <Box flexDirection="column">
        <Text color="magenta" bold>
          {"⚰️ "}
          {length}
          {" restless · ✨ "}
          {rested}
          {" at peace"}
        </Text>
        <Text dimColor>
          Restore a file to free its ghost · /seance to speak · /exorcise to banish
        </Text>
        <Text>
          {" "}
        </Text>
        <Text dimColor>
          Only fog, and the soft sound of a cursor blinking.
        </Text>
        <Box flexDirection="row">
          <Box flexDirection="column" marginRight={1}>
            <Text color="gray">
              {line}
            </Text>
            <Text color="gray">
              {line2}
            </Text>
            <Text color="gray">
              {line3}
            </Text>
          </Box>
          <Box flexDirection="column" marginRight={1}>
            <Text color="gray">
              {line4}
            </Text>
            <Text color="gray">
              {line5}
            </Text>
            <Text color="gray">
              {line6}
            </Text>
          </Box>
          <Box flexDirection="column" marginRight={1}>
            <Text color="gray">
              {line7}
            </Text>
            <Text color="gray">
              {line8}
            </Text>
            <Text color="gray">
              {line9}
            </Text>
          </Box>
        </Box>
        <Box flexDirection="row">
          <Box flexDirection="column" marginRight={1}>
            <Text color="gray">
              {line10}
            </Text>
            <Text color="gray">
              {line11}
            </Text>
            <Text color="gray">
              {line12}
            </Text>
          </Box>
          <Box flexDirection="column" marginRight={1}>
            <Text color="gray">
              {line13}
            </Text>
            <Text color="gray">
              {line14}
            </Text>
            <Text color="gray">
              {line15}
            </Text>
          </Box>
          <Box flexDirection="column" marginRight={1}>
            <Text color="gray">
              {line16}
            </Text>
            <Text color="gray">
              {line17}
            </Text>
            <Text color="gray">
              {line18}
            </Text>
          </Box>
        </Box>
        <Box flexDirection="row">
          <Box flexDirection="column" marginRight={1}>
            <Text color="gray">
              {line19}
            </Text>
            <Text color="gray">
              {line20}
            </Text>
            <Text color="gray">
              {line21}
            </Text>
          </Box>
          <Box flexDirection="column" marginRight={1}>
            <Text color="gray">
              {line22}
            </Text>
            <Text color="gray">
              {line23}
            </Text>
            <Text color="gray">
              {line24}
            </Text>
          </Box>
          <Box flexDirection="column" marginRight={1}>
            <Text color="gray">
              {line25}
            </Text>
            <Text color="gray">
              {line26}
            </Text>
            <Text color="gray">
              {line27}
            </Text>
          </Box>
        </Box>
      </Box>
    )
  })

  on('session.start', async ($, e, next) => {
    const name = '…'
    const path = '…'
    await $.ui.status(`        🐈‍⬛ `)
    await $.ui.toast(`👻 You cannot kill what is already dead. ${name} laughs at you.`)
    await $.ui.toast(`👻👻👻 "My name is ${name}, for we are many." A horde rises from ${path}`)
    return next(e)
  })
}

The mod's own code

Shown under the mod's licence (MIT); its text is below. Keep the notice if you copy these lines.

plugins/haunted-repo/hooks/register.tsx lines 447–532 · Band
  on('ui.render', { component: 'AbovePrompt' }, async ($, e, next) => {
    if (e.props.hasSurvey) return next(e)
    const list = await read($, ghosts)
    const f = await read($, fx)
    const w = await read($, whisper)
    const t = await read($, frame)
    const time = await timeOf($)
    const now = time.now

    const isPolter = f.poltergeistUntil > now
    const isBusted = f.bustedUntil > now
    const isTrick = f.trickUntil > now
    const isMirror = f.mirrorUntil > now
    const isDance = f.danceUntil > now
    const isCandles = f.candlesUntil > now
    if (list.length === 0 && !isPolter && !isMirror && !isDance && !isCandles && !time.isHalloween) return next(e)

    const { Box, Text } = $.ui.resolve(e)
    const width = Math.max(30, (e.props.bodyColumns ?? 80) - 2)
    const out = (s: string) => (isTrick ? flip(s) : isPolter ? zalgo(s, 1) : s)

    if (isMirror) {
      return (
        <Box flexDirection="column">
          <Text color="red" bold>{'  🪞  ' + '░'.repeat(Math.min(40, width - 8))}</Text>
          <Text color="red">{t % 4 < 2 ? '      she is behind you.' : '      d o n ’ t   t u r n   a r o u n d'}</Text>
        </Box>
      )
    }

    if (isDance) {
      const moves = ['┌(・。・)┘♪', '└(・。・)┐♪', '┌(・o・)┘♫', '└(・o・)┐♫']
      return (
        <Box>
          <Text color="white" bold>{`💀 ${moves[t % 4]}  spooky scary skeletons send shivers down your spine  ${moves[(t + 2) % 4]} 💀`}</Text>
        </Box>
      )
    }

    if (isCandles) {
      const flame = t % 2 ? '🕯️' : '🕯'
      return (
        <Box>
          <Text color="yellow">{`  ${Array.from({ length: Math.max(1, Math.min(list.length || 3, 13)) }, () => flame).join(' ')}   rest in peace`}</Text>
        </Box>
      )
    }

    // The drifting procession: each ghost floats along its own sine wave.
    const track = Math.max(10, Math.min(width - 24, 70))
    const row = Array.from({ length: track }, () => ' ')
    if (!isBusted) {
      list.slice(-6).forEach((g, i) => {
        const phase = (hash(g.id) % 100) / 15
        const x = Math.round(((Math.sin(t / (9 + i * 2) + phase) + 1) / 2) * (track - 2))
        row[Math.min(track - 1, x)] = g.isBound ? '⛓' : g.kind === 'legion' ? '👥' : g.kind === 'wisp' ? '∿' : '👻'
      })
    }
    const pumpkins = time.isHalloween ? (t % 6 < 3 ? '🎃 ' : '🎃 ') : ''
    const header = isBusted
      ? '🚫👻  the ghosts are hiding…'
      : isPolter
        ? `⚡ ${row.join('').replace(/ /g, () => pick([' ', ' ', ' ', '░', '▒']))} ⚡`
        : `${pumpkins}${row.join('')}`
    const count = list.length
    const tag = count === 0 ? (time.isHalloween ? '🎃 happy halloween' : '') : `⚰ ${count}${count >= MAX_GHOSTS ? ' 🕯️ THE CIRCLE IS COMPLETE' : ''}${time.isWitching ? ' · witching hour' : ''}`

    const g = w ? list.find(x => x.id === w.ghostId) : undefined
    const isFresh = w !== null && now - w.at < 9_000 && !isBusted
    const st = g ? strength(g) : 1
    const whisperText = isFresh && w ? `“${fade(w.text, st).slice(0, Math.max(10, width - w.name.length - 12))}” — ${w.name}` : ''

    return (
      <Box flexDirection="column">
        <Box>
          <Text color={isPolter ? 'red' : time.isWitching ? 'magenta' : 'gray'}>{out(header)}</Text>
          <Text dimColor>{'  ' + out(tag)}</Text>
        </Box>
        {whisperText !== '' && (
          <Text italic dimColor={st < 0.5} color={st < 0.25 ? 'gray' : 'cyan'}>
            {'  ' + out(whisperText)}
          </Text>
        )}
      </Box>
    )
  })
plugins/haunted-repo/hooks/register.tsx lines 535–582 · Pane
  on('ui.render', { component: 'Pane', requestId: PANE }, async ($, e) => {
    const { Box, Text } = $.ui.resolve(e)
    const list = await read($, ghosts)
    const rested = Number((await $.store.get('laidToRest')) ?? 0)
    const cols = Math.max(1, Math.floor(((e.props.bodyColumns as number | undefined) ?? 40) / 20))

    const stone = (g: Ghost) => {
      const center = (s: string) => {
        const cut = s.length > 15 ? s.slice(0, 14) + '…' : s
        const pad = 15 - cut.length
        return '│' + ' '.repeat(Math.floor(pad / 2)) + cut + ' '.repeat(Math.ceil(pad / 2)) + '│'
      }
      const d = new Date(g.diedAt)
      const epitaph = EPITAPHS[hash(g.id) % EPITAPHS.length]
      return [
        '  ╭─────────────╮ ',
        center(g.isBound ? '⛓ R.I.P. ⛓' : 'R . I . P .'),
        center(g.name),
        center(g.kind === 'legion' ? `${g.lineCount} souls` : `${g.lineCount} lines`),
        center(`${d.getMonth() + 1}/${d.getDate()}/${d.getFullYear()}`),
        center(epitaph.slice(0, 15)),
        '▁▁│▁▁▁▁▁▁▁▁▁▁▁▁▁│▁▁',
      ]
    }

    const rows: Ghost[][] = []
    for (let i = 0; i < list.length; i += cols) rows.push(list.slice(i, i + cols))

    return (
      <Box flexDirection="column">
        <Text color="magenta" bold>⚰️  {list.length} restless · ✨ {rested} at peace</Text>
        <Text dimColor>Restore a file to free its ghost · /seance to speak · /exorcise to banish</Text>
        <Text> </Text>
        {list.length === 0 && <Text dimColor>Only fog, and the soft sound of a cursor blinking.</Text>}
        {rows.map((r, ri) => (
          <Box key={`row-${ri}`} flexDirection="row">
            {r.map(g => (
              <Box key={g.id} flexDirection="column" marginRight={1}>
                {stone(g).map((line, li) => (
                  <Text key={`${g.id}-${li}`} color={li === 0 || li === 6 ? 'gray' : g.isBound ? 'red' : 'white'}>{line}</Text>
                ))}
              </Box>
            ))}
          </Box>
        ))}
      </Box>
    )
  })
Licence text (MIT)
MIT License

Copyright (c) 2026 Jason Plimpton

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

What its code calls

reads filesdrives Claudetool callsremembers

The design, read from code

Drawn from the mod's source at the commit read, not from a run: a list is drawn three times, a condition takes its first branch that draws in the desktop app, and a value only the run time knows is shown as a made-up sample (dotted underline) or left out. Colours and type are this site's.

What its code shows

Read from the source at commit dae5c615d2f3 on 2026-10-06. The first group decides whether a mod is listed; the rest is for you to weigh. A later commit is not read until the next crawl.

Decides the listing: code you can check
Entry readEvery module hooks/hooks.json names was read.plugins/haunted-repo/hooks/register.tsx
ParsesEvery file parses as TypeScript or JavaScript.1 files parsed
All its code is in the modEvery import is a file of the mod or the engine's own module; no packages, no require.all its code is in the mod
ReadableNo minified lines, no eval or new Function, no import of a computed path, no encoded blobs.no minified code, no eval, no encoded blobs
Calls in the openNetwork and programs are reached as $.http.fetch and $.process.run in place, never passed around.every call outside goes through $ in the open
For you to weigh before installing
Where it drawsThe terminal, the desktop app, both, or nothing (hooks only: a guard or a prompt rewriter), as its code says. Shown, never a reason to leave a mod out.draws in the terminal and the desktop app, the same in both
Install lineWhether its repository's own .claude-plugin/marketplace.json lists it, so it installs from that marketplace with the lines on its page.listed in its repository's .claude-plugin/marketplace.json: installs from there
Programs on WindowsWhether every program it starts through $.process exists on Windows (tail, date, open, osascript, /usr/… do not).runs no program a Windows PC lacks
NetworkWhether every fetch names its https host in the code.no network
ProgramsWhether every program it starts is named in the code and is not a shell, an interpreter or a network tool.starts no programs
Reads and sendsWhether it both reads files or environment variables and reaches the network.reaches no network
Keys in the sourceWhether the source holds what looks like an API key or a private key.no keys in the source
LicenceAn open licence (MIT, Apache-2.0, BSD, ISC, Unlicense, 0BSD, CC0) with its text lets modscode show its code; otherwise the code is linked.MIT

This is a reading of the code text, not a security review: it does not run the mod, and it cannot see what a program the mod starts does. The check before installing is yours. How mods are chosen

Install it

Check it yourself before you install it. Mods run unsandboxed, with your permissions, and modscode does not vouch for what this code does. Read the code below (or run claude plugin validate . in its folder), weigh what it reaches, and install the commit you read.

Its repository is its marketplace. Add that marketplace (in the terminal with these commands, or in the desktop app's plugin settings) and install the mod from it:

/plugin marketplace add choaticpixels/HauntedClaudeMod
/plugin install haunted-repo@claude-mods

This installs the marketplace's latest commit, which may not be the one read here (dae5c615d2f3). Compare them before you install.

Ask Claude about it

With the modscode connector added, Claude can read this design, what its code reaches and its code, and build on them. Ask it like this:

Read the modscode design "choaticpixels-haunted-repo" with its code and make me a pane like it

Search them from Claude: the MCP connector

Similar designs