Ranking|Claude Code Mods

ModsCode / Claude Code Mods / Ranking / decision-log

decision-log

Claude logs its judgement calls as it works; approve or reject each one with a comment from a side pane

Code you can checkTerminal + desktopPaneStatus lineToastBoxButtonInputText
drives Claude, draws

What it does

  • Draws a pane, the status line, toasts
  • Adds /decisions
  • Watches tool calls and can refuse them
  • Hooks prompt.compose, session.start, turn.complete, turn.start and 2 more

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 decision-log by Hector Bailey (pane, status, toast), as ModsCode read it from the mod's code:
// https://modscode.com/claude-mods/mods/hectorbailey-decision-log/
// 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: "Decisions" })
  on('ui.render', { component: 'Pane', requestId: 'my-pane' }, async ($, e) => {
    const { Box, Text, Button, Input } = $.ui.resolve(e)
    const right = '…'
    const icon = '…'
    const verb = '…'
    const id = '…'
    const choice = '…'
    const text = '…'
    const map = '…'
    const start = '…'
    const below = '…'
    const label = '…'
    const choice2 = '…'
    const why = '…'
    const alternatives = '…'
    const impact = '…'
    const comment = '…'
    const draft = '…'
    const length = '…'
    const approved = '…'
    const rejected = '…'
    const pending = '…'
    const level = '…'
    const count = '…'
    const level2 = '…'
    const count2 = '…'
    const level3 = '…'
    const count3 = '…'
    const keyHelp = '…'
    return (
      <Box flexDirection="column">
        <Box gap={1}>
          <Text bold>
            <Text color="claude">
              ◆
            </Text>
            {" Decision log"}
          </Text>
          <Text dimColor>
            {"· "}
            {right}
          </Text>
        </Box>
        <Box flexDirection="column">
          <Box flexDirection="column" alignItems="center">
            <Text color="claude">
              working
            </Text>
          </Box>
        </Box>
        <Box flexDirection="column" marginTop={1}>
          <Box gap={1} />
          <Text>
            <Text color="success">
              ▔▔▔▔▔▔▔▔
            </Text>
            <Text color="error">
              ▔▔▔▔▔▔▔▔
            </Text>
            <Text dimColor>
              ▔▔▔▔▔▔▔▔
            </Text>
          </Text>
          <Box gap={1} marginTop={1}>
            <Text>
              {icon}
            </Text>
            <Text bold>
              {`${verb} D${id}`}
            </Text>
            <Text dimColor>
              {choice}
            </Text>
            <Button plain>
              <Text backgroundColor="permission" color="inverseText" bold>
                {` ${text} `}
              </Text>
            </Button>
          </Box>
        </Box>
        <Box flexDirection="column" borderStyle="round" borderColor="warning" paddingX={1} marginTop={1}>
          <Box gap={1}>
            <Text color="warning">
              ↻
            </Text>
            <Text>
              {"Claude has your feedback on "}
              {map}
              {" and will act on it with your next message."}
            </Text>
          </Box>
          <Button plain>
            <Text backgroundColor="warning" color="inverseText" bold>
              {` ${text} `}
            </Text>
          </Button>
        </Box>
        <Box marginTop={1}>
          <Text dimColor>
            Nothing here yet.
          </Text>
        </Box>
        <Box flexDirection="column" marginTop={1}>
          <Text dimColor>
            {"     ID  UNDO DECISION"}
          </Text>
          <Text dimColor>
            {`     ↑ ${start} more`}
          </Text>
          <Text dimColor>
            {`     ↓ ${below} more`}
          </Text>
          <Box gap={3} marginTop={1}>
            <Button plain dimColor>
              {`‹ prev`}
            </Button>
            <Button plain dimColor>
              next ›
            </Button>
            <Button plain dimColor>
              clear reviewed
            </Button>
          </Box>
        </Box>
        <Box flexDirection="column" borderStyle="round" paddingX={1} marginTop={1}>
          <Box gap={1}>
            <Text backgroundColor="claude" color="inverseText" bold>
              {` ${text} `}
            </Text>
            <Text color="inverseText" bold>
              {` ${text} `}
            </Text>
            <Text>
              <Text>
                ●●●●●●●●
              </Text>
              <Text dimColor>
                ○○○○○○○○
              </Text>
            </Text>
            <Text>
              {label}
            </Text>
            <Text dimColor>
              · subagent
            </Text>
          </Box>
          <Box marginTop={1}>
            <Text bold>
              {choice2}
            </Text>
          </Box>
          <Box flexDirection="column" marginTop={1}>
            <Text color="suggestion" bold>
              » Why
            </Text>
            <Box paddingLeft={2}>
              <Text>
                {why}
              </Text>
            </Box>
          </Box>
          <Box flexDirection="column" marginTop={1}>
            <Text color="permission" bold>
              ⇄ Instead of
            </Text>
            <Box paddingLeft={2}>
              <Text>
                {alternatives}
              </Text>
            </Box>
          </Box>
          <Box flexDirection="column" marginTop={1}>
            <Text color="warning" bold>
              ▲ Ramifications
            </Text>
            <Box paddingLeft={2}>
              <Text>
                {impact}
              </Text>
            </Box>
          </Box>
          <Box flexDirection="column" marginTop={1}>
            <Text color="text" bold>
              ↳ Your comment
            </Text>
            <Box paddingLeft={2}>
              <Text>
                {comment}
              </Text>
            </Box>
          </Box>
          <Box marginTop={1}>
            <Text color="warning">
              ↻ waiting for Claude to revisit
            </Text>
          </Box>
          <Box marginTop={1}>
            <Input label="✎" placeholder="type a comment" value="" submitLabel="keep" />
          </Box>
          <Box flexDirection="column" marginTop={1}>
            <Text color="permission" bold>
              ✎ Your comment
            </Text>
            <Box paddingLeft={2}>
              <Text>
                {draft}
              </Text>
            </Box>
          </Box>
          <Box marginTop={1} gap={2}>
            <Button plain>
              <Text backgroundColor="success" color="inverseText" bold>
                {` ${text} `}
              </Text>
            </Button>
            <Button plain>
              <Text backgroundColor="error" color="inverseText" bold>
                {` ${text} `}
              </Text>
            </Button>
            <Button plain>
              <Text backgroundColor="permission" color="inverseText" bold>
                {` ${text} `}
              </Text>
            </Button>
          </Box>
          <Box marginTop={1} gap={2}>
            <Button plain>
              <Text backgroundColor="error" color="inverseText" bold>
                {` ${text} `}
              </Text>
            </Button>
            <Button plain>
              <Text backgroundColor="permission" color="inverseText" bold>
                {` ${text} `}
              </Text>
            </Button>
          </Box>
        </Box>
        <Box flexDirection="column">
          <Box marginTop={1}>
            <Text bold color="claude">
              OVERVIEW
            </Text>
            <Text dimColor>
              {" ────────"}
            </Text>
          </Box>
          <Box gap={3} marginTop={1}>
            <Box flexDirection="column" alignItems="center">
              <Text color="claude">
                working
              </Text>
            </Box>
            <Box flexDirection="column" justifyContent="center">
              <Text bold>
                ✓ All caught up
              </Text>
              <Text dimColor>
                {`${length} decisions this session`}
              </Text>
              <Box marginTop={1} flexDirection="column">
                <Text>
                  <Text color="success">
                    ■
                  </Text>
                  {" "}
                  {approved}
                  {" approved"}
                </Text>
                <Text>
                  <Text color="error">
                    ■
                  </Text>
                  {" "}
                  {rejected}
                  {" rejected"}
                </Text>
                <Text>
                  <Text color="warning">
                    ■
                  </Text>
                  {" "}
                  {pending}
                  {" to review"}
                </Text>
              </Box>
            </Box>
          </Box>
          <Box marginTop={1}>
            <Text bold color="claude">
              HOW HARD TO UNDO
            </Text>
            <Text dimColor>
              {" ────────"}
            </Text>
          </Box>
          <Box gap={1}>
            <Text>
              <Text>
                ●●●●●●●●
              </Text>
              <Text dimColor>
                ○○○○○○○○
              </Text>
            </Text>
            <Text dimColor>
              {level}
            </Text>
            <Text>
              ·
            </Text>
            <Text dimColor>
              {count}
            </Text>
          </Box>
          <Box gap={1}>
            <Text>
              <Text>
                ●●●●●●●●
              </Text>
              <Text dimColor>
                ○○○○○○○○
              </Text>
            </Text>
            <Text dimColor>
              {level2}
            </Text>
            <Text>
              ·
            </Text>
            <Text dimColor>
              {count2}
            </Text>
          </Box>
          <Box gap={1}>
            <Text>
              <Text>
                ●●●●●●●●
              </Text>
              <Text dimColor>
                ○○○○○○○○
              </Text>
            </Text>
            <Text dimColor>
              {level3}
            </Text>
            <Text>
              ·
            </Text>
            <Text dimColor>
              {count3}
            </Text>
          </Box>
          <Box marginTop={1}>
            <Text bold color="claude">
              RECENT
            </Text>
            <Text dimColor>
              {" ────────"}
            </Text>
          </Box>
          <Button plain>
            <Text>
              {`${icon} `}
            </Text>
            <Text color="inactive">
              {`D${id}`}
            </Text>
            <Text dimColor>
              {` ${choice}`}
            </Text>
          </Button>
          <Button plain>
            <Text>
              {`${icon} `}
            </Text>
            <Text color="inactive">
              {`D${id}`}
            </Text>
            <Text dimColor>
              {` ${choice}`}
            </Text>
          </Button>
          <Button plain>
            <Text>
              {`${icon} `}
            </Text>
            <Text color="inactive">
              {`D${id}`}
            </Text>
            <Text dimColor>
              {` ${choice}`}
            </Text>
          </Button>
        </Box>
        <Box marginTop={1}>
          <Text dimColor>
            {keyHelp}
          </Text>
        </Box>
      </Box>
    )
  })

  on('session.start', async ($, e, next) => {
    const pending = '…'
    const choice = '…'
    await $.ui.status(`${pending} decision to review (/decisions)`)
    await $.ui.toast(`D0 is hard to undo: ${choice}`)
    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.

decision-log/hooks/register.tsx lines 510–669 · Pane
  on('ui.render', { component: 'Pane', requestId: PANE }, async ($, e) => {
    const elements = $.ui.resolve(e)
    const { Box, Button, Text } = elements
    const Input = 'Input' in elements ? elements.Input : undefined
    const Raster = 'Raster' in elements ? elements.Raster : undefined
    const list = await read($, decisions)
    const tab = await read($, currentTab)
    const stored = await read($, selectedId)
    const commenting = await read($, commentingId)
    const change = await read($, lastChange)
    const isClaudeWorking = await read($, isWorking)

    if (Raster !== undefined && isMascotBusy !== isClaudeWorking) {
      isMascotBusy = isClaudeWorking
      mascotFrame = 0
    }

    const pending = list.filter(one => one.verdict === 'pending').length
    const approved = list.filter(one => one.verdict === 'approved').length
    const rejected = list.filter(one => one.verdict === 'rejected').length
    const awaitingRevisit = list.filter(one => one.isAwaitingRevisit)
    const counts: Record<DecisionTab, number> = { all: list.length, pending, approved, rejected }
    const shown = shownIn(list, tab)
    const selected = selectedIn(shown, stored)
    const isCommenting = Input !== undefined && selected !== undefined && commenting === selected.id
    // No hotkeys while the comment box is open, so typing never presses a button.
    const hotkey = (key: string) => (isCommenting ? {} : { hotkey: key })
    const width = Math.max(24, e.props.bodyColumns)

    const heading = (title: string) => (
      <Box marginTop={1}>
        <Text bold color="claude">
          {title.toUpperCase()}
        </Text>
        <Text dimColor>{` ${'─'.repeat(Math.max(0, width - title.length - 1))}`}</Text>
      </Box>
    )

    const gauge = (reversibility: Reversibility) => {
      const undo = REVERSIBILITY[reversibility]

      return (
        <Text>
          <Text color={undo.color}>{'●'.repeat(undo.level)}</Text>
          <Text dimColor>{'○'.repeat(3 - undo.level)}</Text>
        </Text>
      )
    }

    const pill = (text: string, color: string) => (
      <Text backgroundColor={color} color="inverseText" bold>
        {` ${text} `}
      </Text>
    )

    const header = () => {
      const right = isClaudeWorking ? '● Claude is working ' : `${list.length} logged `

      if (Raster !== undefined) {
        // While Claude works a light sweeps along the bar, from where the timer has it now.
        const glow = isClaudeWorking ? glowAt(tick, width) : undefined
        shimmer = isClaudeWorking ? { width, left: TITLE, right } : undefined

        return <Raster key="banner" columns={width} rows={1} cells={banner(width, TITLE, right, glow)} />
      }

      return (
        <Box gap={1}>
          <Text bold>
            <Text color="claude">◆</Text> Decision log
          </Text>
          <Text dimColor>· {right.trim()}</Text>
        </Box>
      )
    }

    const progressBar = () => {
      const approvedCells = Math.round((approved / list.length) * width)
      const rejectedCells = Math.min(width - approvedCells, Math.round((rejected / list.length) * width))

      return (
        <Text>
          <Text color="success">{'▔'.repeat(approvedCells)}</Text>
          <Text color="error">{'▔'.repeat(rejectedCells)}</Text>
          <Text dimColor>{'▔'.repeat(width - approvedCells - rejectedCells)}</Text>
        </Text>
      )
    }

    const tabButton = ({ value, label }: { value: DecisionTab; label: string }) => {
      const isActive = value === tab

      return (
        <Button key={`tab:${value}`} plain onPress={() => update($, currentTab, () => value)}>
          {isActive ? (
            pill(`${label} ${counts[value]}`, 'claude')
          ) : (
            <Text color="inactive">{` ${label} ${counts[value]} `}</Text>
          )}
        </Button>
      )
    }

    // The table shows a window of rows around the selection so the detail stays on screen.
    const room = Math.max(4, Math.min(15, e.props.scroll.bodyRows - 26))
    const index = selected === undefined ? 0 : shown.indexOf(selected)
    const start = Math.min(Math.max(0, index - Math.floor(room / 2)), Math.max(0, shown.length - room))
    const rows = shown.slice(start, start + room)
    const below = shown.length - start - rows.length

    const row = (one: Decision) => {
      const isSelected = one.id === selected?.id
      const status = STATUS[one.verdict]
      const undo = REVERSIBILITY[one.reversibility]

      return (
        <Button key={`row:${one.id}`} plain onPress={() => select($, one.id)}>
          <Text color="claude">{isSelected ? '▌' : ' '}</Text>
          <Text color={status.color}>{` ${status.icon} `}</Text>
          <Text bold={isSelected} color={isSelected ? 'claude' : 'inactive'}>
            {`D${one.id}`.padEnd(4)}
          </Text>
          <Text color={undo.color}>{'●'.repeat(undo.level)}</Text>
          <Text dimColor>{'○'.repeat(3 - undo.level)}</Text>
          <Text bold={isSelected} dimColor={!isSelected}>
            {`  ${clip(one.choice, width - 14)}`}
          </Text>
        </Button>
      )
    }

    const field = (icon: string, color: string, label: string, value: string) =>
      value !== '' && (
        <Box flexDirection="column" marginTop={1}>
          <Text color={color} bold>
            {`${icon} ${label}`}
          </Text>
          <Box paddingLeft={2}>
            <Text>{value}</Text>
          </Box>
        </Box>
      )

    const panel = (one: Decision) => {
      const undo = REVERSIBILITY[one.reversibility]
      const status = STATUS[one.verdict]
      const draft = (drafts.get(one.id) ?? '').trim()
      const isPending = one.verdict === 'pending'

      return (
        <Box
          key="detail"
          flexDirection="column"
          borderStyle="round"
          borderColor={undo.color}
          hover={{ borderColor: 'claude' }}
          paddingX={1}
          marginTop={1}
        >
          <Box gap={1}>
Licence text (MIT)
MIT License

Copyright (c) 2026 Hector Bailey

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

drives Claudetool calls

What its code shows

Read from the source at commit d17ce0e90957. 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.decision-log/hooks/register.tsx
ParsesEvery file parses as TypeScript or JavaScript.2 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).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.prompt.submit (as the person), adds tool log_decision, adds command decisions
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.check, tool.call, command.run (decisions) · shapes: prompt.compose · also: session.start, turn.start, turn.complete, ui.close (+2) · 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.reads no files, environment variables, settings or transcript
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 conversation (a row the model reads)

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 HectorBailey/claude-mods
/plugin install decision-log@hectorbailey
/reload-plugins

This installs the marketplace's latest commit, which may not be the one read here (d17ce0e90957). 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/HectorBailey/claude-mods
git -C claude-mods checkout d17ce0e9095708ee31ebea748556aef696231bf8
claude plugin validate claude-mods/decision-log
claude --plugin-dir claude-mods/decision-log

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 "hectorbailey-decision-log" 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/hectorbailey-decision-log.svg)](https://modscode.com/claude-mods/mods/hectorbailey-decision-log/)