ccprogress
A progress bar of the current task above the spinner, in the terminal and the Desktop app
何をするか
- プロンプトの上の帯・欄を描く
- /progress を足す
- ツールの呼び出しを見張る(止めることがある)
- classic.SessionStart・prompt.compose・prompt.submit・session.start ほか 2 個にフックする
- ターンをまたいで自分の状態を持つ
良いところ
- ネットワークに出ない
- TypeScript で書かれている
- デスクトップ専用の分岐がある
- エラーを扱う
作り始めるためのコード
2 種類あります。上のデザインから modscode が書いた雛形と、その Mod 自身のコードのうち描いている部分です。
雛形(register.tsx)
import type { Register } from 'claude-code'
// Drawn like ccprogress by amigoer (pane, band, toast), as modscode read it from the mod's code:
// https://modscode.com/gallery/amigoer-ccprogress/
// 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, Svg, Text, Button } = $.ui.resolve(e)
const phaseIconSvg = '…'
const PHASE_ALT = '…'
const allDone = '…'
const text = '…'
const goal = '…'
const text2 = '…'
const text3 = '…'
const text4 = '…'
const position = '…'
const total = '…'
const hideSteps = '…'
const dismiss = '…'
const GLYPHS = '…'
const title = '…'
const GLYPHS2 = '…'
const title2 = '…'
const GLYPHS3 = '…'
const title3 = '…'
return (
<Box flexDirection="column">
<Box flexDirection="row" alignItems="center" columnGap={2}>
<Box flexDirection="row" alignItems="center" columnGap={2} flexGrow={1} flexShrink={1} minWidth={0} overflow="hidden">
<Box flexDirection="row" alignItems="center" columnGap={1} flexGrow={1} flexShrink={1} minWidth={0}>
<Svg source={`${phaseIconSvg}`} alt={`${PHASE_ALT}`} width={16} height={16} />
<Box flexShrink={0}>
<Text>
{allDone}
</Text>
</Box>
<Box flexShrink={0}>
<Text>
{"· "}
{text}
</Text>
</Box>
<Box flexShrink={100} minWidth={0}>
<Text dimColor wrap="truncate-end">
{goal}
</Text>
</Box>
</Box>
<Box flexDirection="row" alignItems="center" columnGap={1} flexShrink={1} minWidth={0}>
<Box flexShrink={1} minWidth={0}>
<Text>
<Text>
{text2}
</Text>
<Text>
{text3}
</Text>
<Text>
{text4}
</Text>
</Text>
</Box>
<Box flexShrink={0}>
<Text dimColor>
{position}
/
{total}
</Text>
</Box>
</Box>
</Box>
<Box flexDirection="row" alignItems="center" columnGap={1} flexShrink={0}>
<Button label={`${hideSteps} ▴`} />
<Button role="dismiss" label={`${dismiss}`} />
</Box>
</Box>
<Box marginTop={1} flexDirection="column">
<Box flexDirection="column" paddingLeft={2}>
<Box flexDirection="row" alignItems="center" columnGap={1}>
<Text>
{GLYPHS}
</Text>
<Text wrap="truncate-end">
{title}
</Text>
</Box>
<Box flexDirection="row" alignItems="center" columnGap={1}>
<Text>
{GLYPHS2}
</Text>
<Text wrap="truncate-end">
{title2}
</Text>
</Box>
<Box flexDirection="row" alignItems="center" columnGap={1}>
<Text>
{GLYPHS3}
</Text>
<Text wrap="truncate-end">
{title3}
</Text>
</Box>
</Box>
</Box>
{await next(e)}
</Box>
)
})
// the pane: open it with $.ui.open({ id: 'my-pane', title: "Progress" })
on('ui.render', { component: 'Pane', requestId: 'my-pane' }, async ($, e) => {
const { Box, Text, Svg, Button } = $.ui.resolve(e)
const goal = '…'
const phaseIconSvg = '…'
const PHASE_ALT = '…'
const allDone = '…'
const text = '…'
const goal2 = '…'
const text2 = '…'
const text3 = '…'
const text4 = '…'
const position = '…'
const total = '…'
const GLYPHS = '…'
const title = '…'
const GLYPHS2 = '…'
const title2 = '…'
const GLYPHS3 = '…'
const title3 = '…'
const clear = '…'
return (
<Box flexDirection="column" rowGap={1}>
<Text bold>
{goal}
</Text>
<Box flexDirection="row" alignItems="center" columnGap={2} flexGrow={1} flexShrink={1} minWidth={0} overflow="hidden">
<Box flexDirection="row" alignItems="center" columnGap={1} flexGrow={1} flexShrink={1} minWidth={0}>
<Svg source={`${phaseIconSvg}`} alt={`${PHASE_ALT}`} width={16} height={16} />
<Box flexShrink={0}>
<Text>
{allDone}
</Text>
</Box>
<Box flexShrink={0}>
<Text>
{"· "}
{text}
</Text>
</Box>
<Box flexShrink={100} minWidth={0}>
<Text dimColor wrap="truncate-end">
{goal2}
</Text>
</Box>
</Box>
<Box flexDirection="row" alignItems="center" columnGap={1} flexShrink={1} minWidth={0}>
<Box flexShrink={1} minWidth={0}>
<Text>
<Text>
{text2}
</Text>
<Text>
{text3}
</Text>
<Text>
{text4}
</Text>
</Text>
</Box>
<Box flexShrink={0}>
<Text dimColor>
{position}
/
{total}
</Text>
</Box>
</Box>
</Box>
<Box flexDirection="column" paddingLeft={2}>
<Box flexDirection="row" alignItems="center" columnGap={1}>
<Text>
{GLYPHS}
</Text>
<Text wrap="truncate-end">
{title}
</Text>
</Box>
<Box flexDirection="row" alignItems="center" columnGap={1}>
<Text>
{GLYPHS2}
</Text>
<Text wrap="truncate-end">
{title2}
</Text>
</Box>
<Box flexDirection="row" alignItems="center" columnGap={1}>
<Text>
{GLYPHS3}
</Text>
<Text wrap="truncate-end">
{title3}
</Text>
</Box>
</Box>
<Button label={`${clear}`} />
</Box>
)
})
}
Mod 自身のコード
Mod のライセンス(MIT)に従って載せています。全文は下にあります。写すときは著作権表示を残してください。
plugins/ccprogress/hooks/register.tsx 406〜459 行 · バンド
on('ui.render', { component: 'AbovePrompt' }, async ($, e, next) => {
if (e.props.hasSurvey || e.props.view.agentId !== undefined) return next(e)
const p = await read($, plan)
const expanded = await read($, isExpanded)
const isSpinnerShowing = e.props.isWorking && e.surface === 'terminal'
if (!hasSteps(p) || (isSpinnerShowing && !expanded)) return next(e)
const kit = $.ui.resolve(e)
const { Box, Button, Text } = kit
const s = summarize(p)
const words = wordsFor(isCjk(p))
// Keep what other mods draw here, but not the engine's empty band.
const below = await next(e)
const lead = isSpinnerShowing ? (
<Box paddingLeft={TERMINAL_INDENT} flexShrink={1}>
<Text dimColor wrap="truncate-end">
{p.goal !== '' ? p.goal : words.stepsDone(s.done, s.total)}
</Text>
</Box>
) : (
progressRow(kit, p, {
surface: e.surface,
columns: e.props.bodyColumns,
isWorking: e.props.isWorking,
elapsed: await elapsedOf($, p, e.surface, e.props.isWorking),
})
)
const dismiss =
e.surface === 'terminal' ? (
<Button key="dismiss" label="×" plain onPress={() => persist($, null)} />
) : (
<Button key="dismiss" role="dismiss" label={words.dismiss} onPress={() => persist($, null)} />
)
return (
<Box flexDirection="column">
<Box flexDirection="row" alignItems="center" columnGap={2}>
{lead}
<Box flexDirection="row" alignItems="center" columnGap={1} flexShrink={0}>
<Button
key="toggle"
label={expanded ? `${words.hideSteps} ▴` : `${words.viewSteps} ▾`}
onPress={() => update($, isExpanded, value => !value)}
/>
{s.isComplete && dismiss}
</Box>
</Box>
{expanded && (
<Box marginTop={1} flexDirection="column">
{checklist(kit, e.surface, p, e.props.isWorking)}
</Box>
)}
{below.type !== 'engine' && below}
</Box>
)
})plugins/ccprogress/hooks/view.tsx 98〜170 行 · バンド
export function progressRow(kit: Kit, plan: ProgressPlan, { surface, columns, isWorking, elapsed }: RowOptions): RenderNode {
const { Box, Text } = kit
const s = summarize(plan)
const words = wordsFor(isCjk(plan))
const phase = phaseOf(plan, isWorking)
const count = (
<Text dimColor>
{s.position}/{s.total}
</Text>
)
const timer =
phase === 'working' && elapsed !== undefined ? (
<Text {...(elapsed.isStuck ? { color: WARNING } : { dimColor: true })}>· {elapsed.text}</Text>
) : null
if (surface === 'terminal') {
return (
<Box key="progress-row" flexDirection="row" columnGap={2} paddingLeft={TERMINAL_INDENT} flexShrink={1}>
{bar(kit, surface, plan, columns, false)}
{count}
{phase === 'done' ? (
<Box flexDirection="row" columnGap={1} flexShrink={1}>
<Text color={SUCCESS}>✓ {words.allDone}</Text>
{plan.goal !== '' && (
<Text dimColor wrap="truncate-end">
{plan.goal}
</Text>
)}
</Box>
) : (
<Box flexDirection="row" columnGap={1} flexShrink={1}>
<Text wrap="truncate-end">{s.current?.title ?? ''}</Text>
{timer}
</Box>
)}
</Box>
)
}
// A narrow band gives up the goal first, then squeezes the bar and truncates the step;
// "All done", the count and the buttons beside the row keep their room. The row clips
// rather than painting over the buttons.
return (
<Box key="progress-row" flexDirection="row" alignItems="center" columnGap={2} flexGrow={1} flexShrink={1} minWidth={0} overflow="hidden">
<Box flexDirection="row" alignItems="center" columnGap={1} flexGrow={1} flexShrink={1} minWidth={0}>
{phaseIcon(kit, phase)}
{phase === 'done' ? (
<Box key="label" flexShrink={0}>
<Text>{words.allDone}</Text>
</Box>
) : (
<Box key="label" flexShrink={1} minWidth={0}>
<Text wrap="truncate-end">{s.current?.title ?? ''}</Text>
</Box>
)}
{timer && <Box flexShrink={0}>{timer}</Box>}
{phase === 'done' && plan.goal !== '' && (
<Box key="goal" flexShrink={GOAL_SHRINK} minWidth={0}>
<Text dimColor wrap="truncate-end">
{plan.goal}
</Text>
</Box>
)}
</Box>
<Box flexDirection="row" alignItems="center" columnGap={1} flexShrink={1} minWidth={0}>
<Box key="bar" flexShrink={1} minWidth={0}>
{bar(kit, surface, plan, columns, phase === 'working')}
</Box>
<Box key="count" flexShrink={0}>
{count}
</Box>
</Box>
</Box>
)
}plugins/ccprogress/hooks/view.tsx 37〜41 行 · バンド
function phaseIcon(kit: Kit, phase: Phase): RenderNode {
const { Svg } = kit as Elements['desktop']
// Only an interactive SVG animates; the static states stay plain images.
return <Svg source={phaseIconSvg(phase, PALETTE)} alt={PHASE_ALT[phase]} width={16} height={16} isInteractive={phase === 'working'} />
}plugins/ccprogress/hooks/view.tsx 54〜78 行 · バンド
function bar(kit: Kit, surface: RenderSurface, plan: ProgressPlan, columns: number | undefined, isWorking: boolean): RenderNode {
const Svg = svgOf(kit, surface)
if (Svg) {
const s = summarize(plan)
const width = svgWidth(s.total)
return (
<Svg
source={barSvg(plan.steps, width, PALETTE, isWorking)}
alt={`${s.done} of ${s.total} steps done`}
height={4}
isInteractive={isWorking}
/>
)
}
const { Text } = kit
return (
<Text>
{barRuns(plan.steps, barWidth(columns)).map((run, i) => (
<Text key={`bar-${i}`} {...toneProps(run.tone)}>
{run.text}
</Text>
))}
</Text>
)
}plugins/ccprogress/hooks/view.tsx 172〜186 行 · バンド
export function checklist(kit: Kit, surface: RenderSurface, plan: ProgressPlan, isWorking: boolean): RenderNode {
const { Box, Text } = kit
return (
<Box key="checklist" flexDirection="column" paddingLeft={surface === 'terminal' ? TERMINAL_INDENT : 0}>
{plan.steps.map((step, i) => (
<Box key={`step-${i}`} flexDirection="row" alignItems="center" columnGap={1}>
{stepIcon(kit, surface, step.status, isWorking)}
<Text dimColor={step.status === 'completed'} bold={step.status === 'in_progress'} wrap="truncate-end">
{step.title}
</Text>
</Box>
))}
</Box>
)
}plugins/ccprogress/hooks/view.tsx 43〜52 行 · バンド
function stepIcon(kit: Kit, surface: RenderSurface, status: ProgressStatus, isWorking: boolean): RenderNode {
const Svg = svgOf(kit, surface)
if (Svg) {
const isAnimated = isWorking && status === 'in_progress'
return <Svg source={stepIconSvg(status, PALETTE, isAnimated)} alt={STATUS_ALT[status]} width={14} height={14} isInteractive={isAnimated} />
}
const { Text } = kit
const tone: Tone = status === 'completed' ? 'done' : status === 'in_progress' ? 'current' : 'pending'
return <Text {...toneProps(tone)}>{GLYPHS[status]}</Text>
}ライセンスの全文(MIT)
MIT License Copyright (c) 2026 amigoer 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 に読んだコミット f0ec37218d42 のソースから。最初のまとまりが載せる条件で、残りは自分で判断するための材料です。後のコミットは、次に読むまで見ていません。
| 載せる条件: 確かめやすいコード | |
|---|---|
| 入口を読んだ | hooks/hooks.json が名指すモジュールをすべて読んだ。plugins/ccprogress/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/ccprogress/hooks/register.tsx:141 notify-send(Windows にない) |
| 通信 | fetch の送り先(https のホスト)がコードに書いてあるか。通信なし |
| プログラム | 起動するプログラムの名前がコードに書いてあり、シェル・インタプリタ・通信用の道具でないか。plugins/ccprogress/hooks/register.tsx:138 osascript(シェル・インタプリタ) |
| 読んで送る | ファイルや環境変数を読み、かつ通信するか。通信しない |
| ソースの鍵 | ソースに API キーや秘密鍵らしきものがあるか。ソースに鍵なし |
| ライセンス | オープンなライセンス(MIT・Apache-2.0・BSD・ISC・Unlicense・0BSD・CC0)で全文があれば、modscode にコードを載せる。違えばリンクだけ。MIT |
コードの文面を読んだだけで、安全の審査ではありません。動かしてはおらず、起動するプログラムの中で何が起きるかも見えません。入れる前の確認はあなたの役目です。 載せる条件
入れる
入れる前に、必ず自分で確かめてください。Mod はサンドボックスなしで、あなたの権限で動きます。modscode はこのコードの安全を保証しません。下のコードを読み(またはフォルダーで claude plugin validate .)、触るものを見て、読んだコミットを入れてください。
リポジトリがそのままマーケットプレイスです。このマーケットプレイスを足し(ターミナルでは次のコマンド、デスクトップアプリではプラグインの設定)、そこから Mod を入れます。
/plugin marketplace add amigoer/ccprogress/plugin install ccprogress@ccprogress入るのはマーケットプレイスの最新のコミットで、ここで読んだもの(f0ec37218d42)と違うことがあります。入れる前に見比べてください。
Claude に聞く
modscode のコネクタを入れると、Claude がこのデザイン・コードが触るもの・コードを読んで、それをもとに作れます。たとえば:
modscode のデザイン「amigoer-ccprogress」をコードごと読んで、同じようなペインを作って似たデザイン
-
Claude に頼む…Fix loginRemoveCopy markdownacme/app · mainCopy linkCopy markdownbuild2h 10mbuild2h 10mbuild2h 10mHosted on uploads.sh, not committed to the repo.They will appear in a comment on the pull request once opened.
-
Claude に頼む…Skins0 Your promptadd rate limiting to the hub api0 Tool rows: finished, running, failedYour prompt Spinner0 Folded group of reads and searches●main · note 3 · note 3 · note 30 Edit diff cardDesktop only; the terminal keeps Claude Code's diff.0 Shell output cardDesktop only.0 Code block cardDesktop only; the terminal keeps Claude Code's markdown.0 TableAccentAccentAccentAccentAccentAccentAccentAccentAccentAccentAccentAccentCopyAccentAccentAccentAccentAccentAccentAccentAccentAccentAccentAccentAccentCopyAccentAccentAccentAccentAccentAccentAccentAccentAccentAccentAccentAccentCopy0 SpinnerAccent SpinnerSpinnerSpinner… 2h 10m0 Band above the prompt: normal, then nudging to compact█████░░░ 42% build█████░░░ 42% build█████░░░ 42% buildContext is 42% full0 Compact now0 Band above a questionTable BashBashBash0 Turn footer (terminal)3 build in 2h 10m · Grep · +3 −3
-
spending-effort-with-jev: no TypeSafe API key, so effort tips are off. Set it in /plugin.⚠ effort: long run, fuzzy spec → have Claude interview you, then go maxClaude に頼む…
-
✦ explain as pick how Claude answers×3 ● build3 ● build3 ● build▸ VideoClaude に頼む…
-
Claude に頼む…Clawd's shopLevel 3 · Fix loginTinkerer1 coin per 12.4 tokens Claude writes, 100 per level, 25 per badgeTake everything offContextbuildLevel 3buildLevel 3buildLevel 3ContextbuildLevel 3buildLevel 3buildLevel 3ContextbuildLevel 3buildLevel 3buildLevel 3
-
Claude に頼む…Desktop Usage StripDesktop Usage Strip
Token totals: latest 3 observed requests. USD is the engine session ledger, not a subscription charge.Hide composer stripRefresh