modscode EN

modscode / 図鑑 / work-visualized

work-visualized

Claude Work Visualized: a live, animated map of the project showing where Claude reads, edits, creates and deletes files

確かめやすいコードターミナル+デスクトップペインステータスラインBoxText

何をするか

  • 欄を描く
  • /watch を足す
  • ツールの呼び出しを見張る
  • session.start・turn.complete・turn.start・ui.closeにフックする
  • ターンをまたいで自分の状態を持つ

良いところ

  • ネットワークに出ない
  • プロセスを起こさない
  • TypeScript で書かれている
  • エラーを扱う

作り始めるためのコード

2 種類あります。上のデザインから modscode が書いた雛形と、その Mod 自身のコードのうち描いている部分です。

雛形(register.tsx)

register.tsx
import type { Register } from 'claude-code'

// Drawn like work-visualized by Grzegorz Sierocki (pane, status), as modscode read it from the mod's code:
// https://modscode.com/gallery/grzeskobyte-work-visualized/
// 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: "Claude Work" })
  on('ui.render', { component: 'Pane', requestId: 'my-pane' }, async ($, e) => {
    const { Box, Text } = $.ui.resolve(e)
    const t = '…'
    const t2 = '…'
    const t3 = '…'
    const t4 = '…'
    const t5 = '…'
    const t6 = '…'
    const t7 = '…'
    const t8 = '…'
    const t9 = '…'
    const t10 = '…'
    const t11 = '…'
    const t12 = '…'
    const t13 = '…'
    const t14 = '…'
    const t15 = '…'
    const t16 = '…'
    const t17 = '…'
    const t18 = '…'
    const t19 = '…'
    const t20 = '…'
    const t21 = '…'
    const t22 = '…'
    const t23 = '…'
    const t24 = '…'
    const t25 = '…'
    const t26 = '…'
    const t27 = '…'
    const t28 = '…'
    const t29 = '…'
    const t30 = '…'
    const t31 = '…'
    const t32 = '…'
    const t33 = '…'
    const t34 = '…'
    const t35 = '…'
    const t36 = '…'
    return (
      <Box flexDirection="column">
        <Box flexDirection="row" height={1}>
          <Text wrap="truncate">
            {t}
          </Text>
          <Text wrap="truncate">
            {t2}
          </Text>
          <Text wrap="truncate">
            {t3}
          </Text>
        </Box>
        <Box flexDirection="row" height={1}>
          <Text wrap="truncate">
            {t4}
          </Text>
          <Text wrap="truncate">
            {t5}
          </Text>
          <Text wrap="truncate">
            {t6}
          </Text>
        </Box>
        tree ↑0
        <Box flexDirection="row" height={1}>
          <Text wrap="truncate">
            {t7}
          </Text>
          <Text wrap="truncate">
            {t8}
          </Text>
          <Text wrap="truncate">
            {t9}
          </Text>
        </Box>
        <Box flexDirection="row" height={1}>
          <Text wrap="truncate">
            {t10}
          </Text>
          <Text wrap="truncate">
            {t11}
          </Text>
          <Text wrap="truncate">
            {t12}
          </Text>
        </Box>
        <Box flexDirection="row" height={1}>
          <Text wrap="truncate">
            {t13}
          </Text>
          <Text wrap="truncate">
            {t14}
          </Text>
          <Text wrap="truncate">
            {t15}
          </Text>
        </Box>
        <Box flexDirection="row" height={1}>
          <Text wrap="truncate">
            {t16}
          </Text>
          <Text wrap="truncate">
            {t17}
          </Text>
          <Text wrap="truncate">
            {t18}
          </Text>
        </Box>
        <Box flexDirection="column" borderStyle="round" paddingX={1}>
          <Box flexDirection="row" height={1}>
            <Text wrap="truncate">
              {t19}
            </Text>
            <Text wrap="truncate">
              {t20}
            </Text>
            <Text wrap="truncate">
              {t21}
            </Text>
          </Box>
          <Box flexDirection="row" height={1}>
            <Text wrap="truncate">
              {t22}
            </Text>
            <Text wrap="truncate">
              {t23}
            </Text>
            <Text wrap="truncate">
              {t24}
            </Text>
          </Box>
          <Box flexDirection="row" height={1}>
            <Text wrap="truncate">
              {t25}
            </Text>
            <Text wrap="truncate">
              {t26}
            </Text>
            <Text wrap="truncate">
              {t27}
            </Text>
          </Box>
        </Box>
        <Box flexGrow={1} />
        legend
        <Box flexDirection="row" height={1}>
          <Text wrap="truncate">
            {t28}
          </Text>
          <Text wrap="truncate">
            {t29}
          </Text>
          <Text wrap="truncate">
            {t30}
          </Text>
        </Box>
        <Box flexDirection="row" height={1}>
          <Text wrap="truncate">
            {t31}
          </Text>
          <Text wrap="truncate">
            {t32}
          </Text>
          <Text wrap="truncate">
            {t33}
          </Text>
        </Box>
        <Box flexDirection="row" height={1}>
          <Text wrap="truncate">
            {t34}
          </Text>
          <Text wrap="truncate">
            {t35}
          </Text>
          <Text wrap="truncate">
            {t36}
          </Text>
        </Box>
      </Box>
    )
  })
}

