Ranking|Claude Code Mods

ModsCode / Claude Code Mods / Ranking / dash

dash

The session's dashboard in one pane, opened by /dash: the model, the effort and presets that set both, ultracode and fast mode, each switched with one click; the context and quota gauges, the cost and the duration, /compact behind a confir…

Code you can checkTerminal + desktopPaneBandToastBoxButtonInputSelectSvgText
reads files, env vars, draws

What it does

  • Draws a band above the prompt, a pane
  • Adds /rename, /fast
  • Watches Workflow calls and can refuse them
  • Hooks engine.create, session.start, turn.step
  • Keeps its own state between turns

Good points

  • No network calls
  • Starts no processes
  • Written in TypeScript
  • Has a desktop-specific branch

Code to start from

A starter ModsCode writes from the drawing it read, and the mod's own lines that draw, where there are any.

Starter (register.tsx)

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

// Drawn like dash by DevOhMyCode (pane, band, toast), as ModsCode read it from the mod's code:
// https://modscode.com/claude-mods/mods/devohmycode-dash/
// 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 unknown = '…'
    const noEffortShort = '…'
    const context = '…'
    const filled = '…'
    const empty = '…'
    const text = '…'
    const limitLabelOf = '…'
    const filled2 = '…'
    const empty2 = '…'
    const percentText = '…'
    const limitLabelOf2 = '…'
    const filled3 = '…'
    const empty3 = '…'
    const percentText2 = '…'
    const limitLabelOf3 = '…'
    const filled4 = '…'
    const empty4 = '…'
    const percentText3 = '…'
    const usd = '…'
    const durationText = '…'
    const compactAsk = '…'
    const compactYes = '…'
    const compactNo = '…'
    return (
      <Box flexDirection="column">
        <Box flexDirection="row" flexWrap="wrap" columnGap={2}>
          <Text bold color="#888888">
            {"◆ "}
            {unknown}
          </Text>
          <Text color="#888888">
            {"⚡ "}
            {noEffortShort}
          </Text>
          <Box flexDirection="row" gap={1} alignItems="center">
            <Text>
              {context}
            </Text>
            <Text>
              <Text>
                {filled}
              </Text>
              <Text dimColor>
                {empty}
              </Text>
            </Text>
            <Text dimColor>
              {`${text} %`}
            </Text>
          </Box>
          <Box flexDirection="row" gap={1} alignItems="center">
            <Text>
              {limitLabelOf}
            </Text>
            <Text>
              <Text>
                {filled2}
              </Text>
              <Text dimColor>
                {empty2}
              </Text>
            </Text>
            <Text dimColor>
              {percentText}
            </Text>
          </Box>
          <Box flexDirection="row" gap={1} alignItems="center">
            <Text>
              {limitLabelOf2}
            </Text>
            <Text>
              <Text>
                {filled3}
              </Text>
              <Text dimColor>
                {empty3}
              </Text>
            </Text>
            <Text dimColor>
              {percentText2}
            </Text>
          </Box>
          <Box flexDirection="row" gap={1} alignItems="center">
            <Text>
              {limitLabelOf3}
            </Text>
            <Text>
              <Text>
                {filled4}
              </Text>
              <Text dimColor>
                {empty4}
              </Text>
            </Text>
            <Text dimColor>
              {percentText3}
            </Text>
          </Box>
          <Text bold>
            {usd}
          </Text>
          <Text dimColor>
            {durationText}
          </Text>
          <Box flexDirection="row" gap={1}>
            <Text color="#f472b6">
              {"⚠ "}
              {compactAsk}
            </Text>
            <Button plain>
              {`✓ ${compactYes}`}
            </Button>
            <Button plain dimColor>
              {`✕ ${compactNo}`}
            </Button>
          </Box>
        </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, Button, Input } = $.ui.resolve(e)
    const models = '…'
    const unknown = '…'
    const hotkey = '…'
    const label = '…'
    const efforts = '…'
    const unknown2 = '…'
    const asked = '…'
    const noEffort = '…'
    const heldEffort = '…'
    const ultracode = '…'
    const ultracodeOn = '…'
    const fast = '…'
    const presets = '…'
    const key = '…'
    const presetLabelOf = '…'
    const presetLabelOf2 = '…'
    const presetLabelOf3 = '…'
    const newPreset = '…'
    const presetName = '…'
    const presetNameHint = '…'
    const name = '…'
    const presetAdd = '…'
    const session = '…'
    const text = '…'
    const gaugeLabel = '…'
    const filled = '…'
    const empty = '…'
    const gaugeLabel2 = '…'
    const filled2 = '…'
    const empty2 = '…'
    const percentText = '…'
    const gaugeLabel3 = '…'
    const filled3 = '…'
    const empty3 = '…'
    const percentText2 = '…'
    const gaugeLabel4 = '…'
    const filled4 = '…'
    const empty4 = '…'
    const percentText3 = '…'
    const spent = '…'
    const usd = '…'
    const elapsed = '…'
    const durationText = '…'
    const compactAsk = '…'
    const compactNoteLabel = '…'
    const compactNoteHint = '…'
    const compactNote = '…'
    const compactSubmit = '…'
    const compactYes = '…'
    const compactNo = '…'
    const renameLabel = '…'
    const sessionName = '…'
    const library = '…'
    const LIBRARY_HOTKEYS = '…'
    const length = '…'
    const scopeNames = '…'
    const count = '…'
    const libraryNone = '…'
    const count2 = '…'
    const name2 = '…'
    const count3 = '…'
    const name3 = '…'
    const count4 = '…'
    const agentsLess = '…'
    const scopeNames2 = '…'
    const count5 = '…'
    const libraryNone2 = '…'
    const name4 = '…'
    const count6 = '…'
    const name5 = '…'
    const count7 = '…'
    const name6 = '…'
    const count8 = '…'
    const scopeNames3 = '…'
    const count9 = '…'
    const libraryNone3 = '…'
    const name7 = '…'
    const count10 = '…'
    const name8 = '…'
    const count11 = '…'
    const name9 = '…'
    const count12 = '…'
    const toggleHint = '…'
    const length2 = '…'
    const scopeNames4 = '…'
    const count13 = '…'
    const libraryNone4 = '…'
    const name10 = '…'
    const count14 = '…'
    const name11 = '…'
    const count15 = '…'
    const name12 = '…'
    const count16 = '…'
    const scopeNames5 = '…'
    const count17 = '…'
    const libraryNone5 = '…'
    const name13 = '…'
    const count18 = '…'
    const name14 = '…'
    const count19 = '…'
    const name15 = '…'
    const count20 = '…'
    const scopeNames6 = '…'
    const count21 = '…'
    const libraryNone6 = '…'
    const name16 = '…'
    const count22 = '…'
    const name17 = '…'
    const count23 = '…'
    const name18 = '…'
    const count24 = '…'
    const toggleHint2 = '…'
    const length3 = '…'
    const scopeNames7 = '…'
    const count25 = '…'
    const libraryNone7 = '…'
    const name19 = '…'
    const count26 = '…'
    const name20 = '…'
    const count27 = '…'
    return (
      <Box flexDirection="column">
        <Box flexDirection="row" gap={1}>
          <Text bold>
            {"◆ "}
            {models}
          </Text>
          <Button plain>
            ↧
          </Button>
          <Text dimColor wrap="truncate-end">
            {unknown}
          </Text>
        </Box>
        <Box flexDirection="column" borderStyle="round" paddingX={1}>
          <Box flexDirection="row" gap={1}>
            <Text>
              ●
            </Text>
            <Text italic />
          </Box>
          <Box flexDirection="row" gap={1}>
            <Text>
              ●
            </Text>
            <Text italic />
          </Box>
          <Box flexDirection="row" gap={1}>
            <Text>
              ●
            </Text>
            <Text italic />
          </Box>
          <Box flexDirection="column">
            <Button plain hotkey={`${hotkey}`}>
              {`${label}: ${label} ▴`}
            </Button>
            <Box flexDirection="row" gap={1} paddingLeft={2}>
              <Text>
                ●
              </Text>
              <Button plain />
            </Box>
            <Box flexDirection="row" gap={1} paddingLeft={2}>
              <Text>
                ●
              </Text>
              <Button plain />
            </Box>
            <Box flexDirection="row" gap={1} paddingLeft={2}>
              <Text>
                ●
              </Text>
              <Button plain />
            </Box>
          </Box>
        </Box>
        <Box flexDirection="row" gap={1} marginTop={1}>
          <Text bold>
            {"⚡ "}
            {efforts}
          </Text>
          <Button plain>
            ↧
          </Button>
          <Text dimColor>
            {unknown2}
          </Text>
          <Text dimColor italic>
            (
            {asked}
            )
          </Text>
        </Box>
        <Box flexDirection="column" borderStyle="round" borderColor="#888888" paddingX={1}>
          <Box flexDirection="row" gap={1}>
            <Text>
              ●
            </Text>
          </Box>
          <Box flexDirection="row" gap={1}>
            <Text>
              ●
            </Text>
          </Box>
          <Box flexDirection="row" gap={1}>
            <Text>
              ●
            </Text>
          </Box>
        </Box>
        <Text dimColor>
          {noEffort}
        </Text>
        <Text dimColor>
          {heldEffort}
        </Text>
        <Box flexDirection="row" gap={1} borderStyle="round" borderColor="#f59e0b" paddingX={1}>
          <Text bold color="#f59e0b">
            ✦
          </Text>
          <Button plain hotkey={`${ultracode}`} />
          <Text dimColor>
            {ultracodeOn}
          </Text>
        </Box>
        <Box flexDirection="row" gap={1} borderStyle="round" borderColor="#fca5a5" paddingX={1}>
          <Text bold color="#fca5a5">
            »
          </Text>
          <Button plain hotkey={`${fast}`} />
          <Text dimColor>
            —
          </Text>
        </Box>
        <Box flexDirection="row" gap={1} marginTop={1}>
          <Text bold>
            {"◇ "}
            {presets}
          </Text>
          <Text dimColor>
            {key}
          </Text>
        </Box>
        <Box flexDirection="column" borderStyle="round" paddingX={1}>
          <Box flexDirection="row" gap={1}>
            <Text>
              ●
            </Text>
            <Text italic>
              {presetLabelOf}
            </Text>
            <Button plain dimColor>
              ✕
            </Button>
          </Box>
          <Box flexDirection="row" gap={1}>
            <Text>
              ●
            </Text>
            <Text italic>
              {presetLabelOf2}
            </Text>
            <Button plain dimColor>
              ✕
            </Button>
          </Box>
          <Box flexDirection="row" gap={1}>
            <Text>
              ●
            </Text>
            <Text italic>
              {presetLabelOf3}
            </Text>
            <Button plain dimColor>
              ✕
            </Button>
          </Box>
          <Button plain dimColor hotkey="n">
            {`▴ ${newPreset}`}
          </Button>
          <Box flexDirection="column" paddingLeft={2}>
            <Input label={`${presetName}`} placeholder={`${presetNameHint}`} value={`${name}`} />
            <Box flexDirection="column">
              <Button plain hotkey={`${hotkey}`}>
                {`${label}: ${label} ▴`}
              </Button>
              <Box flexDirection="row" gap={1} paddingLeft={2}>
                <Text>
                  ●
                </Text>
                <Button plain />
              </Box>
              <Box flexDirection="row" gap={1} paddingLeft={2}>
                <Text>
                  ●
                </Text>
                <Button plain />
              </Box>
              <Box flexDirection="row" gap={1} paddingLeft={2}>
                <Text>
                  ●
                </Text>
                <Button plain />
              </Box>
            </Box>
            <Box flexDirection="column">
              <Button plain hotkey={`${hotkey}`}>
                {`${label}: ${label} ▴`}
              </Button>
              <Box flexDirection="row" gap={1} paddingLeft={2}>
                <Text>
                  ●
                </Text>
                <Button plain />
              </Box>
              <Box flexDirection="row" gap={1} paddingLeft={2}>
                <Text>
                  ●
                </Text>
                <Button plain />
              </Box>
              <Box flexDirection="row" gap={1} paddingLeft={2}>
                <Text>
                  ●
                </Text>
                <Button plain />
              </Box>
            </Box>
            <Button plain hotkey="v">
              {`✓ ${presetAdd}`}
            </Button>
          </Box>
        </Box>
        <Box flexDirection="row" gap={1} marginTop={1}>
          <Text bold color="#f472b6">
            {"◈ "}
            {session}
          </Text>
          <Button plain>
            ↧
          </Button>
          <Text dimColor>
            {text}
            {" %"}
          </Text>
        </Box>
        <Box flexDirection="column" borderStyle="round" borderColor="#f472b6" paddingX={1}>
          <Text>
            {gaugeLabel}
            {" "}
            <Text>
              {filled}
            </Text>
            <Text dimColor>
              {empty}
            </Text>
          </Text>
          <Text>
            {gaugeLabel2}
            {" "}
            <Text>
              {filled2}
            </Text>
            <Text dimColor>
              {empty2}
            </Text>
            {" "}
            <Text dimColor>
              {percentText}
            </Text>
          </Text>
          <Text>
            {gaugeLabel3}
            {" "}
            <Text>
              {filled3}
            </Text>
            <Text dimColor>
              {empty3}
            </Text>
            {" "}
            <Text dimColor>
              {percentText2}
            </Text>
          </Text>
          <Text>
            {gaugeLabel4}
            {" "}
            <Text>
              {filled4}
            </Text>
            <Text dimColor>
              {empty4}
            </Text>
            {" "}
            <Text dimColor>
              {percentText3}
            </Text>
          </Text>
          <Text>
            <Text>
              {spent}
              {" "}
              <Text bold>
                {usd}
              </Text>
              <Text dimColor>
                {" · "}
              </Text>
            </Text>
            <Text>
              {elapsed}
              {" "}
              <Text bold>
                {durationText}
              </Text>
            </Text>
          </Text>
          <Box flexDirection="column">
            <Text color="#f472b6">
              {"⚠ "}
              {compactAsk}
            </Text>
            <Input label={`${compactNoteLabel}`} placeholder={`${compactNoteHint}`} value={`${compactNote}`} submitLabel={`${compactSubmit}`} />
            <Box flexDirection="row" gap={2}>
              <Button plain hotkey="y">
                {`✓ ${compactYes}`}
              </Button>
              <Button plain dimColor hotkey="x">
                {`✕ ${compactNo}`}
              </Button>
            </Box>
          </Box>
          <Box flexDirection="row" gap={1}>
            <Text>
              {renameLabel}
              {": "}
              <Text bold>
                {sessionName}
              </Text>
            </Text>
            <Button plain dimColor hotkey="r">
              ✎
            </Button>
          </Box>
        </Box>
        <Box flexDirection="row" gap={1} marginTop={1}>
          <Text bold color="#94a3b8">
            {"▤ "}
            {library}
          </Text>
        </Box>
        <Box flexDirection="column" borderStyle="round" borderColor="#94a3b8" paddingX={1}>
          <Box flexDirection="column">
            <Box flexDirection="row" gap={1}>
              <Text bold>
                ▾
              </Text>
              <Button plain hotkey={`${LIBRARY_HOTKEYS}`} />
              <Text>
                {length}
              </Text>
              <Button plain hotkey="l">
                ↻ /reload-plugins
              </Button>
            </Box>
            <Box flexDirection="column">
              <Box flexDirection="column" borderStyle="round" borderDimColor paddingX={1}>
                <Text>
                  {scopeNames}
                  {" "}
                  <Text dimColor>
                    {count}
                  </Text>
                </Text>
                <Text dimColor>
                  {libraryNone}
                </Text>
                <Box flexDirection="row" gap={1}>
                  <Text>
                    ●
                  </Text>
                  <Text>
                    {name}
                    {" "}
                    <Text dimColor>
                      ×
                      {count2}
                    </Text>
                  </Text>
                </Box>
                <Box flexDirection="row" gap={1}>
                  <Text>
                    ●
                  </Text>
                  <Text>
                    {name2}
                    {" "}
                    <Text dimColor>
                      ×
                      {count3}
                    </Text>
                  </Text>
                </Box>
                <Box flexDirection="row" gap={1}>
                  <Text>
                    ●
                  </Text>
                  <Text>
                    {name3}
                    {" "}
                    <Text dimColor>
                      ×
                      {count4}
                    </Text>
                  </Text>
                </Box>
                <Button plain>
                  {`▴ ${agentsLess}`}
                </Button>
              </Box>
              <Box flexDirection="column" borderStyle="round" borderDimColor paddingX={1}>
                <Text>
                  {scopeNames2}
                  {" "}
                  <Text dimColor>
                    {count5}
                  </Text>
                </Text>
                <Text dimColor>
                  {libraryNone2}
                </Text>
                <Box flexDirection="row" gap={1}>
                  <Text>
                    ●
                  </Text>
                  <Text>
                    {name4}
                    {" "}
                    <Text dimColor>
                      ×
                      {count6}
                    </Text>
                  </Text>
                </Box>
                <Box flexDirection="row" gap={1}>
                  <Text>
                    ●
                  </Text>
                  <Text>
                    {name5}
                    {" "}
                    <Text dimColor>
                      ×
                      {count7}
                    </Text>
                  </Text>
                </Box>
                <Box flexDirection="row" gap={1}>
                  <Text>
                    ●
                  </Text>
                  <Text>
                    {name6}
                    {" "}
                    <Text dimColor>
                      ×
                      {count8}
                    </Text>
                  </Text>
                </Box>
                <Button plain>
                  {`▴ ${agentsLess}`}
                </Button>
              </Box>
              <Box flexDirection="column" borderStyle="round" borderDimColor paddingX={1}>
                <Text>
                  {scopeNames3}
                  {" "}
                  <Text dimColor>
                    {count9}
                  </Text>
                </Text>
                <Text dimColor>
                  {libraryNone3}
                </Text>
                <Box flexDirection="row" gap={1}>
                  <Text>
                    ●
                  </Text>
                  <Text>
                    {name7}
                    {" "}
                    <Text dimColor>
                      ×
                      {count10}
                    </Text>
                  </Text>
                </Box>
                <Box flexDirection="row" gap={1}>
                  <Text>
                    ●
                  </Text>
                  <Text>
                    {name8}
                    {" "}
                    <Text dimColor>
                      ×
                      {count11}
                    </Text>
                  </Text>
                </Box>
                <Box flexDirection="row" gap={1}>
                  <Text>
                    ●
                  </Text>
                  <Text>
                    {name9}
                    {" "}
                    <Text dimColor>
                      ×
                      {count12}
                    </Text>
                  </Text>
                </Box>
                <Button plain>
                  {`▴ ${agentsLess}`}
                </Button>
              </Box>
              <Text dimColor italic wrap="wrap">
                {toggleHint}
              </Text>
            </Box>
          </Box>
          <Box flexDirection="column">
            <Box flexDirection="row" gap={1}>
              <Text bold>
                ▾
              </Text>
              <Button plain hotkey={`${LIBRARY_HOTKEYS}`} />
              <Text>
                {length2}
              </Text>
              <Button plain hotkey="l">
                ↻ /reload-plugins
              </Button>
            </Box>
            <Box flexDirection="column">
              <Box flexDirection="column" borderStyle="round" borderDimColor paddingX={1}>
                <Text>
                  {scopeNames4}
                  {" "}
                  <Text dimColor>
                    {count13}
                  </Text>
                </Text>
                <Text dimColor>
                  {libraryNone4}
                </Text>
                <Box flexDirection="row" gap={1}>
                  <Text>
                    ●
                  </Text>
                  <Text>
                    {name10}
                    {" "}
                    <Text dimColor>
                      ×
                      {count14}
                    </Text>
                  </Text>
                </Box>
                <Box flexDirection="row" gap={1}>
                  <Text>
                    ●
                  </Text>
                  <Text>
                    {name11}
                    {" "}
                    <Text dimColor>
                      ×
                      {count15}
                    </Text>
                  </Text>
                </Box>
                <Box flexDirection="row" gap={1}>
                  <Text>
                    ●
                  </Text>
                  <Text>
                    {name12}
                    {" "}
                    <Text dimColor>
                      ×
                      {count16}
                    </Text>
                  </Text>
                </Box>
                <Button plain>
                  {`▴ ${agentsLess}`}
                </Button>
              </Box>
              <Box flexDirection="column" borderStyle="round" borderDimColor paddingX={1}>
                <Text>
                  {scopeNames5}
                  {" "}
                  <Text dimColor>
                    {count17}
                  </Text>
                </Text>
                <Text dimColor>
                  {libraryNone5}
                </Text>
                <Box flexDirection="row" gap={1}>
                  <Text>
                    ●
                  </Text>
                  <Text>
                    {name13}
                    {" "}
                    <Text dimColor>
                      ×
                      {count18}
                    </Text>
                  </Text>
                </Box>
                <Box flexDirection="row" gap={1}>
                  <Text>
                    ●
                  </Text>
                  <Text>
                    {name14}
                    {" "}
                    <Text dimColor>
                      ×
                      {count19}
                    </Text>
                  </Text>
                </Box>
                <Box flexDirection="row" gap={1}>
                  <Text>
                    ●
                  </Text>
                  <Text>
                    {name15}
                    {" "}
                    <Text dimColor>
                      ×
                      {count20}
                    </Text>
                  </Text>
                </Box>
                <Button plain>
                  {`▴ ${agentsLess}`}
                </Button>
              </Box>
              <Box flexDirection="column" borderStyle="round" borderDimColor paddingX={1}>
                <Text>
                  {scopeNames6}
                  {" "}
                  <Text dimColor>
                    {count21}
                  </Text>
                </Text>
                <Text dimColor>
                  {libraryNone6}
                </Text>
                <Box flexDirection="row" gap={1}>
                  <Text>
                    ●
                  </Text>
                  <Text>
                    {name16}
                    {" "}
                    <Text dimColor>
                      ×
                      {count22}
                    </Text>
                  </Text>
                </Box>
                <Box flexDirection="row" gap={1}>
                  <Text>
                    ●
                  </Text>
                  <Text>
                    {name17}
                    {" "}
                    <Text dimColor>
                      ×
                      {count23}
                    </Text>
                  </Text>
                </Box>
                <Box flexDirection="row" gap={1}>
                  <Text>
                    ●
                  </Text>
                  <Text>
                    {name18}
                    {" "}
                    <Text dimColor>
                      ×
                      {count24}
                    </Text>
                  </Text>
                </Box>
                <Button plain>
                  {`▴ ${agentsLess}`}
                </Button>
              </Box>
              <Text dimColor italic wrap="wrap">
                {toggleHint2}
              </Text>
            </Box>
          </Box>
          <Box flexDirection="column">
            <Box flexDirection="row" gap={1}>
              <Text bold>
                ▾
              </Text>
              <Button plain hotkey={`${LIBRARY_HOTKEYS}`} />
              <Text>
                {length3}
              </Text>
              <Button plain hotkey="l">
                ↻ /reload-plugins
              </Button>
            </Box>
            <Box flexDirection="column">
              <Box flexDirection="column" borderStyle="round" borderDimColor paddingX={1}>
                <Text>
                  {scopeNames7}
                  {" "}
                  <Text dimColor>
                    {count25}
                  </Text>
                </Text>
                <Text dimColor>
                  {libraryNone7}
                </Text>
                <Box flexDirection="row" gap={1}>
                  <Text>
                    ●
                  </Text>
                  <Text>
                    {name19}
                    {" "}
                    <Text dimColor>
                      ×
                      {count26}
                    </Text>
                  </Text>
                </Box>
                <Box flexDirection="row" gap={1}>
                  <Text>
                    ●
                  </Text>
                  <Text>
                    {name20}
                    {" "}
                    <Text dimColor>
                      ×
                      {count27}
                    </Text>
                  </Text>
                </Box>
              </Box>
            </Box>
          </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.

dash/hooks/register.ts lines 986–1020 · Band
  on('ui.render', { component: 'AbovePrompt' }, async ($, e, next) => {
    // A module reloaded mid-session starts blank: no session.start comes again.
    if (!isPrefsRead) {
      isPrefsRead = true
      settle(await storedPrefsOf($))
    }

    const band = bandOf(prefs.band)

    if (band.length === 0 || e.props.hasSurvey) {
      return next(e)
    }

    model ??= await $.session.model().catch(() => undefined)
    effort ??= savedEffortOf(await $.settings.read().catch(() => ({})), model, catalog.models)
    const sessionUsage = band.includes('session') ? await $.session.usage().catch(() => undefined) : undefined
    const context = sessionUsage?.context
    const now = await $.clock.now().catch(() => undefined)

    if (band.includes('session')) {
      armTick()
    }

    return drawBand($.ui.resolve(e), {
      band,
      models: catalog.models,
      model,
      effort,
      context: context === undefined ? undefined : { percent: context.percent, tokens: context.tokens, window: context.window },
      usage: sessionUsage === undefined || now === undefined ? undefined : usageViewOf(sessionUsage, now),
      isCompactAsked,
      askCompact,
      compact,
    }, e.surface)
  })
dash/hooks/pane/pane.tsx lines 982–1051 · Band
export function drawBand(ui: Elements, view: BandView, surface: RenderSurface = 'terminal'): RenderElement {
  const { Box, Button, Text } = ui
  const Svg = surface !== 'terminal' && 'Svg' in ui ? ui.Svg : undefined
  const texts = say()
  const current = choiceOf(view.model, view.models)
  const fill =
    view.context?.percent === undefined ? undefined : contextPercentOf({ ...view.context, percent: view.context.percent })
  // A share drawn green to red: an SVG where the surface draws one.
  const bar = (key: string, label: string, percent: number, text: string): RenderElement => (
    <Box key={key} flexDirection="row" gap={1} alignItems="center">
      <Text>{label}</Text>
      {Svg === undefined ? (
        <Text>
          <Text color={usageColorOf(percent)}>{contextGaugeOf(percent, BAND_CELLS).filled}</Text>
          <Text dimColor>{contextGaugeOf(percent, BAND_CELLS).empty}</Text>
        </Text>
      ) : (
        <Svg source={gaugeSvgOf(Math.min(percent, 100) / 100, 1, usageColorOf(percent), false)} alt={text} />
      )}
      <Text dimColor>{text}</Text>
    </Box>
  )

  return (
    <Box flexDirection="row" flexWrap="wrap" columnGap={2}>
      {view.band.includes('model') && (
        <Text key="band:model" bold color={current?.color ?? NEUTRAL}>
          ◆ {current === undefined ? view.model ?? texts.unknown : labelOf(current, view.model, true)}
        </Text>
      )}
      {view.band.includes('effort') && (
        <Text key="band:effort" color={view.effort === undefined || current?.hasEffort === false ? NEUTRAL : EFFORT_COLORS[view.effort]}>
          ⚡ {current?.hasEffort === false ? texts.noEffortShort : view.effort ?? texts.unknown}
        </Text>
      )}
      {view.band.includes('session') && fill !== undefined && bar('band:context', texts.context, fill.value, `${fill.text} %`)}
      {view.band.includes('session') &&
        (view.usage?.limits ?? []).map(limit =>
          bar(`band:limit:${limit.kind}`, limitLabelOf(limit.kind), limit.percent, percentText(limit.percent)),
        )}
      {view.band.includes('session') && view.usage?.usd !== undefined && (
        <Text key="band:usd" bold>
          {texts.usd(view.usage.usd)}
        </Text>
      )}
      {view.band.includes('session') && view.usage?.elapsedMs !== undefined && (
        <Text key="band:elapsed" dimColor>
          {durationText(view.usage.elapsedMs)}
        </Text>
      )}
      {view.band.includes('session') &&
        (view.isCompactAsked ? (
          // As in the pane: a stray click would summarize the conversation for good.
          <Box key="band:compact" flexDirection="row" gap={1}>
            <Text color={SESSION_COLOR}>⚠ {texts.compactAsk}</Text>
            <Button key={BAND_COMPACT_CONFIRM_KEY} hover={lit(BAND_COMPACT_CONFIRM_KEY, SESSION_COLOR)} plain onPress={view.compact}>
              {`✓ ${texts.compactYes}`}
            </Button>
            <Button key={BAND_COMPACT_CANCEL_KEY} hover={lit(BAND_COMPACT_CANCEL_KEY, DELETE_COLOR)} plain dimColor onPress={() => view.askCompact(false)}>
              {`✕ ${texts.compactNo}`}
            </Button>
          </Box>
        ) : (
          <Button key={BAND_COMPACT_KEY} hover={lit(BAND_COMPACT_KEY, SESSION_COLOR)} plain onPress={() => view.askCompact(true)}>
            ⊟ compact
          </Button>
        ))}
    </Box>
  )
}
dash/hooks/register.ts lines 1022–1148 · Pane
  on('ui.render', { component: 'Pane', requestId: PANE_ID }, async ($, e) => {
    // A module reloaded mid-session starts blank: no session.start comes again.
    if (!isPrefsRead) {
      isPrefsRead = true
      settle(await storedPrefsOf($))
    }

    model ??= await $.session.model().catch(() => undefined)
    effort ??= savedEffortOf(await $.settings.read().catch(() => ({})), model, catalog.models)

    // Nor are the lists read: the first draw reads them, as /dash would.
    if (!isRead) {
      isRead = true
      ;({ configDir, stateFile } = await pathsOf($))
      const usage = await $.session.usage({ breakdown: 'summary' }).catch(() => undefined)
      await readLibrary(usage?.context.breakdown?.agents ?? [])
      await readSetup(usage?.context.breakdown?.mcpTools ?? [])
    }

    // Both cheap, read on each draw: the gauge follows every request, which
    // redraws the pane, and a row changed in /config shows on the next draw.
    const sessionUsage = await $.session.usage().catch(() => undefined)
    const context = sessionUsage?.context
    const now = await $.clock.now().catch(() => undefined)
    const configRows: ConfigRow[] = await $.config.list().catch(() => [])

    armTick()

    return drawPane($.ui.resolve(e), {
      context: context === undefined ? undefined : { percent: context.percent, tokens: context.tokens, window: context.window },
      usage: sessionUsage === undefined || now === undefined ? undefined : usageViewOf(sessionUsage, now),
      renameSession: name => void renameSession(name).catch(failed),
      sessionName,
      isRenaming,
      editName: () => {
        isRenaming = true
        host?.invalidate()
      },
      isCompactAsked,
      askCompact,
      compactNote,
      setCompactNote: note => {
        compactNote = note
      },
      compact,
      configRows,
      setConfig: (key, value) => void setConfig(key, value).catch(failed),
      models: catalog.models,
      presets: catalog.presets,
      model,
      effort,
      hasEffortCommand,
      isEffortAsked,
      hasFast,
      isFast,
      isUltracode,
      ignored: catalog.ignored,
      pickModel: key => {
        const choice = catalog.models.find(one => one.key === key)

        if (choice !== undefined) {
          void apply({ model: choice }).catch(failed)
        }
      },
      pickEffort: level => void apply({ effort: level }).catch(failed),
      pickPreset: key => {
        const preset = catalog.presets.find(one => one.key === key)

        if (preset !== undefined) {
          void apply({ preset }).catch(failed)
        }
      },
      toggleFast: () => void toggleFast().catch(failed),
      toggleUltracode: () => void setUltracode().catch(failed),
      pickMoreModel: id => void pickMoreModel(id).catch(failed),
      isKeyboard: prefs.keyboard !== 'off',
      toggleKeyboard: () => void toggleKeyboard().catch(failed),
      isCompact: prefs.compact === 'on',
      toggleCompact: () => void toggleCompact().catch(failed),
      band: bandOf(prefs.band),
      toggleBand: part => void toggleBand(part).catch(failed),
      library,
      current,
      openKinds: [...openKinds],
      toggleKind: kind => {
        if (!openKinds.delete(kind)) {
          openKinds.add(kind)
        }

        host?.invalidate()
      },
      expandedFrames: [...expandedFrames],
      toggleFrame: (kind, scope) => {
        if (!expandedFrames.delete(`${kind}:${scope}`)) {
          expandedFrames.add(`${kind}:${scope}`)
        }

        host?.invalidate()
      },
      pickEntry: (kind, name) => void pickEntry(kind, name).catch(failed),
      openMenus: [...openMenus],
      draftPreset: { ...draftPreset, model: draftPreset.model || (catalog.models[0]?.key ?? '') },
      setDraftPreset: patch => {
        draftPreset = { ...draftPreset, ...patch }
        host?.invalidate()
      },
      addPreset: () => void addPreset().catch(failed),
      ownPresets: catalog.presets.filter(one => isOwnPreset(one.key, DEFAULT_PREFS.presets)).map(one => one.key),
      deletePreset: key => void deletePreset(key).catch(failed),
      toggleMenu: key => {
        if (!openMenus.delete(key)) {
          openMenus.add(key)
        }

        host?.invalidate()
      },
      isReloadPending,
      reloadPlugins: () =>
        void host
          ?.run('reload-plugins', '')
          .then(() => {
            isReloadPending = false
            host?.invalidate()
          })
          .catch(failed),
    }, e.surface)
  })
dash/hooks/pane/pane.tsx lines 261–420 · Pane
export function drawPane(ui: Elements, view: PaneView, surface: RenderSurface = 'terminal'): RenderElement {
  const { Box, Button, Text } = ui
  // The mobile surface has no Input: the field is left out there.
  const Input = 'Input' in ui ? ui.Input : undefined
  // The graphic surfaces (desktop, the editor's webview, mobile) draw an SVG
  // and set text in a proportional font; the terminal does neither, and keeps
  // its glyph gauges and padded labels. Told by the surface's name: the
  // terminal's table can carry an Svg it does not draw.
  const Svg = surface !== 'terminal' && 'Svg' in ui ? ui.Svg : undefined
  // Where the surface's Select takes a click (desktop, the editor's webview),
  // the drop-downs are its own instead of the pane's rows of buttons.
  const Select = Svg !== undefined && 'Select' in ui ? ui.Select : undefined
  const texts = say()
  // The space between stacked frames (effort, ultracode, fast mode): a row
  // on the graphic surfaces, where their borders would otherwise touch;
  // none in the terminal, where a row is a whole line.
  const frameGap = Svg === undefined ? 0 : 1
  // A label of the aligned column: padded in the terminal's cells, in a Box
  // of that width where the font is proportional.
  const labelled = (label: string, button: (text: string) => RenderElement): RenderElement =>
    Svg === undefined ? button(label.padEnd(LABEL_WIDTH)) : <Box width={LABEL_WIDTH}>{button(label)}</Box>
  // A gauge: an SVG where the surface draws one, the glyphs otherwise.
  const gauge = (filled: number, total: number, color: string, isDim: boolean, alt: string, glyphs: () => RenderElement): RenderElement =>
    Svg === undefined ? glyphs() : <Svg source={gaugeSvgOf(filled, total, color, isDim)} alt={alt} />

  const fill =
    view.context?.percent === undefined ? undefined : contextPercentOf({ ...view.context, percent: view.context.percent })
  // The rate-limit windows, drawn under the context's gauge; in the terminal
  // their labels are padded to the longest so the gauges line up.
  const limits = view.usage?.limits ?? []
  const gaugeWidth = Math.max(texts.context.length, ...limits.map(limit => limitLabelOf(limit.kind).length))
  const gaugeLabel = (label: string): string => label.padEnd(gaugeWidth)

  // A fixed hotkey, bound in keyboard mode alone.
  const fixed = (name: keyof typeof FIXED_HOTKEYS): string | undefined => (view.isKeyboard ? FIXED_HOTKEYS[name] : undefined)

  // By a frame's title: puts its values in the band above the prompt, or
  // takes them out; dim while they are not there.
  const pin = (part: BandPart, color: string): RenderElement => (
    <Button key={bandKey(part)} hover={lit(bandKey(part), color)} plain dimColor={!view.band.includes(part)} onPress={() => view.toggleBand(part)}>
      ↧
    </Button>
  )

  // A row of the Library frame the person opens and closes, like the library's.
  const section = (key: string, color: string, title: string, count: number | undefined, body: RenderElement, hotkey?: string) => {
    const isOpen = view.openMenus.includes(key)

    return (
      <Box key={`section:${key}`} flexDirection="column">
        <Box flexDirection="row" gap={1}>
          <Text bold color={color}>
            {isOpen ? '▾' : '▸'}
          </Text>
          <Button key={key} hover={lit(key, color)} plain hotkey={hotkey} onPress={() => view.toggleMenu(key)}>
            {title}
          </Button>
          {count !== undefined && <Text color={color}>{count}</Text>}
        </Box>
        {isOpen && (
          <Box flexDirection="column" borderStyle="round" borderColor={color} borderDimColor paddingX={1}>
            {body}
          </Box>
        )}
      </Box>
    )
  }

  // One `/config` row, drawn by its kind: a switch, a drop-down, a field; a
  // row a policy locks, or a list, is shown and left alone.
  const configControl = (row: ConfigRow): RenderElement => {
    const key = configKey(row.key)
    const shown = (
      <Box key={`row:${key}`}>
        <Text dimColor wrap="truncate-end">
          {row.isLocked ? '🔒 ' : ''}
          {row.label}: {Array.isArray(row.value) ? row.value.join(', ') : String(row.value)}
        </Text>
      </Box>
    )

    if (row.isLocked || Array.isArray(row.value)) {
      return shown
    }

    if (row.kind === 'boolean') {
      return (
        <Box key={`row:${key}`} flexDirection="row" gap={1}>
          <Text>{dotOf(row.value === true)}</Text>
          <Button key={key} hover={lit(key, CONFIG_COLOR)} plain dimColor={row.value !== true} onPress={() => view.setConfig(row.key, row.value !== true)}>
            {row.label}
          </Button>
        </Box>
      )
    }

    // Named apart from `options`, which the manifest check reads as the plugin's own.
    const { options: choices = [] } = row.kind === 'choice' ? row : {}

    if (row.kind === 'choice' && choices.length > 0) {
      return menu(
        key,
        row.label,
        choices.map(one => ({ value: one, label: one })),
        String(row.value),
        value => view.setConfig(row.key, value),
        CONFIG_COLOR,
      )
    }

    if (Input === undefined) {
      return shown
    }

    return (
      <Input
        key={key}
        label={row.label}
        value={String(row.value)}
        onSubmit={(text: string) => {
          const value = row.kind === 'number' ? Number(text) : text

          if (typeof value !== 'number' || Number.isFinite(value)) {
            view.setConfig(row.key, value)
          }
        }}
      />
    )
  }
  // The surface's Select takes no click on its options in the terminal: the
  // pane draws its own drop-down, a button that opens a row of buttons.
  const menu = (
    key: string,
    label: string,
    choices: readonly { value: string; label: string }[],
    value: string | undefined,
    pick: (value: string) => void,
    color: string,
    hotkey?: string,
  ): RenderElement => {
    const isOpen = view.openMenus.includes(key)
    const chosen = choices.find(one => one.value === value)

    if (Select !== undefined) {
      // Nothing chosen: a blank first option, so a pick of the first real one
      // still changes the value and reaches onSelect.
      const options = chosen === undefined ? [{ value: '', label: '—' }, ...choices] : choices

      return (
        <Select
          key={key}
          label={label}
          options={options}
          value={chosen?.value ?? ''}
          onSelect={(picked: string) => {
            if (chosen !== undefined || picked !== '') {
              pick(picked)
            }
          }}
        />
Licence text (MIT)
MIT License

Copyright (c) 2026 DevOhMyCode

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.

How to build this: Pane (panel), Deny a tool call

What its code calls

reads filesenv varstool callsrememberscalls tools

What its code shows

Read from the source at commit bb142cd6b28b on 2026-10-11. 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.dash/hooks/register.ts
ParsesEvery file parses as TypeScript or JavaScript.25 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.dash/hooks/register.ts:757 a program named at run time
Reads and sendsWhether it both reads something of yours (files, environment variables, the transcript, settings) and reaches outside (the network, an MCP server, another session, telemetry).reads environment variables, files, the prompt box, settings.json, but reaches nothing outside
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
Settings hooksHooks declared in hooks/hooks.json or plugin.json beside the module: a command (a shell when it has no args), an HTTP request, an MCP tool or a model prompt at an event. They run outside $.no settings hooks: its function hooks alone
Servers it shipsMCP servers (a program, or a URL; a headersHelper is a shell command; a .mcpb bundle is unpacked at run time), LSP servers, monitors (a shell command for the whole session) and bin/ (on the PATH of the Bash tool).ships no MCP or LSP server, no monitor, no bin/
Skills, commands, agentsWhat its Markdown declares beyond text: allowed-tools granted for the turn, hooks added when a skill is invoked, a command run before Claude reads the skill.no skills, commands, agents or workflows
Tools and MCPWhether every tool it calls through $.tool.call and $.mcp.call is named in the code, and none is a shell (Bash through the tool runs a shell without $.process).command.run: /?
Asks of the modelCompletions it runs ($.model.complete, fork, classify), subagents it spawns, prompts it submits as you, and the tools, commands and agents it adds.adds command ?
Events it hooksBy what a hook there can do: gates (refuse a tool call, a prompt, a setting, another plugin), shapes (what the model reads: the system prompt, tool descriptions, each request), reads (your input, the events of the settings hooks, every event with *), and the rest.gates: command.run (rename, fast), tool.call (Workflow) · shapes: engine.create, turn.step · also: session.start, ui.render (AbovePrompt, Pane) · timers: clock.after
Reads, by nameThe environment variables and files it names, and whether it reads the transcript, settings.json, the prompt box or the mouse selection.env: USERPROFILE, HOME, CLAUDE_CONFIG_DIR; files: a path computed at run time; the prompt box; settings.json
Writes, by nameThe files and environment variables it names, and whether it changes settings, the prompt box, the clipboard, the conversation (a row the model reads) or another session.the prompt box; settings (config.set)

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 its code (or run claude plugin validate . in its folder), weigh what it reaches, and install the commit you read.

From its marketplace

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 devohmycode/ccmods
/plugin install dash@ccmods
/reload-plugins

This installs the marketplace's latest commit, which may not be the one read here (bb142cd6b28b). Compare them before you install. /reload-plugins loads it into a session that is already open.

Try the commit ModsCode read

No marketplace needed. In a terminal, clone the repository, check out the commit read, validate the mod, and load it for one session:

git clone https://github.com/devohmycode/ccmods
git -C ccmods checkout bb142cd6b28b792e69b87259639237ff6d034c41
claude plugin validate ccmods/dash
claude --plugin-dir ccmods/dash

The validate line lists the events the mod hooks and what it asks Claude Code to do, without running it. The last line loads the mod for this session only and writes nothing to your settings. If the author has rewritten history, the commit may no longer exist.

Ask Claude about it

With the ModsCode connector added, Claude can read this mod's code and what it reaches, and build on them. Ask it like this:

Read the ModsCode mod "devohmycode-dash" with its code and make me one like it

Search them from Claude: the MCP connector

Similar mods

More by DevOhMyCode

Badge for your README

If this is your mod, paste this into your README. It links to this page.

README.md
[![ModsCode](https://modscode.com/badge/devohmycode-dash.svg)](https://modscode.com/claude-mods/mods/devohmycode-dash/)