Ranking|Claude Code Mods

ModsCode / Claude Code Mods / Ranking / touch-map

touch-map

See which files Claude has listed, read, partially read, edited, created or deleted, as a tree and an activity map in a pane.

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

What it does

  • Draws a band above the prompt, a pane, toasts
  • Adds /touch-map
  • Watches tool calls
  • Hooks classic.InstructionsLoaded, classic.SessionStart, session.append, session.end and 3 more
  • Keeps its own state between turns

Good points

  • No network calls
  • 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 touch-map by y-hirakaw (pane, band, toast), as ModsCode read it from the mod's code:
// https://modscode.com/claude-mods/mods/y-hirakaw-touch-map/
// 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 band above the prompt; what else goes there is drawn under it
  on('ui.render', { component: 'AbovePrompt' }, async ($, e, next) => {
    const { Box, Text, Button } = $.ui.resolve(e)
    const text = '…'
    const text2 = '…'
    const text3 = '…'
    const fmt = '…'
    return (
      <Box flexDirection="column">
        <Box flexDirection="row" gap={1}>
          <Text dimColor>
            Touch map
          </Text>
          <Text>
            <Text>
              {text}
            </Text>
            <Text>
              {text2}
            </Text>
            <Text>
              {text3}
            </Text>
          </Text>
          <Text>
            <Text bold>
              {fmt}
            </Text>
            <Text dimColor>
              {`/${fmt}`}
            </Text>
          </Text>
          <Button label="open" />
        </Box>
        {await next(e)}
      </Box>
    )
  })

  // the pane: open it with $.ui.open({ id: 'my-pane', title: "Touch map" })
  on('ui.render', { component: 'Pane', requestId: 'my-pane' }, async ($, e) => {
    const { Box, Text, Button } = $.ui.resolve(e)
    const label = '…'
    const elapsed = '…'
    const fmt = '…'
    const text = '…'
    const text2 = '…'
    const text3 = '…'
    const path = '…'
    const note = '…'
    const text4 = '…'
    const text5 = '…'
    const text6 = '…'
    const text7 = '…'
    const count = '…'
    const text8 = '…'
    const text9 = '…'
    const text10 = '…'
    const text11 = '…'
    const count2 = '…'
    const text12 = '…'
    const text13 = '…'
    const text14 = '…'
    const text15 = '…'
    const count3 = '…'
    const auto = '…'
    return (
      <Box flexDirection="column">
        <Box flexDirection="row" gap={1} paddingRight={2}>
          <Box flexGrow={1} flexShrink={1} minWidth={0}>
            <Text bold wrap="truncate-end">
              {label}
            </Text>
          </Box>
          <Text dimColor>
            {elapsed}
          </Text>
          <Button variant="primary" label="save" />
          <Button label="discard" />
        </Box>
        <Box flexDirection="row" flexWrap="wrap" columnGap={2}>
          <Text>
            <Text bold>
              {fmt}
            </Text>
            <Text dimColor>
              {`/${fmt}`}
            </Text>
          </Text>
          <Text>
            {text}
          </Text>
          <Text>
            {text2}
          </Text>
          <Text>
            {text3}
          </Text>
          <Text color="#f87171" />
        </Box>
        <Box flexDirection="row" gap={1}>
          <Text dimColor>
            now
          </Text>
          <Box flexShrink={1} minWidth={0}>
            <Text wrap="truncate-start">
              {path}
            </Text>
          </Box>
        </Box>
        <Text dimColor wrap="truncate-end">
          {note}
        </Text>
        <Text color="#3f4654">
          ────────
        </Text>
        <Text dimColor>
          nothing touched yet
        </Text>
        <Box flexDirection="column">
          <Box flexDirection="row" backgroundColor="#1d2029">
            <Box flexShrink={0} flexDirection="row">
              <Text>
                {"                "}
              </Text>
              <Text>
                {" "}
              </Text>
              <Text>
                {" "}
              </Text>
            </Box>
            <Box flexGrow={1} flexShrink={1} minWidth={0}>
              <Text wrap="truncate-end">
                {text4}
              </Text>
            </Box>
            <Box flexShrink={0} justifyContent="flex-end">
              <Text>
                <Text>
                  {text5}
                </Text>
                <Text>
                  {text6}
                </Text>
                <Text>
                  {text7}
                </Text>
              </Text>
            </Box>
            <Box width={10} flexShrink={0} justifyContent="flex-end">
              <Text dimColor>
                {count}
              </Text>
            </Box>
          </Box>
          <Box flexDirection="row" backgroundColor="#1d2029">
            <Box flexShrink={0} flexDirection="row">
              <Text>
                {"                "}
              </Text>
              <Text>
                {" "}
              </Text>
              <Text>
                {" "}
              </Text>
            </Box>
            <Box flexGrow={1} flexShrink={1} minWidth={0}>
              <Text wrap="truncate-end">
                {text8}
              </Text>
            </Box>
            <Box flexShrink={0} justifyContent="flex-end">
              <Text>
                <Text>
                  {text9}
                </Text>
                <Text>
                  {text10}
                </Text>
                <Text>
                  {text11}
                </Text>
              </Text>
            </Box>
            <Box width={10} flexShrink={0} justifyContent="flex-end">
              <Text dimColor>
                {count2}
              </Text>
            </Box>
          </Box>
          <Box flexDirection="row" backgroundColor="#1d2029">
            <Box flexShrink={0} flexDirection="row">
              <Text>
                {"                "}
              </Text>
              <Text>
                {" "}
              </Text>
              <Text>
                {" "}
              </Text>
            </Box>
            <Box flexGrow={1} flexShrink={1} minWidth={0}>
              <Text wrap="truncate-end">
                {text12}
              </Text>
            </Box>
            <Box flexShrink={0} justifyContent="flex-end">
              <Text>
                <Text>
                  {text13}
                </Text>
                <Text>
                  {text14}
                </Text>
                <Text>
                  {text15}
                </Text>
              </Text>
            </Box>
            <Box width={10} flexShrink={0} justifyContent="flex-end">
              <Text dimColor>
                {count3}
              </Text>
            </Box>
          </Box>
          <Text dimColor>
            {`  … ${fmt} more rows`}
          </Text>
        </Box>
        <Text color="#7dd3fc" wrap="truncate-end">
          {`◆ ${auto}`}
        </Text>
      </Box>
    )
  })

  on('session.start', async ($, e, next) => {
    await $.ui.toast(`Touch map: the terminal is too narrow to open the pane here. Run /touch-map to open it.`)
    await $.ui.toast(`Touch map: discarded`)
    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.

touch-map/hooks/register.tsx lines 1273–1304 · Band
  on('ui.render', { component: 'AbovePrompt' }, async ($, e, next) => {
    if (!(await read($, minimized))) return next(e)
    const { Box, Text, Button } = $.ui.resolve(e)
    const all: Record<string, Touch> = await read($, touches)
    const touched = Object.keys(all).length
    // 帯はほかの mod と分け合う。下の mod が描くもの(copy-blocks のボタンなど)を消さないよう、自分の行の下に並べる
    const below = await next(e)
    const mine = (
      <Box flexDirection="row" gap={1}>
        <Text dimColor>Touch map</Text>
        <Text>
          {shareBar(counts(all), files.size, BAR).map(s => (
            <Text color={s.color}>{s.text}</Text>
          ))}
        </Text>
        <Text>
          <Text bold>{fmt(touched)}</Text>
          <Text dimColor>{`/${fmt(files.size)}`}</Text>
        </Text>
        {/* 開く処理は下の ui.press のフックで行う。ここで描いたときの $ で開くと、人の操作として扱われない */}
        <Button key="open" label="open" onPress={() => undefined} />
      </Box>
    )
    return below ? (
      <Box flexDirection="column">
        {mine}
        {below}
      </Box>
    ) : (
      mine
    )
  })
touch-map/hooks/register.tsx lines 1398–1530 · Pane
  on('ui.render', { component: 'Pane', requestId: PANE }, async ($, e) => {
    const started = await $.clock.now()
    const ui = $.ui.resolve(e)
    const { Box, Text, Button } = ui
    const Input = 'Input' in ui ? ui.Input : undefined
    const Raster = 'Raster' in ui ? ui.Raster : undefined
    const all: Record<string, Touch> = await read($, touches)
    const seg: Segment = await read($, segment)
    const showMap: boolean = await read($, mapAtom)
    const loaded: Loaded = await read($, loadedAtom)
    const now: Now | null = await read($, nowAtom)
    const rows = toRows(all, await read($, folds), now)
    const c = counts(all)
    const gone = goneCount(all)
    const auto = Object.keys(loaded)
    const cols = e.props.bodyColumns ?? e.viewport?.columns ?? 60
    // ペインの本体は高さを超えると Claude Code がスクロールさせるので、行は全部渡す(重くならないよう上限だけ置く)
    const shown = rows.slice(0, 400)
    const header = 3 + (now ? 1 : 0) + (seg.note !== '' ? 1 : 0) + (Object.keys(all).length === 0 ? 1 : 0)
    paneRows = Math.max(0, (e.props.scroll?.bodyRows ?? 0) - header)
    const legend = [
      ...DEEP_FIRST.filter(i => (c[i] ?? 0) > 0).map(i => ({ text: `■${LEVELS[i]} ${fmt(c[i] ?? 0)}`, color: COLORS[i] as string })),
      ...(gone > 0 ? [{ text: `✕deleted ${fmt(gone)}`, color: GONE }] : []),
      ...(auto.length > 0 ? [{ text: `◆auto ${auto.length}`, color: AUTO }] : []),
    ]
    const tree = (
      <Box flexDirection="column">
        {shown.map(row => {
          const nameColor =
            row.kind === 'dir' ? (row.stat ? undefined : TRACK)
              : row.kind === 'file' ? (row.touch?.d ? GONE : row.touch ? COLORS[row.touch.s] : TRACK)
                : TRACK
          const bar =
            row.kind === 'dir' ? shareBar(row.stat?.c ?? [], row.total, BAR)
              : row.kind === 'file' && row.touch ? fileBar(row.touch) : []
          const count =
            row.kind === 'dir' ? `${fmt(row.stat?.touched ?? 0)}/${fmt(row.total)}`
              : row.kind === 'file' && row.touch ? rangeOf(row.touch) : ''
          return (
            <Box key={`row:${row.kind}:${row.key}`} flexDirection="row" backgroundColor={row.kind === 'file' && row.now ? NOW_BG : undefined}>
              {/* 字下げと行頭の記号は、幅が足りなくても縮めない */}
              <Box flexShrink={0} flexDirection="row">
                <Text>{'  '.repeat(row.indent)}</Text>
                {row.kind === 'file' ? (
                  <Text> </Text>
                ) : (
                  <Button key={`go:${row.kind}:${row.key}`} plain dimColor label={glyphOf(row)} onPress={() => void toggle($, row.key, row.open)} />
                )}
                <Text> </Text>
              </Box>
              <Box flexGrow={1} flexShrink={1} minWidth={0}>
                <Text
                  wrap="truncate-end"
                  color={nameColor}
                  bold={row.kind === 'dir' && row.stat !== undefined || (row.kind === 'file' && row.now)}
                  strikethrough={row.kind === 'file' && row.touch?.d === true}
                >
                  {'text' in row ? row.text : row.name}
                </Text>
              </Box>
              {(row.kind === 'dir' || row.kind === 'file') && (
                <Box width={BAR + 1} flexShrink={0} justifyContent="flex-end">
                  <Text>
                    {bar.map(s => (
                      <Text color={s.color}>{s.text}</Text>
                    ))}
                  </Text>
                </Box>
              )}
              {(row.kind === 'dir' || row.kind === 'file') && (
                <Box width={10} flexShrink={0} justifyContent="flex-end">
                  <Text dimColor>{count}</Text>
                </Box>
              )}
            </Box>
          )
        })}
        {rows.length > shown.length && <Text dimColor>{`  … ${fmt(rows.length - shown.length)} more rows`}</Text>}
      </Box>
    )
    renderMs = (await $.clock.now()) - started

    return (
      <Box flexDirection="column">
        <Box flexDirection="row" gap={1} paddingRight={2}>
          <Box flexGrow={1} flexShrink={1} minWidth={0}>
            {Input ? (
              <Input key="label" placeholder="task name" value={seg.label} submitLabel="set" onSubmit={(value: string) => void setLabel($, value)} />
            ) : (
              <Text bold wrap="truncate-end">{seg.label}</Text>
            )}
          </Box>
          <Text dimColor>{elapsed(seg.startedAt, await $.clock.now())}</Text>
          <Button key="save" variant="primary" label="save" onPress={() => void save($, true)} />
          {/* 最小化はペイン右上の × でできるので、ボタンは置かない */}
          <Button key="discard" label="discard" onPress={() => void save($, false)} />
        </Box>
        {/* 狭いペインでは、項目の途中で切らずに項目の切れ目で折り返す */}
        <Box flexDirection="row" flexWrap="wrap" columnGap={2}>
          <Text>
            <Text bold>{fmt(Object.keys(all).length)}</Text>
            <Text dimColor>{`/${fmt(files.size)}`}</Text>
          </Text>
          {legend.map(l => (
            <Text color={l.color}>{l.text}</Text>
          ))}
          {fileNote.includes('cut') && <Text color={GONE}>{fileNote}</Text>}
        </Box>
        {now && (
          <Box flexDirection="row" gap={1}>
            <Text dimColor>now</Text>
            <Box flexShrink={1} minWidth={0}>
              <Text wrap="truncate-start" color={COLORS[now.level]}>{now.path}</Text>
            </Box>
          </Box>
        )}
        {seg.note !== '' && <Text dimColor wrap="truncate-end">{seg.note}</Text>}
        {Raster && showMap && files.size > 0 && (() => {
          // ペインの幅いっぱいまでマスを並べる(Raster の上限 512 桁まで)。ファイルが少なくて余るときは中央に寄せる
          const layout = layoutOf(Math.max(8, Math.min(256, Math.floor((cols + 1) / 2))))
          return (
            <Box flexDirection="row" justifyContent="center">
              <Raster key="map" columns={layout.width * 2 - 1} rows={MAP_ROWS} cells={mapCells(all, layout, started)} />
            </Box>
          )
        })()}
        <Text color={TRACK}>{'─'.repeat(Math.max(10, cols))}</Text>
        {Object.keys(all).length === 0 && <Text dimColor>nothing touched yet</Text>}
        {tree}
        {auto.length > 0 && <Text color={AUTO} wrap="truncate-end">{`◆ ${auto.join('  ')}`}</Text>}
      </Box>
    )
  })
Licence text (MIT)
MIT License

Copyright (c) 2026 y-hirakaw

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 filestool callsremembers

What its code shows

Read from the source at commit a08b75fa2a41 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.touch-map/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).touch-map/hooks/register.tsx:485 printenv (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.git (reaches the network), printenv
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 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 touch-map
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: session.append, command.run (touch-map), tool.call · reads: classic.SessionStart, classic.InstructionsLoaded, ui.press · also: session.start, session.end, ui.close, ui.render (AbovePrompt, Pane) · 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.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.files: a path computed at run time, ….events.jsonl, ….view.txt

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 y-hirakaw/claude-code-mods
/plugin install touch-map@y-hirakaw-mods
/reload-plugins

This installs the marketplace's latest commit, which may not be the one read here (a08b75fa2a41). 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/y-hirakaw/claude-code-mods
git -C claude-code-mods checkout a08b75fa2a4114268d1d7a3928743c73bdd4dfa8
claude plugin validate claude-code-mods/touch-map
claude --plugin-dir claude-code-mods/touch-map

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 "y-hirakaw-touch-map" with its code and make me one like it

Search them from Claude: the MCP connector

Similar mods

More from this repository

Badge for your README

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

README.md
[![ModsCode](https://modscode.com/badge/y-hirakaw-touch-map.svg)](https://modscode.com/claude-mods/mods/y-hirakaw-touch-map/)