modscode JA

modscode / Gallery / clawd-sidekick

clawd-sidekick

Clawd's pixel world above your prompt, in four scenes that follow your local time, season and holidays: Clawd walks to the zone of whatever Claude is doing while his crew plays, and acts out what happens: tests, commits, pushes, permission…

Code you can checkTerminal + desktopPaneBandToastBoxButtonSvgText

What it does

  • Draws a band above the prompt, a pane
  • Adds /clawd, /deadline
  • Watches tool calls
  • Hooks classic.Notification, command.describe, session.compact, session.end and 4 more
  • Keeps its own state between turns

Good points

  • No network calls
  • Written in TypeScript
  • Has a desktop-specific branch
  • Handles errors

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 clawd-sidekick by Tunai (pane, band, toast), as modscode read it from the mod's code:
// https://modscode.com/gallery/tunai-0511-clawd-sidekick/
// 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, Button } = $.ui.resolve(e)
    const label = '…'
    const gitLine = '…'
    const map = '…'
    const model = '…'
    const bar = '…'
    const contextPercent = '…'
    const fiveHour = '…'
    const sevenDay = '…'
    const usd = '…'
    const turn = '…'
    const clockText = '…'
    const tools = '…'
    const edited = '…'
    const files = '…'
    const ran = '…'
    const commands = '…'
    const noDeadline = '…'
    const list = '…'
    const pet = '…'
    const scene = '…'
    const otherLanguage = '…'
    const hide = '…'
    return (
      <Box flexDirection="column">
        <Box flexDirection="row" flexWrap="wrap" columnGap={2}>
          <Text color="#D97757" bold wrap="truncate-end">
            {`「${label}」`}
          </Text>
          <Text>
            {gitLine}
          </Text>
          <Text>
            <Text dimColor>
              {`${label} `}
            </Text>
            <Text>
              {map}
            </Text>
          </Text>
          <Text dimColor>
            {model}
          </Text>
          <Text>
            <Text dimColor>
              {`${label} `}
            </Text>
            <Text>
              {`${bar} ${contextPercent}%`}
            </Text>
          </Text>
          <Text>
            <Text dimColor>
              {`${label} `}
            </Text>
            <Text>
              {`${fiveHour}%`}
            </Text>
          </Text>
          <Text>
            <Text dimColor>
              {`${label} `}
            </Text>
            <Text>
              {`${sevenDay}%`}
            </Text>
          </Text>
          <Text>
            <Text dimColor>
              {`${label} `}
            </Text>
            <Text>
              {usd}
            </Text>
          </Text>
          <Text>
            <Text dimColor>
              {`${turn} `}
            </Text>
            {clockText}
            <Text dimColor>
              {` · ${tools} `}
            </Text>
            {tools}
            <Text dimColor>
              {` · ${edited} `}
            </Text>
            {files}
            <Text dimColor>
              {` · ${ran} `}
            </Text>
            {commands}
          </Text>
        </Box>
        <Box flexDirection="row" flexWrap="wrap" columnGap={1}>
          <Text dimColor>
            {noDeadline}
          </Text>
          <Box flexGrow={1} />
          <Button label={`${list}`} hotkey="l" />
          <Button label={`${pet}`} />
          <Button label={`${scene}`} hotkey="s" />
          <Button label={`${otherLanguage}`} />
          <Button label={`${hide}`} plain dimColor />
        </Box>
        {await next(e)}
      </Box>
    )
  })

  // the pane: open it with $.ui.open({ id: 'my-pane', title: "‹paneTitle›" })
  on('ui.render', { component: 'Pane', requestId: 'my-pane' }, async ($, e) => {
    const { Box, Text } = $.ui.resolve(e)
    const changesTitle = '…'
    const changesNone = '…'
    const notARepo = '…'
    const changesFiles = '…'
    const changesThisTurn = '…'
    const relativePath = '…'
    const added = '…'
    const removed = '…'
    const edits = '…'
    const relativePath2 = '…'
    const relativePath3 = '…'
    const changesCommands = '…'
    const text = '…'
    const text2 = '…'
    const text3 = '…'
    return (
      <Box flexDirection="column" gap={1}>
        <Text color="#D97757" bold>
          {`── ${changesTitle} ──`}
        </Text>
        <Text>
          {changesNone}
        </Text>
        <Text dimColor>
          {notARepo}
        </Text>
        <Box flexDirection="column">
          <Text bold>
            {`${changesFiles}  `}
            <Text color="#D97757">
              {changesThisTurn}
            </Text>
          </Text>
          <Box flexDirection="row" gap={1}>
            <Text color="#D97757">
              ●
            </Text>
            <Text wrap="truncate-start">
              {relativePath}
            </Text>
            <Text color="#4CB363">
              new
            </Text>
            <Text color="#4CB363">
              {`+${added}`}
            </Text>
            <Text color="#E5484D">
              {`−${removed}`}
            </Text>
            <Text dimColor>
              {`×${edits}`}
            </Text>
          </Box>
          <Box flexDirection="row" gap={1}>
            <Text color="#D97757">
              ●
            </Text>
            <Text wrap="truncate-start">
              {relativePath2}
            </Text>
            <Text color="#4CB363">
              new
            </Text>
            <Text color="#4CB363">
              {`+${added}`}
            </Text>
            <Text color="#E5484D">
              {`−${removed}`}
            </Text>
            <Text dimColor>
              {`×${edits}`}
            </Text>
          </Box>
          <Box flexDirection="row" gap={1}>
            <Text color="#D97757">
              ●
            </Text>
            <Text wrap="truncate-start">
              {relativePath3}
            </Text>
            <Text color="#4CB363">
              new
            </Text>
            <Text color="#4CB363">
              {`+${added}`}
            </Text>
            <Text color="#E5484D">
              {`−${removed}`}
            </Text>
            <Text dimColor>
              {`×${edits}`}
            </Text>
          </Box>
        </Box>
        <Box flexDirection="column">
          <Text bold>
            {changesCommands}
          </Text>
          <Box flexDirection="row" gap={1}>
            <Text color="#D97757">
              ●
            </Text>
            <Text color="#4CB363">
              ✓
            </Text>
            <Text wrap="truncate-end">
              {text}
            </Text>
          </Box>
          <Box flexDirection="row" gap={1}>
            <Text color="#D97757">
              ●
            </Text>
            <Text color="#4CB363">
              ✓
            </Text>
            <Text wrap="truncate-end">
              {text2}
            </Text>
          </Box>
          <Box flexDirection="row" gap={1}>
            <Text color="#D97757">
              ●
            </Text>
            <Text color="#4CB363">
              ✓
            </Text>
            <Text wrap="truncate-end">
              {text3}
            </Text>
          </Box>
        </Box>
      </Box>
    )
  })
}

