Ranking|Claude Code Mods

ModsCode / Claude Code Mods / Ranking / change-ledger

change-ledger

Lists the files this session edited in a pane (/changes), with line counts and who edited them, beside the git working tree

Code you can checkTerminal + desktopPaneBoxText
runs programs, drives Claude, draws

What it does

  • Draws a pane
  • Adds /changes
  • Watches Edit, Write calls
  • Hooks session.start, turn.complete
  • Starts processes

Good points

  • No network calls
  • Small: 305 lines
  • 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 change-ledger by Mehmet Aras (pane), as ModsCode read it from the mod's code:
// https://modscode.com/claude-mods/mods/arasovic-change-ledger/
// 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: "Changes" })
  on('ui.render', { component: 'Pane', requestId: 'my-pane' }, async ($, e) => {
    const { Box, Text } = $.ui.resolve(e)
    const more = '…'
    const t = '…'
    const t2 = '…'
    const t3 = '…'
    const t4 = '…'
    const t5 = '…'
    const t6 = '…'
    const t7 = '…'
    const t8 = '…'
    const t9 = '…'
    const length = '…'
    const t10 = '…'
    const t11 = '…'
    const t12 = '…'
    const t13 = '…'
    const t14 = '…'
    const t15 = '…'
    const t16 = '…'
    const t17 = '…'
    const t18 = '…'
    return (
      <Box flexDirection="column" paddingTop={1}>
        <Box alignItems="center">
          <Box height={0.5}>
            <Box backgroundColor="userMessageBackgroundHover" />
            <Box backgroundColor="userMessageBackgroundHover" />
            <Box backgroundColor="userMessageBackgroundHover" />
          </Box>
          <Box height={0.5}>
            <Box backgroundColor="userMessageBackgroundHover" />
            <Box backgroundColor="userMessageBackgroundHover" />
            <Box backgroundColor="userMessageBackgroundHover" />
          </Box>
          <Box height={0.5}>
            <Box backgroundColor="userMessageBackgroundHover" />
            <Box backgroundColor="userMessageBackgroundHover" />
            <Box backgroundColor="userMessageBackgroundHover" />
          </Box>
        </Box>
        <Box flexDirection="column" marginTop={1}>
          <Text>
            <Text dimColor>
              {"╭─ "}
            </Text>
            <Text bold>
              Edits
            </Text>
            <Text dimColor>
              {" "}
              ────────
            </Text>
            <Text dimColor>
              {" "}
              {`+${more} more`}
              {" "}
            </Text>
            <Text dimColor>
              ─╮
            </Text>
          </Text>
          <Text>
            <Text dimColor>
              {"│ "}
            </Text>
            <Text>
              {t}
            </Text>
            <Text>
              {t2}
            </Text>
            <Text>
              {t3}
            </Text>
            <Text dimColor>
              {" │"}
            </Text>
          </Text>
          <Text>
            <Text dimColor>
              {"│ "}
            </Text>
            <Text>
              {t4}
            </Text>
            <Text>
              {t5}
            </Text>
            <Text>
              {t6}
            </Text>
            <Text dimColor>
              {" │"}
            </Text>
          </Text>
          <Text>
            <Text dimColor>
              {"│ "}
            </Text>
            <Text>
              {t7}
            </Text>
            <Text>
              {t8}
            </Text>
            <Text>
              {t9}
            </Text>
            <Text dimColor>
              {" │"}
            </Text>
          </Text>
          <Text dimColor>
            ╰
            ────────
            ╯
          </Text>
        </Box>
        <Box flexDirection="column" marginTop={1}>
          <Text>
            <Text dimColor>
              {"╭─ "}
            </Text>
            <Text bold>
              Working tree
            </Text>
            <Text dimColor>
              {" "}
              ────────
            </Text>
            <Text dimColor>
              {" "}
              {`${length} changed`}
              {" "}
            </Text>
            <Text dimColor>
              ─╮
            </Text>
          </Text>
          <Text>
            <Text dimColor>
              {"│ "}
            </Text>
            <Text>
              {t10}
            </Text>
            <Text>
              {t11}
            </Text>
            <Text>
              {t12}
            </Text>
            <Text dimColor>
              {" │"}
            </Text>
          </Text>
          <Text>
            <Text dimColor>
              {"│ "}
            </Text>
            <Text>
              {t13}
            </Text>
            <Text>
              {t14}
            </Text>
            <Text>
              {t15}
            </Text>
            <Text dimColor>
              {" │"}
            </Text>
          </Text>
          <Text>
            <Text dimColor>
              {"│ "}
            </Text>
            <Text>
              {t16}
            </Text>
            <Text>
              {t17}
            </Text>
            <Text>
              {t18}
            </Text>
            <Text dimColor>
              {" │"}
            </Text>
          </Text>
          <Text dimColor>
            ╰
            ────────
            ╯
          </Text>
        </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.

change-ledger/hooks/register.tsx lines 173–304 · Pane
  on('ui.render', { component: 'Pane', requestId: PANE }, async ($, e) => {
    const { Box, Text } = $.ui.resolve(e)
    const list = await read($, files)
    const tree = await read($, git)
    const now = await $.clock.now()
    const cwd = await $.session.cwd()
    const w = Math.max(28, e.props.bodyColumns - 1)
    const inner = w - 6
    const isGrid = e.surface === 'terminal'

    const draw = (row: Row, width: number) =>
      fit(row, width).map((s, j) => <Text key={String(j)} color={s.c} dimColor={s.d} bold={s.b}>{s.t}</Text>)
    // A row as a flex line, for surfaces that draw text in a proportional font.
    const items = (row: Row) =>
      row.map((s, j) => {
        if ('cells' in s) {
          const total = Math.max(1, s.parts.reduce((n, p) => n + p.n, 0))
          return (
            <Box height={0.5} {...(s.w ? { width: s.w, flexShrink: 0 } : { flexGrow: 1 })}>
              {s.parts.map(p => <Box flexGrow={(p.n / total) * 1000} backgroundColor={p.c ?? TRACK} />)}
            </Box>
          )
        }
        if (s.fill) return <Box flexGrow={1} />
        const text = <Text key={String(j)} color={s.c} dimColor={s.d} bold={s.b} wrap="truncate-end">{!s.w ? s.t : s.right ? s.t.trim() : s.t.trimEnd()}</Text>
        return s.w || s.keep ? <Box width={s.w} flexShrink={0} justifyContent={s.right ? 'flex-end' : 'flex-start'}>{text}</Box> : text
      })
    const line = (row: Row) => (row.length ? <Box alignItems="center">{items(row)}</Box> : <Box height={0.5} />)
    const frame = (title: string, tone: string, rows: Row[], right = '') => {
      if (!isGrid)
        return (
          <Box flexDirection="column" marginTop={2} borderStyle="round" borderColor={tone} borderDimColor>
            <Box marginBottom={1}>
              <Box flexShrink={0}>
                <Text color={tone} bold>{title}</Text>
              </Box>
              <Box flexGrow={1} />
              {right ? <Text dimColor wrap="truncate-end">{right}</Text> : null}
            </Box>
            {rows.map(line)}
          </Box>
        )
      const rule = Math.max(0, w - 6 - title.length - (right ? right.length + 2 : 0))
      return (
        <Box key={title} flexDirection="column" marginTop={1}>
          <Text>
            <Text color={tone} dimColor>╭─ </Text>
            <Text color={tone} bold>{title}</Text>
            <Text color={tone} dimColor> {'─'.repeat(rule)}</Text>
            {right ? <Text dimColor> {right} </Text> : null}
            <Text color={tone} dimColor>─╮</Text>
          </Text>
          {rows.map((row, i) => (
            <Text key={String(i)}>
              <Text color={tone} dimColor>│  </Text>
              {draw(row, inner)}
              <Text color={tone} dimColor>  │</Text>
            </Text>
          ))}
          <Text color={tone} dimColor>╰{'─'.repeat(w - 2)}╯</Text>
        </Box>
      )
    }

    const name = (path: string) => path.split('/').pop() ?? path
    const counts = (added: number, removed: number): Row => [
      { t: `+${added}`.padStart(5), c: 'success', w: 5, right: true },
      { t: ` −${removed}`.padEnd(6), c: 'error', w: 6 },
    ]

    const added = list.reduce((n, f) => n + f.added, 0)
    const removed = list.reduce((n, f) => n + f.removed, 0)
    const glance: Row = list.length
      ? [{ t: `${list.length} ${list.length === 1 ? 'file' : 'files'}  `, b: true, keep: true }, { t: `+${added}`, c: 'success', keep: true }, { t: ` −${removed}`, c: 'error', keep: true }]
      : [{ t: 'No edits yet', d: true }]
    // Off the grid only the branch name gives way.
    if (tree)
      glance.push(
        { t: `   ${tree.branch}`, c: 'suggestion' },
        ...(tree.ahead ? [{ t: ` ↑${tree.ahead}`, d: true, keep: true }] : []),
        ...(tree.behind ? [{ t: ` ↓${tree.behind}`, c: 'warning', keep: true }] : []),
      )

    // The git frame lists every changed path: the ones this session edited get a filled dot, the rest (shell, you) an empty one.
    const touched = new Set(list.map(f => f.path))
    const GIT_MAX = 8
    const gitRows: Row[] = tree
      ? tree.files.length
        ? tree.files.slice(0, GIT_MAX).map(f => {
            const mine = touched.has(`${tree.root}/${f.path}`)
            const tone = f.status === '??' || f.status === 'A' ? 'success' : f.status === 'D' ? 'error' : 'warning'
            const right: Row = f.added === undefined ? [{ t: f.status === '??' ? 'new' : '', d: true, keep: true }] : counts(f.added, f.removed ?? 0)
            return spread([{ t: mine ? '● ' : '○ ', c: mine ? 'suggestion' : undefined, d: !mine, keep: true }, { t: f.status.padEnd(3), c: tone, w: 3 }, { t: f.path, d: !mine }], right, inner)
          })
        : [[{ t: 'Working tree clean.', d: true }]]
      : []
    if (tree && tree.files.length > GIT_MAX) gitRows.push([{ t: `+${tree.files.length - GIT_MAX} more`, d: true }])

    // Edits get the rows left after the top padding, the glance row and the git frame; each file takes two rows plus a blank between files.
    const fixed = 2 + 3 + (tree ? gitRows.length + 3 : 0)
    const room = Math.max(5, e.props.scroll.bodyRows - fixed)
    const shown = list.slice(0, Math.max(1, Math.floor((room + 1) / 3)))
    const max = Math.max(1, ...shown.map(f => f.added + f.removed))
    const editRows: Row[] = shown.length
      ? shown.flatMap((f, i) => {
          const bar = statBar(f.added, f.removed, max, 8)
          const top = spread(
            [{ t: name(f.path), b: true }, ...(f.created ? [{ t: ' new', c: 'success', keep: true }] : [])],
            [
              {
                cells: [{ t: '■'.repeat(bar.plus), c: 'success' }, { t: '■'.repeat(bar.minus), c: 'error' }, { t: '·'.repeat(bar.rest), d: true }],
                parts: [{ n: bar.plus, c: 'success' }, { n: bar.minus, c: 'error' }, { n: bar.rest }],
                w: 8,
              },
              ...counts(f.added, f.removed),
            ],
            inner,
          )
          const sub = spread([{ t: `  ${folder(f.path, cwd)}`, d: true }], [{ t: f.agents.join(', '), d: true }, { t: ` · ${f.edits}× · ${ago(now - f.at)}`, d: true, keep: true }], inner)
          return i ? [[], top, sub] : [top, sub]
        })
      : [[{ t: 'Files Claude edits or writes show here.', d: true }]]
    const more = list.length - shown.length

    return (
      <Box flexDirection="column" paddingTop={1}>
        {isGrid ? <Text>{draw(glance, w - 3)}</Text> : line(glance)}
        {frame('Edits', 'suggestion', editRows, more > 0 ? `+${more} more` : '')}
        {tree ? frame('Working tree', tree.files.some(f => !touched.has(`${tree.root}/${f.path}`)) ? 'warning' : 'success', gitRows, `${tree.files.length} changed`) : null}
      </Box>
    )
  })
Licence text (MIT)
MIT License

Copyright (c) 2026 Mehmet Aras

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 programsreads filesdrives Claudetool calls

What its code shows

Read from the source at commit 9f1bef615562 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.change-ledger/hooks/register.tsx
ParsesEvery file parses as TypeScript or JavaScript.1 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.git (reaches the network)
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 files and reaches the network
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 changes
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 (changes), tool.call (Edit, Write) · also: session.start, turn.complete, ui.render (Pane)
Reads, by nameThe environment variables and files it names, and whether it reads the transcript, settings.json, the prompt box or the mouse selection.files: a path computed at run time
Writes, by nameThe files and environment variables it names, and whether it changes settings, the prompt box, the clipboard, the conversation (a row the model reads) or another session.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 arasovic/claude-code-mods
/plugin install change-ledger@claude-code-mods
/reload-plugins

This installs the marketplace's latest commit, which may not be the one read here (9f1bef615562). 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/arasovic/claude-code-mods
git -C claude-code-mods checkout 9f1bef61556227ffb420f219bfac4ea204d77bef
claude plugin validate claude-code-mods/change-ledger
claude --plugin-dir claude-code-mods/change-ledger

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 "arasovic-change-ledger" with its code and make me one like it

Search them from Claude: the MCP connector

Similar mods

More from this repository

See all 14 mods in this repository

Badge for your README

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

README.md
[![ModsCode](https://modscode.com/badge/arasovic-change-ledger.svg)](https://modscode.com/claude-mods/mods/arasovic-change-ledger/)