Mod 自身のコード

Mod のライセンス(MIT)に従って載せています。全文は下にあります。写すときは著作権表示を残してください。

hooks/register.tsx 318〜373 行 · ペイン
  on('ui.render', { component: 'Pane', requestId: PANE }, async ($, e) => {
    const { Box, Text } = $.ui.resolve(e)
    const now = await $.clock.now()
    const entries = await read($, tree)
    const act = await read($, activity)
    const gh = await read($, ghosts)
    const info = await read($, turn)
    const root = (await $.session.cwd()).replace(/\/+$/, '').split('/').pop() ?? ''
    const columns = Math.max(24, (e.props.bodyColumns ?? 40) - 1)
    const height = Math.max(8, e.props.scroll?.bodyRows ?? (e.viewport?.rows ?? 30) - 3)

    const line = (segs: Seg[], key: string) => (
      <Box key={key} flexDirection="row" height={1}>
        {merge(segs).map(s => (
          <Text color={s.c} backgroundColor={s.bg} bold={s.b} dimColor={s.dim} strikethrough={s.s} wrap="truncate">
            {s.t}
          </Text>
        ))}
      </Box>
    )
    // `── label ─────`, a section rule.
    const rule = (label: string, key: string, c = FAINT) =>
      line([{ t: '── ', c: FAINT }, { t: label, c, b: true }, { t: ' ' + '─'.repeat(Math.max(0, columns - label.length - 4)), c: FAINT }], key)

    const rows = buildRows({ tree: entries, activity: act, ghosts: gh, now, columns, folders })
    const summary = summaryLines(info, now, columns - 4)
    const legend = legendLines(columns)
    const chrome = 3 + 1 + legend.length + 1 + (summary.length > 0 ? summary.length + 2 : 0)
    const room = Math.max(3, height - chrome)
    const focus = focusOf(act)
    scroll = scrollTo(scroll, rows, focus, room)
    const visible = rows.slice(scroll, scroll + room)
    const above = scroll
    const below = Math.max(0, rows.length - scroll - room)
    const fileCount = entries.filter(t => !t.d).length
    const age = now - info.at
    const card = Math.min(smoothIn(age / 500), info.phase === 'complete' && age > T.summary - 1500 ? Math.max(0, (T.summary - age) / 1500) : 1)

    return (
      <Box flexDirection="column" width={columns}>
        {line(headerLine(now, focus !== undefined || info.phase === 'working', root), 'h')}
        {line(statusLine(act, info, now, fileCount, columns), 's')}
        {rule(above > 0 ? `tree ↑${above}` : 'tree', 'r1')}
        {rows.length === 0 ? line([{ t: ' scanning…', c: MUTED }], 'empty') : visible.map(r => line(r.segs, r.key))}
        {below > 0 && line([{ t: `   ↓ ${below} more`, c: FAINT }], 'down')}
        {summary.length > 0 && (
          <Box flexDirection="column" borderStyle="round" borderColor={mix(FAINT, COLOR.create, card * 0.8)} paddingX={1}>
            {summary.map((segs, i) => line(segs, `sum${i}`))}
          </Box>
        )}
        <Box flexGrow={1} />
        {rule('legend', 'r2')}
        {legend.map((segs, i) => line(segs, `leg${i}`))}
      </Box>
    )
  })