The mod's own code

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

hooks/register.tsx lines 895–1054 · Band
  on('ui.render', { component: 'AbovePrompt' }, async ($, e, next) => {
    if (e.props.hasSurvey) return next(e)
    const [doing, deadlines, isCollapsed, actors, usage, game, offset, talk, theme, zone, seasonPick, holidayPick, trophies, neighbors, egg, birthday, names, git] = await Promise.all([
      read($, activity),
      read($, deadlinesAtom),
      read($, collapsedAtom),
      read($, actorsAtom),
      read($, usageAtom),
      read($, gameAtom),
      read($, offsetAtom),
      read($, langAtom),
      read($, themeAtom),
      read($, zoneAtom),
      read($, seasonPickAtom),
      read($, holidayPickAtom),
      read($, trophiesAtom),
      read($, neighborsAtom),
      read($, eggAtom),
      read($, birthdayAtom),
      read($, namesAtom),
      read($, gitAtom),
      read($, nowAtom),
    ])
    const w = say(talk)
    const now = await $.clock.now()
    const ahead = deadlines.filter(d => d.due > now - 86_400_000)
    const nearest = ahead[0]
    const { Box, Text, Button } = $.ui.resolve(e)
    const width = e.props.bodyColumns

    // The terminal folds the band when the house cannot fit; the desktop scales it instead.
    const isCramped = e.surface === 'terminal' && (width < 70 || e.props.maxRows < SH / 2 + 3)
    const main = actors.find(a => a.cap === null)
    const langButton = <Button key="lang" label={w.otherLanguage} onPress={() => setLang($, talk === 'zh' ? 'en' : 'zh')} />
    if (isCollapsed || isCramped) {
      const now_ = doing.label && doing.label !== w.sleepy ? doing.label : w.doings[main?.doing ?? 'idle']
      const summary = [`${names.main ?? 'Clawd'} · ${now_}`]
      if (nearest !== undefined) summary.push(w.due(nearest.title, countdown(nearest.due, now, talk)))
      let face: RenderElement
      if (e.surface === 'terminal') {
        face = <Text color={ORANGE}>▐▛███▜▌</Text>
      } else {
        const { Svg } = $.ui.resolve(e)
        face = <Svg source={miniClawdSvg(main?.doing ?? 'idle')} alt="Clawd" width={36} height={24} />
      }
      return (
        <Box flexDirection="row" gap={1} alignItems="center">
          {face}
          <Text wrap="truncate-end">{summary.join(' · ')}</Text>
          <Box flexGrow={1} />
          {isCollapsed ? <Button key="expand" label={w.expand} variant="primary" onPress={() => setCollapsed($, false)} /> : null}
          {e.surface === 'terminal' ? null : langButton}
        </Box>
      )
    }

    const holiday = holidayPick !== 'auto' ? holidayPick : holidayOf(now, offset)
    const scene: SceneProps = {
      actors,
      // The board pins every deadline ahead, nearest first; the hour is fine enough.
      notes: ahead.slice(0, 8).map(d => ({ text: `${d.title} · ${countdown(d.due, now, talk, true)}`, urgency: urgency(d.due, now) })),
      days: nearest === undefined ? null : Math.max(0, Math.floor((nearest.due - now) / 86_400_000)),
      urgency: nearest === undefined ? 'none' : urgency(nearest.due, now),
      game,
      time: timeOfDay(now, offset),
      // To the hour only: a minute's change would redraw the desktop house and start its loops over.
      deadline: nearest === undefined ? '' : `${nearest.title} · ${formatDue(nearest.due, offset)} · ${countdown(nearest.due, now, talk, true)}`,
      lang: talk,
      theme,
      memory: usage.contextPercent === null ? null : Math.min(10, Math.floor(usage.contextPercent / 10)),
      isTired: (usage.fiveHour ?? 0) >= 80,
      season: seasonPick !== 'auto' ? seasonPick : seasonOf(now, offset, zone),
      holiday,
      medals: medalsOf(trophies.unlocked),
      trophyCount: [Object.keys(trophies.unlocked).length, TROPHY_TOTAL],
      // A holiday's hat stands in for the trophy hat, unless one was picked by hand.
      hat: trophies.hat === 'auto' && (holiday === 'christmas' || holiday === 'halloween') ? null : hatFor(trophies),
      pal: palFor(trophies),
      golden: goldenOf(trophies.unlocked),
      egg,
      isBirthday: birthday !== '' && monthDay(now, offset) === birthday,
      names,
    }
    let house: RenderElement
    if (e.surface === 'terminal') {
      const { Client } = $.ui.resolve(e)
      house = <Client key="house" module="./scene-client.tsx" props={scene} width="100%" height={SH / 2 + 1} />
    } else {
      const { Svg } = $.ui.resolve(e)
      const frame = Math.round(width * CELL_PX)
      house = (
        <Svg
          source={sceneSvg(scene, now)}
          alt={w.houseAlt(doing.label || w.readingInLibrary)}
          isInteractive
          width={frame}
          height={Math.round((frame * SH) / SW)}
        />
      )
    }

    const level = (percent: number | null): string | undefined =>
      percent === null ? undefined : percent >= 80 ? '#E5484D' : percent >= 50 ? '#F5C542' : '#4CB363'
    const bar = (percent: number): string => {
      const filled = Math.round(percent / 20)
      return '▰'.repeat(filled) + '▱'.repeat(5 - filled)
    }
    const elapsed = isWorking ? now - usage.turnStartedAt : lastTurnMs
    const clockText = `${Math.floor(elapsed / 60_000)}:${String(Math.floor((elapsed % 60_000) / 1000)).padStart(2, '0')}`
    const stat = (label: string, value: string, color?: string): RenderElement => (
      <Text>
        <Text dimColor>{`${label} `}</Text>
        <Text color={color}>{value}</Text>
      </Text>
    )

    return (
      <Box flexDirection="column">
        {house}
        <Box flexDirection="row" flexWrap="wrap" columnGap={2}>
          <Text color={ORANGE} bold wrap="truncate-end">
            {`「${doing.label || (isWorking ? w.thinking : w.hello)}」`}
          </Text>
          {git === null ? null : (
            <Text color={gitColor(git, dirtySince, now)} dimColor={gitColor(git, dirtySince, now) === undefined}>
              {w.gitLine(git.branch, git.ahead, git.behind, git.changed + git.untracked)}
            </Text>
          )}
          {neighbors.length === 0 ? null : stat(w.neighborsLabel, neighbors.map(n => n.project).join(talk === 'zh' ? '、' : ', '))}
          {usage.model ? <Text dimColor>{usage.model}</Text> : null}
          {usage.contextPercent === null ? null : stat('ctx', `${bar(usage.contextPercent)} ${Math.round(usage.contextPercent)}%`, level(usage.contextPercent))}
          {usage.fiveHour === null ? null : stat('5h', `${Math.round(usage.fiveHour)}%`, level(usage.fiveHour))}
          {usage.sevenDay === null ? null : stat('7d', `${Math.round(usage.sevenDay)}%`, level(usage.sevenDay))}
          {usage.usd === null ? null : stat('$', usage.usd.toFixed(2))}
          {/* One group, so it reads as one thing: how long Claude has been on your latest message (or took on the last), and what it did there. */}
          <Text>
            <Text dimColor>{`${isWorking ? w.turn : w.lastTurn} `}</Text>
            {clockText}
            <Text dimColor>{` · ${w.tools} `}</Text>
            {String(usage.tools)}
            <Text dimColor>{` · ${w.edited} `}</Text>
            {w.files(usage.edits)}
            <Text dimColor>{` · ${w.ran} `}</Text>
            {w.commands(usage.runs)}
          </Text>
        </Box>
        <Box flexDirection="row" flexWrap="wrap" columnGap={1}>
          {nearest === undefined ? <Text dimColor>{w.noDeadline}</Text> : (
            <Text color={URGENCY_COLOR[urgency(nearest.due, now)]} wrap="truncate-end">
              {` ${w.due(clip(nearest.title, 10), countdown(nearest.due, now, talk))}`}
            </Text>
          )}
          <Box flexGrow={1} />
          <Button key="panel" label={w.list} hotkey="l" onPress={() => $.ui.open({ id: PANE, title: w.paneTitle })} />
          {e.surface === 'terminal' ? null : <Button key="pet" label={w.pet} onPress={() => onPet($, 'main')} />}
          <Button key="scene" label={w.scene(w.themes[theme])} hotkey="s" onPress={() => setTheme($, 'next')} />
          {langButton}
          <Button key="hide" label={w.hide} plain dimColor onPress={() => setCollapsed($, true)} />
        </Box>
      </Box>
hooks/register.tsx lines 1258–1298 · Pane
  on('ui.render', { component: 'Pane', requestId: CHANGES_PANE }, async ($, e) => {
    const [talk, changes, git] = await Promise.all([read($, langAtom), read($, changesAtom), read($, gitAtom)])
    const root = await $.session.root()
    const w = say(talk)
    const { Box, Text } = $.ui.resolve(e)
    const sum = totals(changes)
    return (
      <Box flexDirection="column" gap={1}>
        <Text color={ORANGE} bold>{`── ${w.changesTitle} ──`}</Text>
        <Text>{sum.files + sum.commands === 0 ? w.changesNone : w.changesSummary(sum.files, sum.added, sum.removed, sum.commands, sum.failed)}</Text>
        <Text dimColor>{git === null ? w.notARepo : w.gitLine(git.branch, git.ahead, git.behind, git.changed + git.untracked)}</Text>
        {changes.files.length === 0 ? null : (
          <Box flexDirection="column">
            <Text bold>{`${w.changesFiles}  `}<Text color={ORANGE}>{w.changesThisTurn}</Text></Text>
            {changes.files.map(f => (
              <Box key={f.path} flexDirection="row" gap={1}>
                <Text color={ORANGE}>{f.turn === changes.turn ? '●' : ' '}</Text>
                <Text wrap="truncate-start">{relativePath(f.path, root)}</Text>
                {f.isNew ? <Text color="#4CB363">new</Text> : null}
                <Text color="#4CB363">{`+${f.added}`}</Text>
                <Text color="#E5484D">{`−${f.removed}`}</Text>
                <Text dimColor>{`×${f.edits}`}</Text>
              </Box>
            ))}
          </Box>
        )}
        {changes.commands.length === 0 ? null : (
          <Box flexDirection="column">
            <Text bold>{w.changesCommands}</Text>
            {changes.commands.slice(0, 15).map((c, i) => (
              <Box key={`cmd-${i}`} flexDirection="row" gap={1}>
                <Text color={ORANGE}>{c.turn === changes.turn ? '●' : ' '}</Text>
                <Text color={c.isOk ? '#4CB363' : '#E5484D'}>{c.isOk ? '✓' : '✗'}</Text>
                <Text wrap="truncate-end">{c.text}</Text>
              </Box>
            ))}
          </Box>
        )}
      </Box>
    )
  })
Licence text (MIT)
MIT License

Copyright (c) 2026 Tunai

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

runs programsreads filesenv varstool callsremembers

What its code shows

Read from the source at commit 95f98a651fe1 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.hooks/register.tsx
ParsesEvery file parses as TypeScript or JavaScript.19 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, with its own branch for the desktop
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).hooks/register.tsx:851 /usr/bin/defaults (not on Windows); hooks/register.tsx:1462 /bin/date (not on Windows)
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.readlink, git (reaches the network), /usr/bin/defaults, /bin/date
Reads and sendsWhether it both reads files or environment variables and reaches the network.reads environment variables and files and reaches the 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 Tunai-0511/clawd-sidekick
/plugin install clawd-sidekick@clawd-sidekick

This installs the marketplace's latest commit, which may not be the one read here (95f98a651fe1). 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 "tunai-0511-clawd-sidekick" with its code and make me a pane like it

Search them from Claude: the MCP connector

Similar designs