Ranking|Claude Code Mods

ModsCode / Claude Code Mods / Ranking / tool-timeline

tool-timeline

Folds each turn's tool calls into one line under the turn's closing line, with how long each took and the slowest highlighted.

Code you can checkTerminal + desktopPaneToastBoxButtonClientSvgText
writes files, runs programs, draws

What it does

  • Draws a pane
  • Adds /tool-timeline
  • Watches tool calls and can refuse them
  • Hooks prompt.submit, session.compact, session.start, turn.complete and 3 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

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 tool-timeline by wonwoo (pane, toast), as ModsCode read it from the mod's code:
// https://modscode.com/claude-mods/mods/wonwoo-tool-timeline/
// 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: "Tool timeline" })
  on('ui.render', { component: 'Pane', requestId: 'my-pane' }, async ($, e) => {
    const { Box, Text, Svg, Button } = $.ui.resolve(e)
    const took = '…'
    const rowSvg = '…'
    const age = '…'
    const count = '…'
    const slowest = '…'
    const words = '…'
    const lead = '…'
    const formatMs = '…'
    const MARKS = '…'
    const labelOf = '…'
    const usual = '…'
    const progress = '…'
    const detail = '…'
    const lead2 = '…'
    const formatMs2 = '…'
    const MARKS2 = '…'
    const labelOf2 = '…'
    const detail2 = '…'
    const lead3 = '…'
    const formatMs3 = '…'
    const MARKS3 = '…'
    const labelOf3 = '…'
    const detail3 = '…'
    const took2 = '…'
    const age2 = '…'
    const count2 = '…'
    const slowest2 = '…'
    const lead4 = '…'
    const formatMs4 = '…'
    const MARKS4 = '…'
    const labelOf4 = '…'
    const detail4 = '…'
    const lead5 = '…'
    const formatMs5 = '…'
    const MARKS5 = '…'
    const labelOf5 = '…'
    const detail5 = '…'
    return (
      <Box flexDirection="column">
        <Text dimColor>
          No tool calls in this turn yet.
        </Text>
        <Text>
          {" "}
        </Text>
        <Text bold>
          Earlier
        </Text>
        <Box flexDirection="row" alignItems="center">
          <Box>
            <Text dimColor>
              {took}
            </Text>
          </Box>
          <Box>
            <Svg source={`${rowSvg}`} width={80} height={12} alt={`${took}`} />
          </Box>
          <Box marginLeft={1}>
            <Text dimColor>
              {age}
            </Text>
          </Box>
          <Box>
            <Text dimColor>
              {count}
            </Text>
          </Box>
          <Box>
            <Text color="#b48ead">
              {slowest}
            </Text>
          </Box>
          <Text dimColor wrap="truncate" />
          <Box position="absolute" top={0} left={0}>
            <Button plain label="        " />
          </Box>
        </Box>
        <Box flexDirection="column" paddingLeft={2}>
          <Text>
            {" "}
          </Text>
          <Box flexDirection="row">
            <Box width={2}>
              <Text dimColor>
                ├
              </Text>
            </Box>
            <Text dimColor>
              {`… ${words}`}
            </Text>
          </Box>
          <Box flexDirection="row" alignItems="center">
            <Box width={2}>
              <Text dimColor>
                {lead}
              </Text>
            </Box>
            <Box width={5} justifyContent="flex-end">
              <Text>
                {formatMs}
              </Text>
            </Box>
            <Box marginLeft={1}>
              <Svg source={`${rowSvg}`} width={80} height={12} alt={`${formatMs}`} />
            </Box>
            <Box marginLeft={1} width={2}>
              <Text>
                {MARKS}
              </Text>
            </Box>
            <Box>
              <Text wrap="truncate">
                {labelOf}
              </Text>
            </Box>
            <Text color="#b48ead">
              {`${usual}  `}
            </Text>
            <Text color="#b48ead">
              {`${progress}  `}
            </Text>
            <Text dimColor wrap="truncate">
              {detail}
            </Text>
          </Box>
          <Box flexDirection="row" alignItems="center">
            <Box width={2}>
              <Text dimColor>
                {lead2}
              </Text>
            </Box>
            <Box width={5} justifyContent="flex-end">
              <Text>
                {formatMs2}
              </Text>
            </Box>
            <Box marginLeft={1}>
              <Svg source={`${rowSvg}`} width={80} height={12} alt={`${formatMs}`} />
            </Box>
            <Box marginLeft={1} width={2}>
              <Text>
                {MARKS2}
              </Text>
            </Box>
            <Box>
              <Text wrap="truncate">
                {labelOf2}
              </Text>
            </Box>
            <Text color="#b48ead">
              {`${usual}  `}
            </Text>
            <Text color="#b48ead">
              {`${progress}  `}
            </Text>
            <Text dimColor wrap="truncate">
              {detail2}
            </Text>
          </Box>
          <Box flexDirection="row" alignItems="center">
            <Box width={2}>
              <Text dimColor>
                {lead3}
              </Text>
            </Box>
            <Box width={5} justifyContent="flex-end">
              <Text>
                {formatMs3}
              </Text>
            </Box>
            <Box marginLeft={1}>
              <Svg source={`${rowSvg}`} width={80} height={12} alt={`${formatMs}`} />
            </Box>
            <Box marginLeft={1} width={2}>
              <Text>
                {MARKS3}
              </Text>
            </Box>
            <Box>
              <Text wrap="truncate">
                {labelOf3}
              </Text>
            </Box>
            <Text color="#b48ead">
              {`${usual}  `}
            </Text>
            <Text color="#b48ead">
              {`${progress}  `}
            </Text>
            <Text dimColor wrap="truncate">
              {detail3}
            </Text>
          </Box>
          <Box flexDirection="row">
            <Box width={2}>
              <Text dimColor>
                └
              </Text>
            </Box>
            <Text dimColor>
              {`… ${words}`}
            </Text>
          </Box>
        </Box>
        <Box flexDirection="row" alignItems="center">
          <Box>
            <Text dimColor>
              {took2}
            </Text>
          </Box>
          <Box>
            <Svg source={`${rowSvg}`} width={80} height={12} alt={`${took}`} />
          </Box>
          <Box marginLeft={1}>
            <Text dimColor>
              {age2}
            </Text>
          </Box>
          <Box>
            <Text dimColor>
              {count2}
            </Text>
          </Box>
          <Box>
            <Text color="#b48ead">
              {slowest2}
            </Text>
          </Box>
          <Text dimColor wrap="truncate" />
          <Box position="absolute" top={0} left={0}>
            <Button plain label="        " />
          </Box>
        </Box>
        <Box flexDirection="column" paddingLeft={2}>
          <Text>
            {" "}
          </Text>
          <Box flexDirection="row">
            <Box width={2}>
              <Text dimColor>
                ├
              </Text>
            </Box>
            <Text dimColor>
              {`… ${words}`}
            </Text>
          </Box>
          <Box flexDirection="row" alignItems="center">
            <Box width={2}>
              <Text dimColor>
                {lead4}
              </Text>
            </Box>
            <Box width={5} justifyContent="flex-end">
              <Text>
                {formatMs4}
              </Text>
            </Box>
            <Box marginLeft={1}>
              <Svg source={`${rowSvg}`} width={80} height={12} alt={`${formatMs}`} />
            </Box>
            <Box marginLeft={1} width={2}>
              <Text>
                {MARKS4}
              </Text>
            </Box>
            <Box>
              <Text wrap="truncate">
                {labelOf4}
              </Text>
            </Box>
            <Text color="#b48ead">
              {`${usual}  `}
            </Text>
            <Text color="#b48ead">
              {`${progress}  `}
            </Text>
            <Text dimColor wrap="truncate">
              {detail4}
            </Text>
          </Box>
          <Box flexDirection="row" alignItems="center">
            <Box width={2}>
              <Text dimColor>
                {lead5}
              </Text>
            </Box>
            <Box width={5} justifyContent="flex-end">
              <Text>
                {formatMs5}
              </Text>
            </Box>
            <Box marginLeft={1}>
              <Svg source={`${rowSvg}`} width={80} height={12} alt={`${formatMs}`} />
            </Box>
            <Box marginLeft={1} width={2}>
              <Text>
                {MARKS5}
              </Text>
            </Box>
            <Box>
              <Text wrap="truncate">
                {labelOf5}
              </Text>
            </Box>
            <Text color="#b48ead">
              {`${usual}  `}
            </Text>
            <Text color="#b48ead">
              {`${progress}  `}
            </Text>
            <Text dimColor wrap="truncate">
              {detail5}
            </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 441–506 · Pane
  on('ui.render', { component: 'Pane', requestId: PANE }, async ($, e) => {
    const kit = $.ui.resolve(e)
    const { Box, Text, Button } = kit
    const list = await read($, calls)
    const at = await read($, now)
    const rows = rowsOf(list, at)
    const sent = await read($, stepStartedAt)
    // The request under way grows up to now, as a running call does
    const requests = [...(await read($, steps)), ...(sent === null ? [] : [{ startedAt: sent, endedAt: Math.max(at, sent) }])]
    const Image = e.surface === 'terminal' ? await picturesImage($, kit) : undefined
    const draw: PaneDraw = {
      Text,
      pictures: Image === undefined ? undefined : { Box, Image },
      // The desktop's font is not one of even letters: there the lines are columns, their bars SVG, as its folds are
      desktop: e.surface === 'desktop' && 'Svg' in kit ? { Box, Text, Svg: kit.Svg as ElementConstructor<SvgProps> } : undefined,
      columns: e.props.bodyColumns,
    }
    const Client = e.surface === 'terminal' && 'Client' in kit ? (kit.Client as ElementConstructor<ClientProps>) : undefined
    const startedAt = await read($, turnStartedAt)
    // Once the turn is done, as long as it took; until then, up to its latest moment known
    const ended = await read($, turnEndedAt)
    const isDone = ended !== null
    // The turns before, newest first; the current one, once done, is the one drawn above
    const time = await $.clock.now()
    const open = await read($, paneOpen)
    const earlier = (await read($, turns))
      .filter(one => !(isDone && one.startedAt === startedAt))
      .slice(-MAX_PANE_TURNS)
      .reverse()
    const history = () =>
      earlier.length > 0 && [
        <Text> </Text>,
        <Text bold>Earlier</Text>,
        ...historyLines({ Box, Text, Button, Client, draw }, earlier, open, time, turnId => togglePaneTurn($, turnId)),
      ]

    if (rows.length === 0 && requests.length === 0) {
      return drawFiled($, () => (
        <Box flexDirection="column">
          <Text dimColor>No tool calls in this turn yet.</Text>
          {history()}
        </Box>
      ))
    }
    const endedAt = ended ?? Math.max(at, ...list.map(call => call.endedAt ?? call.startedAt), ...requests.map(step => step.endedAt))
    const turn: TimelineTurn = { turnId: 'live', durationMs: endedAt - startedAt, startedAt, endedAt, calls: list, steps: requests, answer: '' }
    const running = rows.filter(row => row.call.outcome === 'running').length
    const slowest = rows.length === 0 ? undefined : slowestOf(rows)
    // While it runs its bars change every second, each a new picture: glyphs then, pictures once it is done
    const current: PaneDraw = isDone ? draw : { ...draw, pictures: undefined }

    return drawFiled($, () => (
      <Box flexDirection="column">
        <Text wrap="truncate">
          <Text bold>{isDone ? 'Last turn' : 'This turn'}</Text>
          <Text dimColor>{` · ${formatMs(turn.durationMs)}${rows.length === 0 ? '' : ` · ${countOf(rows)}`}`}</Text>
          {running > 0 && <Text color={SLOW_COLOR}>{` · ${running} running`}</Text>}
          {slowest !== undefined && <Text dimColor>{' · slowest '}</Text>}
          {slowest !== undefined && <Text color={SLOW_COLOR}>{`${slowest.call.tool} ${formatMs(slowest.ms)}`}</Text>}
        </Text>
        <Text> </Text>
        {paneTurnBody(current, turn, rows, true)}
        {history()}
      </Box>
    ))
  })
hooks/register.tsx lines 845–966 · Pane
function historyLines(kit: HistoryKit, earlier: TimelineTurn[], open: string[], time: number, toggle: (turnId: string) => unknown) {
  const { Box, Text, Button, Client, draw } = kit
  const { pictures, desktop } = draw
  const lines = earlier.map(turn => {
    const rows = rowsOf(turn.calls, 0)
    const slowest = slowestOf(rows)

    return {
      turn,
      rows,
      took: formatMs(turn.durationMs),
      age: agoOf(time - turn.endedAt),
      count: countOf(rows),
      slowest: `${slowest.call.tool} ${formatMs(slowest.ms)}`,
    }
  })
  const longest = Math.max(...earlier.map(turn => turn.durationMs))
  const widest = (pick: (line: (typeof lines)[number]) => string) => Math.max(...lines.map(line => pick(line).length))
  // Every column as wide as its widest and its words from its start, the time's too, so each line starts where the
  // heading does
  const [tookWidth, ageWidth, countWidth, slowestWidth] = [
    widest(line => line.took),
    widest(line => line.age),
    widest(line => line.count),
    widest(line => line.slowest),
  ]

  return lines.map(({ turn, rows, took, age, count, slowest }) => {
    const isOpen = open.includes(turn.turnId)
    const prompt = cut(turn.prompt ?? '', MAX_PROMPT_LETTERS)
    const unfolded = isOpen && (
      <Box flexDirection="column" paddingLeft={2}>
        {paneTurnBody({ ...draw, columns: draw.columns - 2 }, turn, rows, false)}
      </Box>
    )
    // The desktop: columns, the bar an SVG, the line a button of blank label laid over it, as its folded line is
    if (desktop !== undefined) {
      const { Svg } = desktop
      const cellsOf = (letters: number) => Math.ceil(letters * DESKTOP_CELLS_PER_LETTER) + 2
      const [tookCells, ageCells, countCells, slowestCells] = [cellsOf(tookWidth), cellsOf(ageWidth), cellsOf(countWidth), cellsOf(slowestWidth)]
      // The button as wide as the whole line: its columns and its bar in cells, the prompt a cell a letter, as its wide
      // letters may take; two no-break spaces a letter, as the folded line's
      const lineCells = tookCells + DESKTOP_ROW_WIDTH / DESKTOP_PX_PER_CELL + 1 + ageCells + countCells + slowestCells + prompt.length
      const blanks = Math.ceil((lineCells / DESKTOP_CELLS_PER_LETTER) * 2) + 4

      return [
        <Box flexDirection="row" alignItems="center">
          <Box width={tookCells}>
            <Text dimColor>{took}</Text>
          </Box>
          <Box>
            <Svg source={rowSvg(turn.durationMs, longest)} width={DESKTOP_ROW_WIDTH} height={12} alt={took} />
          </Box>
          <Box marginLeft={1} width={ageCells}>
            <Text dimColor>{age}</Text>
          </Box>
          <Box width={countCells}>
            <Text dimColor>{count}</Text>
          </Box>
          <Box width={slowestCells}>
            <Text color={SLOW_COLOR}>{slowest}</Text>
          </Box>
          <Text dimColor wrap="truncate">
            {prompt}
          </Text>
          <Box position="absolute" top={0} left={0}>
            <Button key={`history-${turn.turnId}`} plain label={'\u00a0'.repeat(blanks)} onPress={() => toggle(turn.turnId)} />
          </Box>
        </Box>,
        unfolded,
      ]
    }
    const props: HistoryProps = {
      turnId: turn.turnId,
      age: age.padEnd(ageWidth),
      count: count.padEnd(countWidth),
      slowest: slowest.padEnd(slowestWidth),
      prompt,
    }
    // A space in from the heading, so the lines do not crowd its edge
    const head = <Text dimColor>{` ${took.padEnd(tookWidth)} `}</Text>
    const fraction = longest > 0 ? turn.durationMs / longest : 0
    const { filled, track } = gauge(turn.durationMs, longest)
    const bar =
      pictures !== undefined ? (
        <pictures.Image
          source={filed(barPicture(BAR_CELLS, [{ from: 0, to: fraction }], BAR_COLOR, { color: INK_COLOR, alpha: PICTURE_TRACK_ALPHA }))}
          columns={BAR_CELLS}
          rows={1}
          alt={took}
        />
      ) : (
        <Text>
          <Text color={BAR_COLOR}>{filled}</Text>
          <Text dimColor>{track}</Text>
        </Text>
      )
    const words =
      Client !== undefined ? (
        <Client key={`history-${turn.turnId}`} module="./history.tsx" props={props} />
      ) : (
        <Button
          key={`history-${turn.turnId}`}
          plain
          dimColor
          label={` ${props.age}  ${props.count}  ${props.slowest}${prompt === '' ? '' : `  ${prompt}`}`}
          onPress={() => toggle(turn.turnId)}
        />
      )

    return [
      <Box flexDirection="row" overflow="hidden">
        <Box flexShrink={0}>
          {head}
          {bar}
        </Box>
        {words}
      </Box>,
      unfolded,
    ]
  })
}
hooks/register.tsx lines 798–841 · Pane
function paneTurnBody(draw: PaneDraw, turn: TimelineTurn, rows: Row[], isCurrent: boolean) {
  const { Text, pictures, desktop, columns } = draw
  const lanes = lanesOf(turn)
  // As wide as the pane leaves beside a lane's name and the longest totals, so no lane's are cut
  const tail = Math.max(0, ...lanes.map(lane => laneTail(lane).join('').length))
  const cells = Math.max(MIN_PANE_LANE_CELLS, Math.min(LANE_CELLS, columns - LANE_NAME_LETTERS - 1 - tail))
  const laneLines = desktop !== undefined ? desktopLaneLines(desktop, lanes, turn, columns) : lanes.map(lane => laneLine(Text, lane, turn, pictures, { lead: '', cells }))
  if (rows.length === 0) {
    return laneLines
  }
  const shown = isCurrent ? rows.slice(-MAX_UNFOLDED_ROWS) : groupedRows(rows).sort((a, b) => b.ms - a.ms).slice(0, MAX_UNFOLDED_ROWS)
  const hidden = rows.length - shown.reduce((sum, row) => sum + row.count, 0)
  // The bars against the slowest call; an earlier turn's against its first row, which may hold several
  const slowest = isCurrent ? slowestOf(rows) : (shown[0] ?? slowestOf(rows))
  const nameWidth = nameWidthOf(shown)
  // Wide enough for the longest name, as the lanes' count column is, and a gap before what it ran on
  const nameCells = Math.ceil(nameWidth * DESKTOP_CELLS_PER_LETTER) + 3
  // The branch in its column on the desktop, as the rows' is
  const note = (lead: string, words: string) =>
    desktop !== undefined ? (
      <desktop.Box flexDirection="row">
        <desktop.Box width={DESKTOP_MARK_CELLS}>
          <Text dimColor>{lead}</Text>
        </desktop.Box>
        <Text dimColor>{`… ${words}`}</Text>
      </desktop.Box>
    ) : (
      <Text dimColor>{`${lead} … ${words}`}</Text>
    )

  return [
    ...laneLines,
    <Text> </Text>,
    isCurrent && hidden > 0 && note('├', leftOut(hidden, 'earlier')),
    ...shown.map((row, i) => {
      const lead = i === shown.length - 1 && (isCurrent || hidden === 0) ? '└ ' : '├ '

      return desktop !== undefined
        ? desktopRowLine(desktop, row, slowest, nameCells, lead.trim())
        : rowLine(Text, row, slowest, nameWidth, lead, pictures)
    }),
    !isCurrent && hidden > 0 && note('└', leftOut(hidden, 'faster')),
  ]
}
hooks/register.tsx lines 1031–1070 · Pane
function desktopRowLine(kit: DesktopKit, row: Row, slowest: Row, nameCells: number, lead: string) {
  const { Box, Text, Svg } = kit
  const { call, ms } = row
  const isSlowest = row === slowest
  const tone = isSlowest || call.outcome === 'running' ? { color: SLOW_COLOR } : ms >= 1000 ? {} : { dimColor: true }
  const usual = usualNote(row)
  const progress = call.outcome === 'running' ? progressNote(row).trim() : ''

  return (
    <Box flexDirection="row" alignItems="center">
      {/* The branch and the mark each in a column of its own: `└` is wider than `├`, `✗` than `·` */}
      <Box width={DESKTOP_MARK_CELLS}>
        <Text dimColor>{lead}</Text>
      </Box>
      <Box width={DESKTOP_TIME_CELLS} justifyContent="flex-end">
        <Text {...tone} {...(isSlowest ? { bold: true } : {})}>
          {formatMs(ms)}
        </Text>
      </Box>
      <Box marginLeft={1}>
        <Svg source={rowSvg(ms, slowest.ms)} width={DESKTOP_ROW_WIDTH} height={12} alt={formatMs(ms)} />
      </Box>
      <Box marginLeft={1} width={DESKTOP_MARK_CELLS}>
        <Text {...(call.outcome === 'error' || call.outcome === 'denied' ? { color: 'error' } : { dimColor: true })}>
          {MARKS[call.outcome]}
        </Text>
      </Box>
      <Box width={nameCells}>
        <Text bold={isSlowest} wrap="truncate">
          {labelOf(row)}
        </Text>
      </Box>
      {usual !== '' && <Text color={SLOW_COLOR}>{`${usual}  `}</Text>}
      {progress !== '' && <Text color={SLOW_COLOR}>{`${progress}  `}</Text>}
      <Text dimColor wrap="truncate">
        {call.detail}
      </Text>
    </Box>
  )
}
hooks/register.tsx lines 1412–1501 · Pane
function rowLine(Text: TextElement, row: Row, slowest: Row, nameWidth: number, lead: string, pictures?: Pictures, region?: Region) {
  const { call, ms } = row
  const isSlowest = row === slowest
  const { filled, track } = gauge(ms, slowest.ms)
  const tone = isSlowest || call.outcome === 'running' ? { color: SLOW_COLOR } : ms >= 1000 ? {} : { dimColor: true }
  const mark = MARKS[call.outcome]
  const usual = usualNote(row)
  const progress = call.outcome === 'running' ? progressNote(row) : ''
  const words =
    region === undefined ? undefined : (
      <region.Client
        key={region.key}
        module="./row.tsx"
        props={{
          turnId: region.turnId,
          callId: call.id,
          mark,
          isFailed: call.outcome === 'error' || call.outcome === 'denied',
          label: labelOf(row),
          pad: ' '.repeat(Math.max(0, nameWidth - labelOf(row).length)),
          isSlowest,
          usual,
          detail: call.detail,
          isOpen: region.isOpen,
          canAsk: canAskWhy(row),
        } satisfies RowProps}
      />
    )

  const head = [
    <Text dimColor>{lead}</Text>,
    <Text {...tone} {...(isSlowest ? { bold: true } : {})}>
      {formatMs(ms).padStart(6)}
    </Text>,
    ' ',
  ]
  const tail = [
    ' ',
    <Text {...(call.outcome === 'error' || call.outcome === 'denied' ? { color: 'error' } : { dimColor: true })}>
      {mark}
    </Text>,
    ' ',
    <Text {...(isSlowest ? { bold: true } : {})}>{labelOf(row).padEnd(nameWidth)}</Text>,
    usual !== '' && <Text color={SLOW_COLOR}>{`  ${usual}`}</Text>,
    progress !== '' && <Text color={SLOW_COLOR}>{progress}</Text>,
    <Text dimColor>{call.detail === '' ? '' : `  ${call.detail}`}</Text>,
  ]
  // Every bar in the same sky: the slowest is told by its violet time and bold name, a block of violet would read
  // as another color than those letters
  if (pictures !== undefined) {
    const { Box, Image } = pictures
    const stretches = ms > 0 ? [{ from: 0, to: slowest.ms > 0 ? ms / slowest.ms : 1 }] : []
    const source = filed(barPicture(BAR_CELLS, stretches, BAR_COLOR, { color: INK_COLOR, alpha: PICTURE_TRACK_ALPHA }))

    // Its branch and time keep their letters on a narrow transcript, the line cut at the edge
    return (
      <Box flexDirection="row" overflow="hidden">
        <Box flexShrink={0}>
          <Text>{head}</Text>
        </Box>
        <Image source={source} columns={BAR_CELLS} rows={1} alt={`${filled}${track}`} />
        {words ?? <Text wrap="truncate">{tail}</Text>}
      </Box>
    )
  }
  const bar = [<Text color={BAR_COLOR}>{filled}</Text>, <Text dimColor>{track}</Text>]
  if (region !== undefined) {
    const { Box } = region

    return (
      <Box flexDirection="row" overflow="hidden">
        <Box flexShrink={0}>
          <Text>
            {head}
            {bar}
          </Text>
        </Box>
        {words}
      </Box>
    )
  }

  return (
    <Text wrap="truncate">
      {head}
      {bar}
      {tail}
    </Text>
  )
}
Licence text (MIT)
MIT License

Copyright (c) 2026 wonwoo

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

runs programswrites filesenv varsdrives Claudetool callsremembers

What its code shows

Read from the source at commit 3c7bf309f308. 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.5 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:265 find (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.hooks/register.tsx:241 sh (a shell or interpreter)
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 tool-timeline, model.fork (sends its own transcript)
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 (tool-timeline), prompt.submit, tool.check, tool.call · shapes: turn.step · reads: ui.message · also: session.start, session.compact, turn.start, turn.complete (+1) · timers: clock.every, 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: TERM_PROGRAM, TERM, SSH_CONNECTION
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.files: ….b64

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 wonwoo/tool-timeline
/plugin install tool-timeline@tool-timeline
/reload-plugins

This installs the marketplace's latest commit, which may not be the one read here (3c7bf309f308). 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/wonwoo/tool-timeline
git -C tool-timeline checkout 3c7bf309f30843e503f95d7d27106c18c391a73e
claude plugin validate tool-timeline
claude --plugin-dir tool-timeline

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 or ChatGPT about it

With ModsCode added as a connector, Claude or ChatGPT can read this mod's code, what it reaches and how its controls are wired, and build on them. Ask it like this:

Read the ModsCode mod "wonwoo-tool-timeline" with its code and make me one like it

Add the ModsCode MCP to Claude or ChatGPT

Similar mods

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/wonwoo-tool-timeline.svg)](https://modscode.com/claude-mods/mods/wonwoo-tool-timeline/)