ライセンスの全文(MIT)
MIT License

Copyright (c) 2026 Grzegorz Sierocki

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.

コードが呼ぶもの

ファイル読み取りツール呼び出し保存

コードから読めること

2026-10-06 に読んだコミット 83303d385270 のソースから。最初のまとまりが載せる条件で、残りは自分で判断するための材料です。後のコミットは、次に読むまで見ていません。

載せる条件: 確かめやすいコード
入口を読んだhooks/hooks.json が名指すモジュールをすべて読んだ。hooks/register.tsx
解析できるすべてのファイルが TypeScript か JavaScript として解析できる。2 ファイルを解析
コードが Mod の中で完結import は Mod 自身のファイルかエンジンのモジュールだけ。パッケージも require もない。コードはすべて Mod の中
読める圧縮した行・eval・new Function・計算した道の import()・符号化した塊がない。圧縮・eval・符号化した塊なし
呼び出しが見える通信とプログラム起動はその場で $.http.fetch・$.process.run と書き、他へ渡さない。外への呼び出しはすべてその場の $ で
入れる前に自分で判断する材料
描く場所コードから読んだ、描く先。ターミナル・デスクトップアプリ・両方・何も描かない(フックだけ: 見張りやプロンプトの書き換え)のどれか。出すだけで、外す理由にはしない。ターミナルとデスクトップアプリに同じように描く
入れる手順リポジトリ自身の .claude-plugin/marketplace.json にこの Mod が載っていて、ページに書いた手順でそのマーケットプレイスから入れられるか。リポジトリの .claude-plugin/marketplace.json に載っており、そこから入れられる
Windows のプログラム$.process で起動するプログラムが Windows にあるか(tail・date・open・osascript・/usr/… などは無い)。Windows にないプログラムを使わない
通信fetch の送り先(https のホスト)がコードに書いてあるか。通信なし
プログラム起動するプログラムの名前がコードに書いてあり、シェル・インタプリタ・通信用の道具でないか。プログラムを起動しない
読んで送るファイルや環境変数を読み、かつ通信するか。通信しない
ソースの鍵ソースに API キーや秘密鍵らしきものがあるか。ソースに鍵なし
ライセンスオープンなライセンス(MIT・Apache-2.0・BSD・ISC・Unlicense・0BSD・CC0)で全文があれば、modscode にコードを載せる。違えばリンクだけ。MIT

コードの文面を読んだだけで、安全の審査ではありません。動かしてはおらず、起動するプログラムの中で何が起きるかも見えません。入れる前の確認はあなたの役目です。 載せる条件

入れる

入れる前に、必ず自分で確かめてください。Mod はサンドボックスなしで、あなたの権限で動きます。modscode はこのコードの安全を保証しません。下のコードを読み(またはフォルダーで claude plugin validate .)、触るものを見て、読んだコミットを入れてください。

リポジトリがそのままマーケットプレイスです。このマーケットプレイスを足し(ターミナルでは次のコマンド、デスクトップアプリではプラグインの設定)、そこから Mod を入れます。

/plugin marketplace add GrzeskoByte/claude-work-visualized
/plugin install work-visualized@claude-work-visualized

入るのはマーケットプレイスの最新のコミットで、ここで読んだもの(83303d385270)と違うことがあります。入れる前に見比べてください。

Claude に聞く

modscode のコネクタを入れると、Claude がこのデザイン・コードが触るもの・コードを読んで、それをもとに作れます。たとえば:

modscode のデザイン「grzeskobyte-work-visualized」をコードごと読んで、同じようなペインを作って

Claude から探す: MCP コネクタ

似たデザイン