breadcrumbs
An always-on pane with what this session is about: the task, your last prompt, what Claude is doing and last said, and the explanations it wrote, saved as notes you can preview.
何をするか
- 欄・ステータス行・トーストを描く
- /whereami・/tests を足す
- ツールの呼び出しを見張る(止めることがある)
- agent.spawn・classic.SessionStart・prompt.compose・prompt.submit ほか 2 個にフックする
- ターンをまたいで自分の状態を持つ
良いところ
- ネットワークに出ない
- TypeScript で書かれている
- エラーを扱う
作り始めるためのコード
2 種類あります。上のデザインから modscode が書いた雛形と、その Mod 自身のコードのうち描いている部分です。
雛形(register.tsx)
import type { Register } from 'claude-code'
// Drawn like breadcrumbs by crockalet (pane, status, toast), as modscode read it from the mod's code:
// https://modscode.com/gallery/crockalet-breadcrumbs/
// 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: "tests" })
on('ui.render', { component: 'Pane', requestId: 'my-pane' }, async ($, e) => {
const { Box, Text, Button, Input, Markdown } = $.ui.resolve(e)
const repo = '…'
const branch = '…'
const title = '…'
const map = '…'
const asking = '…'
const question = '…'
const context = '…'
const option = '…'
const optionNotes = '…'
const optionNotes2 = '…'
const optionNotes3 = '…'
const value = '…'
const question2 = '…'
const context2 = '…'
const optionNotes4 = '…'
const optionNotes5 = '…'
const optionNotes6 = '…'
const question3 = '…'
const context3 = '…'
const optionNotes7 = '…'
const optionNotes8 = '…'
const optionNotes9 = '…'
const answeredCount = '…'
const ago = '…'
const text = '…'
const ago2 = '…'
const text2 = '…'
const ago3 = '…'
const text3 = '…'
const ago4 = '…'
const text4 = '…'
const activity = '…'
const head = '…'
const length = '…'
const text5 = '…'
const text6 = '…'
const text7 = '…'
const name = '…'
const state = '…'
const name2 = '…'
const branch2 = '…'
const state2 = '…'
const name3 = '…'
const branch3 = '…'
const state3 = '…'
const f = '…'
const f2 = '…'
const f3 = '…'
const length2 = '…'
const ago5 = '…'
const ago6 = '…'
const ago7 = '…'
const narrowTables = '…'
const length3 = '…'
const length4 = '…'
const deadEnds = '…'
const d = '…'
const d2 = '…'
const d3 = '…'
const text8 = '…'
const text9 = '…'
const text10 = '…'
return (
<Box flexDirection="column" gap={1}>
<Text dimColor wrap="truncate-end">
{`${repo} · ${branch}`}
</Text>
<Box flexDirection="column">
<Box>
<Text color="claude">
{"● "}
</Text>
<Text>
{title}
</Text>
</Box>
<Text dimColor wrap="truncate-end">
{" ⎿ before: "}
{map}
</Text>
</Box>
<Box flexDirection="column">
<Text color="warning">
Needs you
</Text>
<Box flexDirection="column">
<Box>
<Text color="warning">
{"● "}
</Text>
<Text bold>
{asking}
</Text>
</Box>
<Text dimColor>
{" answer in the dialog below"}
</Text>
</Box>
<Box flexDirection="column">
<Box>
<Text color="warning">
{"▾ "}
</Text>
<Text>
{question}
</Text>
</Box>
<Box marginLeft={2}>
<Text dimColor>
{context}
</Text>
</Box>
<Box marginLeft={2} flexDirection="column">
<Box flexDirection="column">
<Button label={`✓ ${option}`} variant="primary" />
<Box marginLeft={2}>
<Text dimColor>
{optionNotes}
</Text>
</Box>
</Box>
<Box flexDirection="column">
<Button label={`✓ ${option}`} variant="primary" />
<Box marginLeft={2}>
<Text dimColor>
{optionNotes2}
</Text>
</Box>
</Box>
<Box flexDirection="column">
<Button label={`✓ ${option}`} variant="primary" />
<Box marginLeft={2}>
<Text dimColor>
{optionNotes3}
</Text>
</Box>
</Box>
</Box>
<Box marginLeft={2}>
<Input placeholder="or type an answer…" value="" submitLabel={`${value}`} />
</Box>
<Box marginLeft={2}>
<Input placeholder="extra details (optional)…" value="" />
</Box>
<Box marginLeft={2} columnGap={2}>
<Button plain dimColor label="less" />
<Button plain dimColor label="reply…" />
<Button plain dimColor label="dismiss" />
</Box>
</Box>
<Box flexDirection="column">
<Box>
<Text color="warning">
{"▾ "}
</Text>
<Text>
{question2}
</Text>
</Box>
<Box marginLeft={2}>
<Text dimColor>
{context2}
</Text>
</Box>
<Box marginLeft={2} flexDirection="column">
<Box flexDirection="column">
<Button label={`✓ ${option}`} variant="primary" />
<Box marginLeft={2}>
<Text dimColor>
{optionNotes4}
</Text>
</Box>
</Box>
<Box flexDirection="column">
<Button label={`✓ ${option}`} variant="primary" />
<Box marginLeft={2}>
<Text dimColor>
{optionNotes5}
</Text>
</Box>
</Box>
<Box flexDirection="column">
<Button label={`✓ ${option}`} variant="primary" />
<Box marginLeft={2}>
<Text dimColor>
{optionNotes6}
</Text>
</Box>
</Box>
</Box>
<Box marginLeft={2}>
<Input placeholder="or type an answer…" value="" submitLabel={`${value}`} />
</Box>
<Box marginLeft={2}>
<Input placeholder="extra details (optional)…" value="" />
</Box>
<Box marginLeft={2} columnGap={2}>
<Button plain dimColor label="less" />
<Button plain dimColor label="reply…" />
<Button plain dimColor label="dismiss" />
</Box>
</Box>
<Box flexDirection="column">
<Box>
<Text color="warning">
{"▾ "}
</Text>
<Text>
{question3}
</Text>
</Box>
<Box marginLeft={2}>
<Text dimColor>
{context3}
</Text>
</Box>
<Box marginLeft={2} flexDirection="column">
<Box flexDirection="column">
<Button label={`✓ ${option}`} variant="primary" />
<Box marginLeft={2}>
<Text dimColor>
{optionNotes7}
</Text>
</Box>
</Box>
<Box flexDirection="column">
<Button label={`✓ ${option}`} variant="primary" />
<Box marginLeft={2}>
<Text dimColor>
{optionNotes8}
</Text>
</Box>
</Box>
<Box flexDirection="column">
<Button label={`✓ ${option}`} variant="primary" />
<Box marginLeft={2}>
<Text dimColor>
{optionNotes9}
</Text>
</Box>
</Box>
</Box>
<Box marginLeft={2}>
<Input placeholder="or type an answer…" value="" submitLabel={`${value}`} />
</Box>
<Box marginLeft={2}>
<Input placeholder="extra details (optional)…" value="" />
</Box>
<Box marginLeft={2} columnGap={2}>
<Button plain dimColor label="less" />
<Button plain dimColor label="reply…" />
<Button plain dimColor label="dismiss" />
</Box>
</Box>
<Box marginTop={1}>
<Button variant="primary" label={`Send ${answeredCount} answers`} />
</Box>
</Box>
<Box flexDirection="column">
<Box justifyContent="space-between">
<Text dimColor>
{"You asked · "}
{ago}
</Text>
<Button plain dimColor label="less" />
</Box>
<Text>
{text}
</Text>
<Text dimColor wrap="truncate-end">
{" "}
{ago2}
{" · "}
{text2}
</Text>
<Text dimColor wrap="truncate-end">
{" "}
{ago3}
{" · "}
{text3}
</Text>
<Text dimColor wrap="truncate-end">
{" "}
{ago4}
{" · "}
{text4}
</Text>
</Box>
<Box flexDirection="column">
<Text dimColor>
Claude
{` · ${ago}`}
</Text>
<Box>
<Text color="claude">
{"● "}
</Text>
<Text wrap="truncate-end">
{activity}
</Text>
</Box>
<Box>
<Text dimColor>
{"⎿ "}
</Text>
<Box flexShrink={1}>
<Markdown dimColor text={`${head}`} />
</Box>
</Box>
</Box>
<Box flexDirection="column">
<Box justifyContent="space-between">
<Text dimColor>
Done
{` · ${length}`}
</Text>
<Button plain dimColor label="less" />
</Box>
<Box>
<Text color="success">
{"✓ "}
</Text>
<Text>
{text5}
</Text>
</Box>
<Box>
<Text color="success">
{"✓ "}
</Text>
<Text>
{text6}
</Text>
</Box>
<Box>
<Text color="success">
{"✓ "}
</Text>
<Text>
{text7}
</Text>
</Box>
<Text wrap="truncate-end">
<Text dimColor>
{"⎇ "}
</Text>
{name}
{" · "}
{branch}
{" ·"}
{" "}
<Text color="success">
{state}
</Text>
</Text>
<Text wrap="truncate-end">
<Text dimColor>
{"⎇ "}
</Text>
{name2}
{" · "}
{branch2}
{" ·"}
{" "}
<Text color="success">
{state2}
</Text>
</Text>
<Text wrap="truncate-end">
<Text dimColor>
{"⎇ "}
</Text>
{name3}
{" · "}
{branch3}
{" ·"}
{" "}
<Text color="success">
{state3}
</Text>
</Text>
<Text dimColor>
{length}
{" file"}
s
{" edited"}
</Text>
<Text dimColor wrap="truncate-start">
{" "}
{f}
</Text>
<Text dimColor wrap="truncate-start">
{" "}
{f2}
</Text>
<Text dimColor wrap="truncate-start">
{" "}
{f3}
</Text>
</Box>
<Box flexDirection="column">
<Text dimColor>
{"Notes · "}
{length2}
</Text>
<Box justifyContent="space-between">
<Button plain label={`▾ ${title} ★`} />
<Text dimColor>
{ago5}
</Text>
</Box>
<Box justifyContent="space-between">
<Button plain label={`▾ ${title} ★`} />
<Text dimColor>
{ago6}
</Text>
</Box>
<Box justifyContent="space-between">
<Button plain label={`▾ ${title} ★`} />
<Text dimColor>
{ago7}
</Text>
</Box>
<Box flexDirection="column" borderStyle="round" borderDimColor paddingX={1}>
<Markdown text={`${narrowTables}`} />
<Box gap={2}>
<Button label="Pin" />
<Button label="Close" />
</Box>
</Box>
</Box>
<Box flexDirection="column">
<Box justifyContent="space-between">
<Text dimColor>
{length3}
{" decided · "}
{length4}
{" tried"}
{` · ${deadEnds} dead ends`}
</Text>
<Button plain dimColor label="less" />
</Box>
<Box flexDirection="column">
<Box>
<Text color="suggestion">
{"· "}
</Text>
<Text>
{d}
</Text>
</Box>
<Box>
<Text color="suggestion">
{"· "}
</Text>
<Text>
{d2}
</Text>
</Box>
<Box>
<Text color="suggestion">
{"· "}
</Text>
<Text>
{d3}
</Text>
</Box>
<Box>
<Text color="success">
{"✓ "}
</Text>
<Text>
{text8}
</Text>
</Box>
<Box>
<Text color="success">
{"✓ "}
</Text>
<Text>
{text9}
</Text>
</Box>
<Box>
<Text color="success">
{"✓ "}
</Text>
<Text>
{text10}
</Text>
</Box>
</Box>
</Box>
</Box>
)
})
on('session.start', async ($, e, next) => {
const open = '…'
const title = '…'
await $.ui.status(`⏳ ${open} test steps waiting on you`)
await $.ui.toast(`Pinned "${title}"`)
await $.ui.toast(`Pick or type an answer first`)
return next(e)
})
}
Mod 自身のコード
読んだコミットにライセンスの全文が見つからなかったため、ソースの場所へのリンクだけにしています。
コードが呼ぶもの
プログラム起動ファイル書き込み環境変数Claude を動かすツール呼び出し保存
コードから読み取ったデザイン
読み取ったコミットのソースから描いたもので、動かした結果ではありません。一覧は 3 回描き、条件はデスクトップアプリで描く最初の分岐を取り、動かしたときにだけ決まる値は仮の例(点線の下線)にするか省きます。色と書体はこのサイトのものです。
コードから読めること
2026-10-06 に読んだコミット ba3e9bef4b0c のソースから。最初のまとまりが載せる条件で、残りは自分で判断するための材料です。後のコミットは、次に読むまで見ていません。
| 載せる条件: 確かめやすいコード | |
|---|---|
| 入口を読んだ | hooks/hooks.json が名指すモジュールをすべて読んだ。plugins/breadcrumbs/hooks/register.tsx |
| 解析できる | すべてのファイルが TypeScript か JavaScript として解析できる。5 ファイルを解析 |
| コードが 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/… などは無い)。plugins/breadcrumbs/hooks/register.tsx:194 mkdir(Windows にない); plugins/breadcrumbs/hooks/register.tsx:195 mv(Windows にない); plugins/breadcrumbs/hooks/register.tsx:199 rm(Windows にない); plugins/breadcrumbs/hooks/register.tsx:203 rm(Windows にない) |
| 通信 | fetch の送り先(https のホスト)がコードに書いてあるか。通信なし |
| プログラム | 起動するプログラムの名前がコードに書いてあり、シェル・インタプリタ・通信用の道具でないか。git(通信する), mkdir, mv, rm, sleep |
| 読んで送る | ファイルや環境変数を読み、かつ通信するか。reads environment variables and files and reaches the network |
| ソースの鍵 | ソースに API キーや秘密鍵らしきものがあるか。ソースに鍵なし |
| ライセンス | オープンなライセンス(MIT・Apache-2.0・BSD・ISC・Unlicense・0BSD・CC0)で全文があれば、modscode にコードを載せる。違えばリンクだけ。ライセンスなし |
コードの文面を読んだだけで、安全の審査ではありません。動かしてはおらず、起動するプログラムの中で何が起きるかも見えません。入れる前の確認はあなたの役目です。 載せる条件
入れる
入れる前に、必ず自分で確かめてください。Mod はサンドボックスなしで、あなたの権限で動きます。modscode はこのコードの安全を保証しません。下のコードを読み(またはフォルダーで claude plugin validate .)、触るものを見て、読んだコミットを入れてください。
リポジトリがそのままマーケットプレイスです。このマーケットプレイスを足し(ターミナルでは次のコマンド、デスクトップアプリではプラグインの設定)、そこから Mod を入れます。
/plugin marketplace add crockalet/claude-mods/plugin install breadcrumbs@claude-mods入るのはマーケットプレイスの最新のコミットで、ここで読んだもの(ba3e9bef4b0c)と違うことがあります。入れる前に見比べてください。
Claude に聞く
modscode のコネクタを入れると、Claude がこのデザイン・コードが触るもの・コードを読んで、それをもとに作れます。たとえば:
modscode のデザイン「crockalet-breadcrumbs」をコードごと読んで、同じようなペインを作って似たデザイン
-
Claude に頼む…────────Clear doneClaude⋯└─ buildCancelCancelCancel└─ buildCancelCancelCancel└─ buildCancelCancelCancel
-
Claude に頼む…GitHub inboxGitHubloading…Refresh rbuildbuildbuildClose xStealth IssuesNo open issues in this view.#3 Fix login · Pinned notice · 2h 10m · Top row commentsWork on itopen#3 Fix login · Pinned notice · 2h 10m · Top row commentsWork on itopen#3 Fix login · Pinned notice · 2h 10m · Top row commentsWork on itopenPull requestsNo open pull requests.#3 Fix login · main · draft · build · HiddenChecksReviewopen#3 Fix login · main · draft · build · HiddenChecksReviewopen#3 Fix login · main · draft · build · HiddenChecksReviewopenChecks for #3Plain
-
a1b2c3d's result did not fit in the promptClaude に頼む…
-
Claude に頼む…AskSide questions. Answers stay here, out of the chat.Nothing asked yet.────────Remove ask────────› Copythinking…No answer.(empty)Use promptUse promptUse promptCopyRetryRemove────────› Copythinking…No answer.(empty)Use promptUse promptUse promptCopyRetryRemove────────› Copythinking…No answer.(empty)Use promptUse promptUse promptCopyRetryRemoveSuggest next promptsClear answered
-
Claude に頼む…LinkBackAdding...Copying...Fix loginCopying my-app 2h 10m 3 turns buildCopyYou 14:32Show all33 turns hiddenLoading...You 14:32Show all3You 14:32Show all3You 14:32Show all3
-
Claude に頼む…Files⋯│●./file-name.tsx│●./file-name.tsx│●./file-name.tsxNew file Move to Recycle Bin?────────./menu-item.tsx./menu-item.tsx./menu-item.tsx────────./menu-item.tsx./menu-item.tsx./menu-item.tsx────────./menu-item.tsx./menu-item.tsx./menu-item.tsx