Ranking|Claude Code Mods

ModsCode / Claude Code Mods / Ranking / test-hud

test-hud

Test runs at a glance: passing over total in the status line, a sparkline of failures across runs, the failing tests, and a toast when the suite turns green

Code you can checkTerminal + desktopPaneStatus lineToastBoxButtonText
reads files, env vars, draws

What it does

  • Draws a pane, toasts
  • Watches Bash calls
  • Hooks session.start
  • Keeps its own state between turns

Good points

  • No network calls
  • Starts no processes
  • Written in TypeScript
  • Handles errors

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 test-hud by Lucas Fernandes (pane, status, toast), as ModsCode read it from the mod's code:
// https://modscode.com/claude-mods/mods/ice-lfernandes-test-hud/
// 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 pane: open it with $.ui.open({ id: 'my-pane', title: "Tests" })
  on('ui.render', { component: 'Pane', requestId: 'my-pane' }, async ($, e) => {
    const { Box, Text, Button } = $.ui.resolve(e)
    const name = '…'
    const counts = '…'
    const runner = '…'
    const n = '…'
    const elapsed = '…'
    const command = '…'
    const earlier = '…'
    const spark = '…'
    const sparkNote = '…'
    const durationSpark = '…'
    const durationNote = '…'
    const failing = '…'
    const f = '…'
    const fixed = '…'
    const f2 = '…'
    const f3 = '…'
    const score = '…'
    const runner2 = '…'
    const score2 = '…'
    const runner3 = '…'
    const score3 = '…'
    const lead = '…'
    const verb = '…'
    return (
      <Box flexDirection="column" paddingX={1} gap={1}>
        <Text dimColor>
          Test runs in Bash this session. Press a failing test to ask for a fix.
        </Text>
        <Box flexDirection="row" flexWrap="wrap" gap={2}>
          <Button plain label={`▸ ${name}`} />
          <Button plain label={`▸ ${name}`} />
          <Button plain label={`▸ ${name}`} />
        </Box>
        <Box flexDirection="column">
          <Text bold>
            {`✗ ${counts}`}
          </Text>
          <Box flexDirection="row" flexWrap="wrap" gap={2}>
            <Text dimColor>
              {`${runner} · #${n} · ${elapsed} · subagent · ${command}`}
            </Text>
            <Button plain label="↻ run again" />
          </Box>
          <Box flexDirection="row" gap={2}>
            <Text color="warning">
              {`${earlier}`}
            </Text>
            <Button plain label="↩ latest run" />
          </Box>
        </Box>
        <Box flexDirection="column">
          <Text>
            <Text>
              {spark}
            </Text>
            <Text dimColor>
              {`  ${sparkNote}`}
            </Text>
          </Text>
          <Text>
            <Text>
              {durationSpark}
            </Text>
            <Text dimColor>
              {`  ${durationNote}`}
            </Text>
          </Text>
        </Box>
        <Box flexDirection="column">
          <Text bold>
            {`${failing}`}
          </Text>
          <Text dimColor>
            {"  The output named no failing tests in a shape this mod reads."}
          </Text>
          <Box flexDirection="row">
            <Text color="error">
              {"  ✗ "}
            </Text>
            <Button plain label={`${f}`} />
            <Text color="warning">
              {"  new"}
            </Text>
            <Text color="warning">
              {"  flaky?"}
            </Text>
          </Box>
          <Box flexDirection="row">
            <Text color="error">
              {"  ✗ "}
            </Text>
            <Button plain label={`${f}`} />
            <Text color="warning">
              {"  new"}
            </Text>
            <Text color="warning">
              {"  flaky?"}
            </Text>
          </Box>
          <Box flexDirection="row">
            <Text color="error">
              {"  ✗ "}
            </Text>
            <Button plain label={`${f}`} />
            <Text color="warning">
              {"  new"}
            </Text>
            <Text color="warning">
              {"  flaky?"}
            </Text>
          </Box>
        </Box>
        <Box flexDirection="column">
          <Text bold>
            {`${fixed}`}
          </Text>
          <Text>
            <Text color="success">
              {"  ✓ "}
            </Text>
            <Text>
              {f}
            </Text>
          </Text>
          <Text>
            <Text color="success">
              {"  ✓ "}
            </Text>
            <Text>
              {f2}
            </Text>
          </Text>
          <Text>
            <Text color="success">
              {"  ✓ "}
            </Text>
            <Text>
              {f3}
            </Text>
          </Text>
        </Box>
        <Box flexDirection="column">
          <Text>
            <Text bold>
              Runs
            </Text>
            <Text dimColor>
              {"  press one to see it"}
            </Text>
          </Text>
          <Box flexDirection="row">
            <Text color="claude">
              {"▸ "}
            </Text>
            <Button plain label={`#${n}`} />
            <Text>
              {runner}
            </Text>
            <Text color="error">
              {score}
            </Text>
            <Text dimColor>
              {`${elapsed}  ${command} (subagent)`}
            </Text>
          </Box>
          <Box flexDirection="row">
            <Text color="claude">
              {"▸ "}
            </Text>
            <Button plain label={`#${n}`} />
            <Text>
              {runner2}
            </Text>
            <Text color="error">
              {score2}
            </Text>
            <Text dimColor>
              {`${elapsed}  ${command} (subagent)`}
            </Text>
          </Box>
          <Box flexDirection="row">
            <Text color="claude">
              {"▸ "}
            </Text>
            <Button plain label={`#${n}`} />
            <Text>
              {runner3}
            </Text>
            <Text color="error">
              {score3}
            </Text>
            <Text dimColor>
              {`${elapsed}  ${command} (subagent)`}
            </Text>
          </Box>
        </Box>
        <Box flexDirection="row" flexWrap="wrap" gap={2}>
          <Box flexDirection="row" flexWrap="wrap">
            <Text dimColor>
              {`${lead} · `}
            </Text>
            <Text dimColor>
              {"/test-hud "}
            </Text>
            <Box flexDirection="row">
              <Text dimColor>
                {" · "}
              </Text>
              <Button plain dimColor label={`${verb}`} />
            </Box>
            <Box flexDirection="row">
              <Text dimColor>
                {" · "}
              </Text>
              <Button plain dimColor label={`${verb}`} />
            </Box>
            <Box flexDirection="row">
              <Text dimColor>
                {" · "}
              </Text>
              <Button plain dimColor label={`${verb}`} />
            </Box>
          </Box>
          <Button role="dismiss" label="Close" />
        </Box>
      </Box>
    )
  })

  on('session.start', async ($, e, next) => {
    const green = '…'
    const red = '…'
    await $.ui.toast(`${green} /test-hud`)
    await $.ui.toast(`${red} /test-hud`)
    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.

test-hud/hooks/register.tsx lines 245–384 · Pane
  on('ui.render', { component: 'Pane', requestId: PANE }, async ($, e) => {
    const { Box, Text, Button } = $.ui.resolve(e)
    const w = WORDS[lang]
    const list = await read($, runs)
    const width = Math.max(40, (e.props.bodyColumns || e.viewport?.columns || 80) - 2)
    const footer = (
      <Box flexDirection="row" flexWrap="wrap" gap={2}>
        {verbRow({ Box, Text, Button }, COMMAND, VERBS, v => pressVerb($, v))}
        <Button key="close" role="dismiss" label={w.close} onPress={() => $.ui.close({ id: PANE })} />
      </Box>
    )

    if (list.length === 0) {
      return (
        <Box flexDirection="column" paddingX={1} gap={1}>
          <Box flexDirection="column">
            <Text dimColor>{w.empty}</Text>
            <Text dimColor>{w.emptyNext}</Text>
          </Box>
          {footer}
        </Box>
      )
    }

    // The runner on show: the tab picked, else the latest run's. The run on show: the one
    // picked in the list, else that runner's latest.
    const runners = runnersOf(list)
    const picked = await read($, tab)
    const runner = picked !== null && runners.includes(picked) ? picked : list.at(-1)!.runner
    const mine = list.filter(x => x.runner === runner)
    const chosen = await read($, selected)
    const r = mine.find(x => x.n === chosen) ?? mine.at(-1)!
    const isEarlier = r !== mine.at(-1)

    const isRed = r.failed > 0
    const counts = [
      r.passed === null ? (isRed ? '' : w.passedNoCounts) : w.passing(r.passed, r.passed + r.failed),
      isRed ? w.failed(r.failed) : '',
      r.skipped ? w.skipped(r.skipped) : '',
    ].filter(Boolean)
    const line = mine.filter(x => x.n <= r.n).slice(-PANE_SPARK)
    const most = Math.max(...line.map(x => x.failed))
    const ms = line.map(x => x.durationMs)
    const isNew = fresh(list, r)
    const isFlaky = flaky(list, r)
    const gone = fixed(list, r)
    const recent = mine.slice(-PANE_RUNS).reverse()
    const tone = isRed ? 'error' : 'success'
    const pickTab = async (name: string) => {
      await update($, tab, () => name)
      await update($, selected, () => null)
    }

    return (
      <Box flexDirection="column" paddingX={1} gap={1}>
        <Text dimColor>{w.hint}</Text>

        {runners.length > 1 && (
          <Box flexDirection="row" flexWrap="wrap" gap={2}>
            {runners.map(name => (
              <Button key={`tab:${name}`} plain dimColor={name !== runner} label={name === runner ? `▸ ${name}` : name} onPress={() => pickTab(name)} />
            ))}
          </Box>
        )}

        <Box flexDirection="column">
          <Text color={tone} bold>{`${isRed ? '✗' : '✓'} ${counts.join(' · ')}`}</Text>
          <Box flexDirection="row" flexWrap="wrap" gap={2}>
            <Text dimColor>{clip(`${r.runner} · #${r.n} · ${elapsed(r.durationMs)}${r.agentId ? ` · ${w.subagent}` : ''} · ${r.command}`, width - w.runAgain.length - 2)}</Text>
            <Button key="rerun" plain label={w.runAgain} onPress={() => fill($, w.rerun(r.fullCommand))} />
          </Box>
          {isEarlier && (
            <Box flexDirection="row" gap={2}>
              <Text color="warning">{w.earlier(r.n)}</Text>
              <Button key="latest" plain label={w.latest} onPress={() => update($, selected, () => null)} />
            </Box>
          )}
        </Box>

        <Box flexDirection="column">
          <Text>
            <Text color={tone}>{spark(line)}</Text>
            <Text dimColor>{`  ${w.sparkNote(line.length, r.runner, most)}`}</Text>
          </Text>
          {line.length > 1 && (
            <Text>
              <Text>{durationSpark(line)}</Text>
              <Text dimColor>{`  ${w.durationNote(line.length, elapsed(Math.min(...ms)), elapsed(Math.max(...ms)))}`}</Text>
            </Text>
          )}
        </Box>

        {isRed && (
          <Box flexDirection="column">
            <Text bold>{w.failing(r.failures.length, r.failed)}</Text>
            {r.failures.length === 0 && <Text dimColor>{`  ${w.noNames}`}</Text>}
            {r.failures.map(f => (
              <Box key={`fail:${f}`} flexDirection="row">
                <Text color="error">{'  ✗ '}</Text>
                <Button key={`fix:${f}`} plain label={clip(f, width - 22)} onPress={() => fill($, w.askFix(f, r.fullCommand))} />
                {isNew.has(f) && !isFlaky.has(f) && <Text color="warning">{`  ${w.isNew}`}</Text>}
                {/* flaky says more than new: it failed here before. */}
                {isFlaky.has(f) && <Text color="warning">{`  ${w.flaky}`}</Text>}
              </Box>
            ))}
          </Box>
        )}

        {gone.length > 0 && (
          <Box flexDirection="column">
            <Text bold>{w.fixed(gone.length)}</Text>
            {gone.map(f => (
              <Text key={`fixed:${f}`}>
                <Text color="success">{'  ✓ '}</Text>
                <Text>{clip(f, width - 6)}</Text>
              </Text>
            ))}
          </Box>
        )}

        <Box flexDirection="column">
          <Text>
            <Text bold>{w.runs}</Text>
            <Text dimColor>{`  ${w.pickRun}`}</Text>
          </Text>
          {recent.map(x => (
            <Box key={`run:${x.n}`} flexDirection="row">
              <Text color={x === r ? 'claude' : undefined}>{x === r ? '▸ ' : '  '}</Text>
              <Button key={`run:${x.n}`} plain dimColor={x !== r} label={`#${String(x.n).padEnd(4)}`} onPress={() => update($, selected, () => x.n)} />
              <Text>{x.runner.padEnd(8)}</Text>
              <Text color={x.failed ? 'error' : 'success'}>{score(x, lang).padEnd(8)}</Text>
              <Text dimColor>{`${elapsed(x.durationMs).padStart(6)}  ${clip(x.command, Math.max(10, width - 34))}${x.agentId ? ` (${w.subagent})` : ''}`}</Text>
            </Box>
          ))}
        </Box>

        {footer}
      </Box>
    )
  })
test-hud/hooks/ui.tsx lines 66–86 · Pane
export function verbRow(
  ui: Pick<Elements[keyof Elements], 'Box' | 'Text' | 'Button'>,
  command: string,
  verbs: readonly Verb[],
  onPress: (v: Verb) => void,
  lead = '',
) {
  const { Box, Text, Button } = ui
  return (
    <Box flexDirection="row" flexWrap="wrap">
      {lead !== '' && <Text dimColor>{`${lead} · `}</Text>}
      <Text dimColor>{`/${command} `}</Text>
      {verbs.map((v, i) => (
        <Box key={`verbrow:${v.verb}`} flexDirection="row">
          {i > 0 && <Text dimColor> · </Text>}
          <Button key={`verb:${v.verb}`} plain dimColor label={v.label ?? v.verb} onPress={() => onPress(v)} />
        </Box>
      ))}
    </Box>
  )
}
Licence text (MIT)
MIT License

Copyright (c) 2026 Lucas Fernandes

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 callsremembers

What its code shows

Read from the source at commit b03955fc8e5f 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.test-hud/hooks/register.tsx
ParsesEvery file parses as TypeScript or JavaScript.4 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 something of yours (files, environment variables, the transcript, settings) and reaches outside (the network, an MCP server, another session, telemetry).reads environment variables, files, 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).calls no tool, MCP server or command
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: tool.call (Bash), command.run · also: session.start, ui.render (Pane)
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: HOME, CLAUDE_CONFIG_DIR, LANG; files: a path computed at run time
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

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 ice-lfernandes/claude-code-mods
/plugin install test-hud@lfernandes-mods
/reload-plugins

This installs the marketplace's latest commit, which may not be the one read here (b03955fc8e5f). 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/ice-lfernandes/claude-code-mods
git -C claude-code-mods checkout b03955fc8e5f59734e36f58e84c2ab9959e40ce6
claude plugin validate claude-code-mods/test-hud
claude --plugin-dir claude-code-mods/test-hud

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 "ice-lfernandes-test-hud" with its code and make me one like it

Search them from Claude: the MCP connector

Similar mods

More from this repository

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/ice-lfernandes-test-hud.svg)](https://modscode.com/claude-mods/mods/ice-lfernandes-test-hud/)