Ranking|Claude Code Mods

ModsCode / Claude Code Mods / Ranking / wavy-usage

wavy-usage

Liquid-filled rings above the Claude Code prompt for the 5-hour and 7-day limit windows, context fill and prompt-cache lifetime, a fighter jet that shows the model's effort, and a pane of recent turns, their cost, their share of the 5-hour…

Code you can checkTerminal + desktopPaneBandToastBoxButtonSvgText
env vars, draws

What it does

  • Draws a pane, a band above the prompt
  • Adds /wavy-usage
  • Hooks session.measure, session.start, turn.complete, turn.step and 1 more
  • 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 wavy-usage by Batuhan Çakmak (pane, band, toast), as ModsCode read it from the mod's code:
// https://modscode.com/claude-mods/mods/batuhancakmakk-wavy-usage/
// 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: "‹paneTitle›" })
  on('ui.render', { component: 'Pane', requestId: 'my-pane' }, async ($, e) => {
    const { Box, Svg, Text, Button } = $.ui.resolve(e)
    const jetStrip = '…'
    const effort = '…'
    const liquidRing = '…'
    const label = '…'
    const value = '…'
    const win5h = '…'
    const percentText = '…'
    const extra = '…'
    const win7d = '…'
    const percentText2 = '…'
    const extra2 = '…'
    const ctx = '…'
    const percentText3 = '…'
    const tokens = '…'
    const cache = '…'
    const percentText4 = '…'
    const ttl = '…'
    const lastTurns = '…'
    const lastTurnsHint = '…'
    const turnsTotal = '…'
    const colTurn = '…'
    const headerCell = '…'
    const colSplit = '…'
    const colTokens = '…'
    const colCost = '…'
    const win5h2 = '…'
    const n = '…'
    const clockTime = '…'
    const turnBar = '…'
    const barAlt = '…'
    const ctxDeltaText = '…'
    const costText = '…'
    const fiveDeltaText = '…'
    const tokens2 = '…'
    const costText2 = '…'
    const fiveDeltaText2 = '…'
    const tokens3 = '…'
    const costText3 = '…'
    const fiveDeltaText3 = '…'
    const hint = '…'
    const barHint = '…'
    const filledBy = '…'
    const summary = '…'
    const byProject = '…'
    const shownName = '…'
    const resetBar = '…'
    const costText4 = '…'
    const turns = '…'
    const shownName2 = '…'
    const costText5 = '…'
    const turns2 = '…'
    const shownName3 = '…'
    const costText6 = '…'
    const turns3 = '…'
    const byModel = '…'
    const shownName4 = '…'
    const costText7 = '…'
    const turns4 = '…'
    const shownName5 = '…'
    const costText8 = '…'
    const turns5 = '…'
    const shownName6 = '…'
    const costText9 = '…'
    const turns6 = '…'
    const localOnly = '…'
    const resets = '…'
    const win5h3 = '…'
    const elapsedAlt = '…'
    const usedAlt = '…'
    const inTime = '…'
    const paceFull = '…'
    const win7d2 = '…'
    const inTime2 = '…'
    const paceFull2 = '…'
    return (
      <Box flexDirection="column" gap={1}>
        <Box flexDirection="column">
          <Svg source={`${jetStrip}`} alt={`${effort}`} height={84} isInteractive />
          <Text dimColor>
            {effort}
          </Text>
        </Box>
        <Box flexDirection="row" justifyContent="space-around">
          <Box flexDirection="column" alignItems="center">
            <Svg source={`${liquidRing}`} alt={`${label} ${value}`} width={64} height={64} isInteractive />
            <Text dimColor>
              {win5h}
            </Text>
            <Text bold>
              {percentText}
            </Text>
            <Text dimColor>
              {extra}
            </Text>
          </Box>
          <Box flexDirection="column" alignItems="center">
            <Svg source={`${liquidRing}`} alt={`${label} ${value}`} width={64} height={64} isInteractive />
            <Text dimColor>
              {win7d}
            </Text>
            <Text bold>
              {percentText2}
            </Text>
            <Text dimColor>
              {extra2}
            </Text>
          </Box>
          <Box flexDirection="column" alignItems="center">
            <Svg source={`${liquidRing}`} alt={`${label} ${value}`} width={64} height={64} isInteractive />
            <Text dimColor>
              {ctx}
            </Text>
            <Text bold>
              {percentText3}
            </Text>
            <Text dimColor>
              {`${tokens} / ${tokens}`}
            </Text>
          </Box>
          <Box flexDirection="column" alignItems="center">
            <Svg source={`${liquidRing}`} alt={`${label} ${value}`} width={64} height={64} isInteractive />
            <Text dimColor>
              {cache}
            </Text>
            <Text bold>
              {percentText4}
            </Text>
            <Text dimColor>
              {ttl}
            </Text>
          </Box>
        </Box>
        <Box flexDirection="column">
          <Text bold>
            {lastTurns}
          </Text>
          <Text dimColor>
            {lastTurnsHint}
          </Text>
        </Box>
        <Box flexDirection="column">
          <Text dimColor>
            {turnsTotal}
          </Text>
          <Box flexDirection="row" gap={1}>
            <Box width={12}>
              <Text dimColor>
                {colTurn}
              </Text>
            </Box>
            <Svg source={`${headerCell}`} alt={`${colSplit}`} height={14} />
            <Box width={6}>
              <Text dimColor>
                {colTokens}
              </Text>
            </Box>
            <Box width={7}>
              <Text dimColor>
                {colCost}
              </Text>
            </Box>
            <Box width={7}>
              <Text dimColor>
                {win5h2}
              </Text>
            </Box>
          </Box>
          <Box flexDirection="row" gap={1} alignItems="center">
            <Box width={12}>
              <Text dimColor wrap="truncate">
                {`#${n} ${clockTime}`}
              </Text>
            </Box>
            <Svg source={`${turnBar}`} alt={`${barAlt} · ctx ${ctxDeltaText}`} height={10} isInteractive />
            <Box width={6}>
              <Text bold>
                {tokens}
              </Text>
            </Box>
            <Box width={7}>
              <Text>
                {costText}
              </Text>
            </Box>
            <Box width={7}>
              <Text dimColor>
                {fiveDeltaText}
              </Text>
            </Box>
          </Box>
          <Box flexDirection="row" gap={1} alignItems="center">
            <Box width={12}>
              <Text dimColor wrap="truncate">
                {`#${n} ${clockTime}`}
              </Text>
            </Box>
            <Svg source={`${turnBar}`} alt={`${barAlt} · ctx ${ctxDeltaText}`} height={10} isInteractive />
            <Box width={6}>
              <Text bold>
                {tokens2}
              </Text>
            </Box>
            <Box width={7}>
              <Text>
                {costText2}
              </Text>
            </Box>
            <Box width={7}>
              <Text dimColor>
                {fiveDeltaText2}
              </Text>
            </Box>
          </Box>
          <Box flexDirection="row" gap={1} alignItems="center">
            <Box width={12}>
              <Text dimColor wrap="truncate">
                {`#${n} ${clockTime}`}
              </Text>
            </Box>
            <Svg source={`${turnBar}`} alt={`${barAlt} · ctx ${ctxDeltaText}`} height={10} isInteractive />
            <Box width={6}>
              <Text bold>
                {tokens3}
              </Text>
            </Box>
            <Box width={7}>
              <Text>
                {costText3}
              </Text>
            </Box>
            <Box width={7}>
              <Text dimColor>
                {fiveDeltaText3}
              </Text>
            </Box>
          </Box>
          <Box flexDirection="row" gap={2}>
            <Box flexDirection="row" gap={1}>
              <Text>
                ■
              </Text>
              <Text dimColor>
                {`${label}: ${hint}`}
              </Text>
            </Box>
            <Box flexDirection="row" gap={1}>
              <Text>
                ■
              </Text>
              <Text dimColor>
                {`${label}: ${hint}`}
              </Text>
            </Box>
          </Box>
          <Box flexDirection="row" gap={2}>
            <Box flexDirection="row" gap={1}>
              <Text>
                ■
              </Text>
              <Text dimColor>
                {`${label}: ${hint}`}
              </Text>
            </Box>
            <Box flexDirection="row" gap={1}>
              <Text>
                ■
              </Text>
              <Text dimColor>
                {`${label}: ${hint}`}
              </Text>
            </Box>
          </Box>
          <Text dimColor>
            {barHint}
          </Text>
        </Box>
        <Box flexDirection="row" gap={1} alignItems="center">
          <Text bold>
            {filledBy}
          </Text>
          <Box flexGrow={1} />
          <Button label={`${win5h}`} variant="primary" />
          <Button label={`${win7d}`} variant="primary" />
        </Box>
        <Box flexDirection="column">
          <Text dimColor>
            {summary}
          </Text>
          <Text bold>
            {byProject}
          </Text>
          <Box flexDirection="row" gap={1} alignItems="center">
            <Box width={14}>
              <Text wrap="truncate">
                {shownName}
              </Text>
            </Box>
            <Svg source={`${resetBar}`} alt={`${shownName}: ${costText}`} height={8} />
            <Box width={7}>
              <Text bold>
                {costText4}
              </Text>
            </Box>
            <Text dimColor>
              {turns}
            </Text>
          </Box>
          <Box flexDirection="row" gap={1} alignItems="center">
            <Box width={14}>
              <Text wrap="truncate">
                {shownName2}
              </Text>
            </Box>
            <Svg source={`${resetBar}`} alt={`${shownName}: ${costText}`} height={8} />
            <Box width={7}>
              <Text bold>
                {costText5}
              </Text>
            </Box>
            <Text dimColor>
              {turns2}
            </Text>
          </Box>
          <Box flexDirection="row" gap={1} alignItems="center">
            <Box width={14}>
              <Text wrap="truncate">
                {shownName3}
              </Text>
            </Box>
            <Svg source={`${resetBar}`} alt={`${shownName}: ${costText}`} height={8} />
            <Box width={7}>
              <Text bold>
                {costText6}
              </Text>
            </Box>
            <Text dimColor>
              {turns3}
            </Text>
          </Box>
          <Text bold>
            {byModel}
          </Text>
          <Box flexDirection="row" gap={1} alignItems="center">
            <Box width={14}>
              <Text wrap="truncate">
                {shownName4}
              </Text>
            </Box>
            <Svg source={`${resetBar}`} alt={`${shownName}: ${costText}`} height={8} />
            <Box width={7}>
              <Text bold>
                {costText7}
              </Text>
            </Box>
            <Text dimColor>
              {turns4}
            </Text>
          </Box>
          <Box flexDirection="row" gap={1} alignItems="center">
            <Box width={14}>
              <Text wrap="truncate">
                {shownName5}
              </Text>
            </Box>
            <Svg source={`${resetBar}`} alt={`${shownName}: ${costText}`} height={8} />
            <Box width={7}>
              <Text bold>
                {costText8}
              </Text>
            </Box>
            <Text dimColor>
              {turns5}
            </Text>
          </Box>
          <Box flexDirection="row" gap={1} alignItems="center">
            <Box width={14}>
              <Text wrap="truncate">
                {shownName6}
              </Text>
            </Box>
            <Svg source={`${resetBar}`} alt={`${shownName}: ${costText}`} height={8} />
            <Box width={7}>
              <Text bold>
                {costText9}
              </Text>
            </Box>
            <Text dimColor>
              {turns6}
            </Text>
          </Box>
        </Box>
        <Text dimColor>
          {localOnly}
        </Text>
        <Box flexDirection="column">
          <Text bold>
            {resets}
          </Text>
          <Box flexDirection="column">
            <Box flexDirection="row" gap={1} alignItems="center">
              <Box width={6}>
                <Text bold>
                  {win5h3}
                </Text>
              </Box>
              <Box flexDirection="column">
                <Svg source={`${resetBar}`} alt={`${elapsedAlt}`} height={8} />
                <Svg source={`${resetBar}`} alt={`${usedAlt}`} height={4} />
              </Box>
            </Box>
            <Text dimColor>
              {inTime}
            </Text>
            <Text color="#FF9800">
              {paceFull}
            </Text>
          </Box>
          <Box flexDirection="column">
            <Box flexDirection="row" gap={1} alignItems="center">
              <Box width={6}>
                <Text bold>
                  {win7d2}
                </Text>
              </Box>
              <Box flexDirection="column">
                <Svg source={`${resetBar}`} alt={`${elapsedAlt}`} height={8} />
                <Svg source={`${resetBar}`} alt={`${usedAlt}`} height={4} />
              </Box>
            </Box>
            <Text dimColor>
              {inTime2}
            </Text>
            <Text color="#FF9800">
              {paceFull2}
            </Text>
          </Box>
        </Box>
      </Box>
    )
  })

  // the band above the prompt; what else goes there is drawn under it
  on('ui.render', { component: 'AbovePrompt' }, async ($, e, next) => {
    const { Box, Text, Svg, Button } = $.ui.resolve(e)
    const waitingBand = '…'
    const jetStrip = '…'
    const effort = '…'
    const panel = '…'
    return (
      <Box flexDirection="column">
        <Box flexDirection="row" gap={2} alignItems="center">
          5h
          7d
          ctx
          <Text dimColor>
            {waitingBand}
          </Text>
          <Box flexGrow={1} />
          <Svg source={`${jetStrip}`} alt={`${effort}`} width={130} height={44} isInteractive />
          <Button label={`${panel}`} dimColor />
        </Box>
        {await next(e)}
      </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 368–527 · Pane
  on('ui.render', { component: 'Pane', requestId: PANE }, async ($, e, next) => {
    if (disabled) return next(e)
    if (e.surface !== 'desktop') {
      const { Text } = $.ui.resolve(e)
      return <Text dimColor>{t.desktopOnlyPane}</Text>
    }
    // Closing is the desktop header's own × control; the ui.close hook clears isPaneOpen.
    try {
      const { Box, Button, Svg, Text } = $.ui.resolve(e)
      const shownNow = await read($, screen)
      const r = shownNow.reading
      const turns = shownNow.turns
      const now = await $.clock.now()
      const width = Math.min(640, Math.max(160, e.props.bodyColumns * 7))
      const recent = recentTurns(turns, await read($, costBase))
      const scale = Math.max(0, ...recent.map(({ turn }) => turnTotal(turn)))
      const barWidth = Math.max(60, width - 230)
      const view = await read($, windowView)
      const since = windowStart(view, r, now)
      const entries = [...(await read($, others)), ...shownNow.log]
      const totals = windowTotals(entries, since)
      const shareWidth = Math.max(60, width - 230)
      const ttl = await read($, ttlMs)
      const cache = cacheState(shownNow.lastRequestAt, ttl, now, t)
      const big = (id: string, label: string, percent: number | undefined, extra?: string, value?: string, color?: string) => (
        <Box key={`big-${id}`} flexDirection="column" alignItems="center">
          <Svg
            source={liquidRing(percent, 64, 6, levelFrom(`pane-${id}`, percent), color)}
            alt={`${label} ${value ?? percentText(percent)}`}
            width={64}
            height={64}
            isInteractive
          />
          <Text dimColor>{label}</Text>
          <Text bold>{value ?? percentText(percent)}</Text>
          {extra !== undefined && <Text dimColor>{extra}</Text>}
        </Box>
      )
      const resetWidth = Math.max(60, width - 40)
      const paceSamples = await read($, samples)
      // Elapsed time on the blue bar, the limit used on a thin bar under it, and where it ends up at this pace.
      const resetRow = (label: string, at: number, length: number, clock: string, used: number | undefined, fullClock: (ms: number) => string) => {
        const pace = forecast(used, at, length, now, length === FIVE_HOURS ? paceSamples : [])
        return (
          <Box key={`reset-${label}`} flexDirection="column">
            <Box flexDirection="row" gap={1} alignItems="center">
              <Box width={6}>
                <Text bold>{label}</Text>
              </Box>
              <Box flexDirection="column">
                <Svg source={resetBar(windowElapsed(at, now, length), resetWidth)} alt={t.elapsedAlt(label)} width={resetWidth} height={8} />
                {used !== undefined && (
                  <Svg source={resetBar(used / 100, resetWidth, COLORS[heat(used)], 4)} alt={t.usedAlt(label)} width={resetWidth} height={4} />
                )}
              </Box>
            </Box>
            <Text dimColor>{t.inTime(countdown(at - now, t.units, COUNTDOWN_STEP), clock)}</Text>
            {pace?.fullAt !== undefined ? (
              <Text color={COLORS.warn}>{t.paceFull(fullClock(pace.fullAt), countdown(at - pace.fullAt, t.units, COUNTDOWN_STEP))}</Text>
            ) : (
              pace && <Text dimColor>{t.paceAtReset(Math.round(pace.atReset))}</Text>
            )}
          </Box>
        )
      }
      const groupRows = (groups: Group[]) => {
        const max = Math.max(0, ...groups.map(g => g.usd))
        return groups.map(g => (
          <Box key={`g-${g.name}`} flexDirection="row" gap={1} alignItems="center">
            <Box width={14}>
              <Text wrap="truncate">{shownName(g.name)}</Text>
            </Box>
            <Svg
              source={resetBar(max > 0 ? g.usd / max : 0, shareWidth)}
              alt={`${shownName(g.name)}: ${g.usd > 0 ? costText(g.usd) : t.noCost}`}
              width={shareWidth}
              height={8}
            />
            <Box width={7}>
              <Text bold>{g.usd > 0 ? costText(g.usd) : '-'}</Text>
            </Box>
            <Text dimColor>{t.turns(g.turns)}</Text>
          </Box>
        ))
      }
      const legend = [
        ['in', t.legendIn, t.hintIn],
        ['out', t.legendOut, t.hintOut],
        ['cacheWrite', t.legendCacheWrite, t.hintCacheWrite],
        ['cacheRead', t.legendCacheRead, t.hintCacheRead],
      ] as const
      const summary = turnsSummary(recent)
      // Column widths in cells; the bar column's header spans the bar's pixels (about 7 px a cell).
      const COL_TURN = 12
      const COL_TOKENS = 6
      const COL_COST = 7
      const COL_FIVE = 7
      // The bar column's header is drawn at the bar's own pixel width so the columns after it line up.
      const headerCell = (label: string, w: number) =>
        `<svg xmlns="http://www.w3.org/2000/svg" width="${w}" height="14"><text x="0" y="11" font-family="system-ui, sans-serif" font-size="12" fill="#888780">${label.replace(/&/g, '&amp;').replace(/</g, '&lt;')}</text></svg>`
      const legendWidth = Math.max(16, Math.floor(width / 7 / 2) - 2)
      const legendItem = ([k, label, hint]: (typeof legend)[number]) => (
        <Box key={`legend-${k}`} flexDirection="row" gap={1} width={legendWidth}>
          <Text color={SEGMENTS[k]}>■</Text>
          <Text dimColor>{`${label}: ${hint}`}</Text>
        </Box>
      )
      const fiveAt = r?.fiveHourResetsAt
      const sevenAt = r?.sevenDayResetsAt
      const level = await read($, effort)
      return (
        <Box flexDirection="column" gap={1}>
          {level !== null && (
            <Box key="jet" flexDirection="column">
              <Svg
                source={jetStrip(level, width, JET_PANE_H, JET_PANE_SCALE, t.effort(level), 'jp')}
                alt={t.effort(level)}
                width={width}
                height={JET_PANE_H}
                isInteractive
              />
              <Text dimColor>{t.effort(level)}</Text>
            </Box>
          )}
          {r === null ? (
            <Text dimColor>{t.waitingPane}</Text>
          ) : (
            <Box flexDirection="row" justifyContent="space-around">
              {r.fiveHour !== undefined && big('5h', t.win5h, r.fiveHour)}
              {r.sevenDay !== undefined && big('7d', t.win7d, r.sevenDay)}
              {big('ctx', t.ctx, r.ctxPercent, r.ctxTokens !== undefined ? `${tokens(r.ctxTokens)} / ${tokens(r.ctxWindow)}` : undefined)}
              {cache !== null && big('cache', t.cache, ringStep(cache.percent), t.ttl(ttlText(ttl, t)), cache.text, ttlColor(cache.percent))}
            </Box>
          )}
          <Box flexDirection="column">
            <Text bold>{t.lastTurns}</Text>
            <Text dimColor>{t.lastTurnsHint}</Text>
          </Box>
          {recent.length === 0 ? (
            <Text dimColor>{t.noTurns}</Text>
          ) : (
            <Box flexDirection="column">
              <Text dimColor>
                {t.turnsTotal(
                  tokens(summary.tokens),
                  summary.cost === null ? '-' : costText(summary.cost),
                  `${t.win5h} ${summary.five === null ? '-' : fiveDeltaText(summary.five, t.fiveReset)}`,
                )}
              </Text>
              <Box key="turn-head" flexDirection="row" gap={1}>
                <Box width={COL_TURN}>
                  <Text dimColor>{t.colTurn}</Text>
                </Box>
                <Svg source={headerCell(t.colSplit, barWidth)} alt={t.colSplit} width={barWidth} height={14} />
                <Box width={COL_TOKENS}>
                  <Text dimColor>{t.colTokens}</Text>
                </Box>
                <Box width={COL_COST}>
                  <Text dimColor>{t.colCost}</Text>
                </Box>
hooks/register.tsx lines 605–706 · Band
  on('ui.render', { component: 'AbovePrompt' }, async ($, e, next) => {
    if (disabled || e.props.hasSurvey) return next(e)
    if (!(await read($, isEnabled))) return next(e)
    if (e.surface === 'terminal') {
      try {
        const { Box, Text } = $.ui.resolve(e)
        const shownNow = await read($, screen)
        const r = shownNow.reading
        const cache = cacheState(shownNow.lastRequestAt, await read($, ttlMs), await $.clock.now(), t)
        const rest = await next(e)
        const level = await read($, effort)
        const parts = [
          ...terminalParts(r, cache, e.props.bodyColumns, t),
          ...(level === null ? [] : [{ text: `  ✈ ${level}`, color: JET_TERMINAL_COLOR[level] }]),
        ]
        return (
          <Box flexDirection="column">
            <Text wrap="truncate">
              {parts.map((p, i) => (
                <Text key={String(i)} color={p.color} dimColor={p.dim} bold={p.bold}>
                  {p.text}
                </Text>
              ))}
            </Text>
            {rest}
          </Box>
        )
      } catch (err) {
        logRenderError($, err)
        return next(e)
      }
    }
    if (e.surface !== 'desktop') return next(e)
    try {
      const { Box, Button, Svg, Text } = $.ui.resolve(e)
      const shownNow = await read($, screen)
      const r = shownNow.reading
      const cache = cacheState(shownNow.lastRequestAt, await read($, ttlMs), await $.clock.now(), t)
      const rest = await next(e)
      const layout = bandLayout(e.props.bodyColumns)
      const level = await read($, effort)
      const metric = (id: string, label: string, percent: number | undefined, extra?: string, value?: string, color?: string) => (
        <Box key={`m-${id}`} flexDirection="row" gap={1} alignItems="center">
          <Svg
            source={liquidRing(percent, BAND_RING, BAND_STROKE, levelFrom(`band-${id}`, percent), color)}
            alt={`${label} ${value ?? percentText(percent)}`}
            width={BAND_RING}
            height={BAND_RING}
            isInteractive
          />
          <Box flexDirection="column">
            <Text dimColor>{label}</Text>
            <Box flexDirection="row" gap={1}>
              <Text bold>{value ?? percentText(percent)}</Text>
              {extra !== undefined && <Text dimColor>{`· ${extra}`}</Text>}
            </Box>
          </Box>
        </Box>
      )
      // A finished turn means the API answered: the cache ring shows even before a measurement.
      const cacheMetric = cache !== null && metric('cache', t.cache, ringStep(cache.percent), undefined, cache.text, ttlColor(cache.percent))
      const metrics =
        r === null
          ? [
              metric('5h', t.win5h, undefined),
              metric('7d', t.win7d, undefined),
              metric('ctx', t.ctx, undefined),
              cacheMetric,
              <Text dimColor>{t.waitingBand}</Text>,
            ]
          : [
              r.fiveHour !== undefined && metric('5h', t.win5h, r.fiveHour),
              r.sevenDay !== undefined && metric('7d', t.win7d, r.sevenDay),
              metric('ctx', t.ctx, r.ctxPercent, layout.showCtxTokens && r.ctxTokens !== undefined ? tokens(r.ctxTokens) : undefined),
              cacheMetric,
              layout.showCost && r.usd !== undefined && <Text dimColor>{`$${r.usd.toFixed(2)}`}</Text>,
            ]
      return (
        <Box flexDirection="column">
          <Box flexDirection="row" gap={2} alignItems="center">
            {metrics}
            <Box flexGrow={1} />
            {level !== null && layout.showJet && (
              <Svg
                key="jet"
                source={jetStrip(level, JET_W, JET_H, JET_SCALE, t.effort(level), 'jb')}
                alt={t.effort(level)}
                width={JET_W}
                height={JET_H}
                isInteractive
              />
            )}
            <Button key="pane" label={t.panel} dimColor onPress={() => togglePane($)} />
          </Box>
          {rest}
        </Box>
      )
    } catch (err) {
      logRenderError($, err)
      return next(e)
    }
  })
Licence text (MIT)
MIT License

Copyright (c) 2026 Batuhan Çakmak

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), Add a slash command

What its code calls

env varsremembers

What its code shows

Read from the source at commit 747a9806e7e3 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.hooks/register.tsx
ParsesEvery file parses as TypeScript or JavaScript.6 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, 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.asks nothing of the model
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 (wavy-usage) · shapes: turn.step · also: session.start, session.measure, turn.complete, ui.close (+1) · timers: clock.every
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: CLAUDE_MODS_DISABLE
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.writes no files, environment variables, settings or conversation rows

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 BatuhanCakmakk/wavy-usage
/plugin install wavy-usage@wavy-usage
/reload-plugins

This installs the marketplace's latest commit, which may not be the one read here (747a9806e7e3). 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/BatuhanCakmakk/wavy-usage
git -C wavy-usage checkout 747a9806e7e3e1717cd6144452a1821d5d254c9f
claude plugin validate wavy-usage
claude --plugin-dir wavy-usage

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 "batuhancakmakk-wavy-usage" with its code and make me one like it

Search them from Claude: the MCP connector

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/batuhancakmakk-wavy-usage.svg)](https://modscode.com/claude-mods/mods/batuhancakmakk-wavy-usage/)