temper
Claude cannot write code before you approve the intent. Gated plan, TDD, review and check for AI written code, with a phase bar in Claude Code.
何をするか
- 欄を描く
- ツールの呼び出しを見張る(止めることがある)
- attribution.text・classic.SessionStart・prompt.compose・session.start ほか 4 個にフックする
- ターンをまたいで自分の状態を持つ
良いところ
- ネットワークに出ない
- プロセスを起こさない
- TypeScript で書かれている
- デスクトップ専用の分岐がある
作り始めるためのコード
2 種類あります。上のデザインから modscode が書いた雛形と、その Mod 自身のコードのうち描いている部分です。
雛形(register.tsx)
import type { Register } from 'claude-code'
// Drawn like temper by galando (pane, band, toast), as modscode read it from the mod's code:
// https://modscode.com/gallery/galando-temper/
// 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: "Temper Run" })
on('ui.render', { component: 'Pane', requestId: 'my-pane' }, async ($, e) => {
const { Box, Text, Button } = $.ui.resolve(e)
const passed = '…'
const total = '…'
const text = '…'
const length = '…'
const whereText = '…'
const task = '…'
const MARK = '…'
const label = '…'
const now = '…'
const sync = '…'
const line = '…'
const line2 = '…'
const line3 = '…'
const id = '…'
const severity = '…'
const claim = '…'
const key = '…'
const desc = '…'
return (
<Box flexDirection="column" rowGap={1} backgroundColor="#1c1c1c">
<Box flexDirection="column">
<Text bold color="#ffafd7">
◈ Temper
</Text>
<Text color="#a8a8a8">
Intent
</Text>
<Text bold color="#e4e4e4">
Untitled run
</Text>
</Box>
<Box flexDirection="column">
<Text color="#a8a8a8">
{`Acceptance criteria (what must be true) · ${passed} of ${total} met`}
</Text>
<Text color="#a8a8a8">
No criteria found in intent.md.
</Text>
<Text color="#87d787">
{`✔ ${text}`}
</Text>
<Text color="#87d787">
{`✔ ${text}`}
</Text>
<Text color="#87d787">
{`✔ ${text}`}
</Text>
<Text color="#a8a8a8">
{`and ${length} more. Open the pane in a wider terminal.`}
</Text>
</Box>
<Box flexDirection="column">
<Text color="#a8a8a8">
{`Phase · ${whereText}${task} · paused`}
</Text>
<Box flexDirection="row" flexWrap="wrap" columnGap={2}>
<Text>
{`${MARK} ${label}`}
</Text>
<Text>
{`${MARK} ${label}`}
</Text>
<Text>
{`${MARK} ${label}`}
</Text>
</Box>
<Text color="#a8a8a8">
✓ done ● you are here ○ upcoming ↺ redo
</Text>
<Text color="#e4e4e4">
{now}
</Text>
<Text color="#ffd787">
{sync}
</Text>
</Box>
<Box flexDirection="column">
<Text color="#a8a8a8">
Timeline, oldest first
</Text>
<Text color="#e4e4e4">
{line}
</Text>
<Text color="#e4e4e4">
{line2}
</Text>
<Text color="#e4e4e4">
{line3}
</Text>
</Box>
<Box flexDirection="column">
<Text color="#a8a8a8">
{`Open findings · ${length}`}
</Text>
<Box flexDirection="row" columnGap={1} flexWrap="wrap">
<Text color="#e4e4e4">
{`#${id} ${severity}: ${claim}`}
</Text>
<Button label="Fix" variant="primary" />
<Button label="Accept with reason" variant="primary" />
<Button label="Explain" variant="primary" />
</Box>
<Box flexDirection="row" columnGap={1} flexWrap="wrap">
<Text color="#e4e4e4">
{`#${id} ${severity}: ${claim}`}
</Text>
<Button label="Fix" variant="primary" />
<Button label="Accept with reason" variant="primary" />
<Button label="Explain" variant="primary" />
</Box>
<Box flexDirection="row" columnGap={1} flexWrap="wrap">
<Text color="#e4e4e4">
{`#${id} ${severity}: ${claim}`}
</Text>
<Button label="Fix" variant="primary" />
<Button label="Accept with reason" variant="primary" />
<Button label="Explain" variant="primary" />
</Box>
</Box>
<Box flexDirection="column">
<Text color="#a8a8a8">
More actions. Press the number shown.
</Text>
<Box flexDirection="column">
<Button label={`${key} ${label}`} hotkey={`${key}`} variant="primary" />
<Text color="#a8a8a8">
{` ${desc}`}
</Text>
</Box>
<Box flexDirection="column">
<Button label={`${key} ${label}`} hotkey={`${key}`} variant="primary" />
<Text color="#a8a8a8">
{` ${desc}`}
</Text>
</Box>
<Box flexDirection="column">
<Button label={`${key} ${label}`} hotkey={`${key}`} variant="primary" />
<Text color="#a8a8a8">
{` ${desc}`}
</Text>
</Box>
<Box flexDirection="column">
<Button label="0 Fewer actions" hotkey="0" variant="primary" />
<Text color="#a8a8a8">
{" Show or hide the other actions."}
</Text>
</Box>
<Box flexDirection="column">
<Button label="8 Close the game" hotkey="8" variant="primary" />
<Text color="#a8a8a8">
{" A small game for the wait."}
</Text>
</Box>
</Box>
</Box>
)
})
}
Mod 自身のコード
Mod のライセンス(MIT)に従って載せています。全文は下にあります。写すときは著作権表示を残してください。
hooks/temper-mod/register.tsx 1263〜1274 行 · ペイン
on('ui.render', { component: 'Pane', requestId: PANE_ID }, async ($, e, next) => {
const ui = await readUi($).catch(() => null)
if (ui === null || ui.mode !== 'full') return next(e)
return renderPane(
$.ui.resolve(e),
ui.view,
action => runAction($, action, undefined, ui.view.phase).catch(() => undefined),
(kind, id) => runFindingAction($, kind, id).catch(() => undefined),
e.props.placement === 'inline',
{ show: working && gameOffered(), open: gameOpen },
)
})hooks/temper-mod/ui/pane.tsx 25〜152 行 · ペイン
export function renderPane(
kit: Kit,
view: View,
onAction: OnAction,
onFinding: OnFinding,
inline = false,
// The game offer: shown while a phase is working (the game setting is on). Key 8, as in the band.
game: { show: boolean; open: boolean } = { show: false, open: false },
): RenderElement {
const { Box, Text, Button } = kit
const playButton = game.show ? (
<Box key="pane-item-play" flexDirection="column">
<Button
key="pane-play"
label={game.open ? '8 Close the game' : '8 Play while you wait'}
hotkey="8"
variant="primary"
onPress={() => onAction({ key: '1', id: 'play', label: 'Play', desc: 'Play a small game.', command: 'play' })}
/>
<Text color={MUTED}>{' A small game for the wait.'}</Text>
</Box>
) : null
if (view.phase === null) {
return (
<Box flexDirection="column" backgroundColor={CARD_BG}>
<Text bold color={PINK}>{'◈ Temper'}</Text>
<Text color={MUTED}>No Temper run is active. Start one with /temper:temper and a feature description.</Text>
</Box>
)
}
const task = view.task ? ` · task ${view.task.n} of ${view.task.of}` : ''
const timeline = inline ? [] : view.timeline.map((line, i) => `${i + 1}. ${line}`)
// Seated inline above the prompt (a narrow terminal) the pane stays short so the band is not
// pushed off screen: the buttons live in the band there, and a long checklist is cut.
// When the person asks for the full list (key 0), it shows even here.
const a = inline && !view.expanded ? null : view.actions
const criteria = inline ? view.criteria.slice(0, 4) : view.criteria
return (
<Box flexDirection="column" rowGap={1} backgroundColor={CARD_BG}>
<Box flexDirection="column">
<Text bold color={PINK}>{'◈ Temper'}</Text>
<Text color={MUTED}>Intent</Text>
<Text bold color={FG}>{view.title ?? 'Untitled run'}</Text>
</Box>
<Box flexDirection="column">
<Text color={MUTED}>{`Acceptance criteria (what must be true) · ${view.passed} of ${view.total} met`}</Text>
{view.criteria.length === 0 ? <Text color={MUTED}>No criteria found in intent.md.</Text> : null}
{criteria.map(c => (
<Text key={`criterion-${c.id}`} color={c.status === 'passed' ? GREEN : FG}>
{`${c.status === 'passed' ? '✔' : '○'} ${c.text}`}
</Text>
))}
{inline && view.criteria.length > 4 ? <Text color={MUTED}>{`and ${view.criteria.length - 4} more. Open the pane in a wider terminal.`}</Text> : null}
</Box>
<Box flexDirection="column">
<Text color={MUTED}>{`Phase · ${whereText(view)}${task}${view.paused ? ' · paused' : ''}`}</Text>
<Box flexDirection="row" flexWrap="wrap" columnGap={2}>
{view.steps.map(s => (
<Text key={`pane-step-${s.id}`} bold={s.status === 'current'} color={STEP_COLOR[s.status]}>
{`${MARK[s.status]} ${s.label}`}
</Text>
))}
</Box>
{inline ? null : <Text color={MUTED}>{LEGEND}</Text>}
{view.now ? <Text color={FG}>{view.now}</Text> : null}
{view.sync ? <Text color={YELLOW}>{view.sync}</Text> : null}
</Box>
{timeline.length > 0 ? (
<Box key="timeline" flexDirection="column">
<Text color={MUTED}>Timeline, oldest first</Text>
{clip(timeline.join('\n'))
.split('\n')
.map((line, i) => (
<Text key={`timeline-${i}`} color={FG}>{line}</Text>
))}
</Box>
) : null}
{view.findings.length > 0 ? (
<Box flexDirection="column">
<Text color={MUTED}>{`Open findings · ${view.findings.length}`}</Text>
{view.findings.map(f => (
<Box key={`finding-${f.id}`} flexDirection="row" columnGap={1} flexWrap="wrap">
<Text color={FG}>{`#${f.id} ${f.severity}: ${f.claim}`}</Text>
<Button key={`fix-${f.id}`} label="Fix" variant="primary" onPress={() => onFinding('fix', f.id)} />
<Button key={`accept-${f.id}`} label="Accept with reason" variant="primary" onPress={() => onFinding('accept', f.id)} />
<Button key={`explain-${f.id}`} label="Explain" variant="primary" onPress={() => onFinding('explain', f.id)} />
</Box>
))}
</Box>
) : null}
{a ? (
<Box flexDirection="column">
<Text color={MUTED}>{view.expanded && a.more.length > 0 ? MENU_HINT : 'Actions'}</Text>
{/* The menu (key 0) takes the place of the main actions, so no digit is used twice. */}
{(view.expanded && a.more.length > 0 ? a.more : inline ? [] : [...a.primary, a.discuss, ...(a.override ? [a.override] : [])]).map(x => (
<Box key={`pane-item-${x.id}`} flexDirection="column">
<Button key={`pane-${x.id}`} label={`${x.key} ${x.label}`} hotkey={x.key} variant="primary" onPress={() => onAction(x)} />
<Text color={MUTED}>{` ${x.desc}`}</Text>
</Box>
))}
{a.more.length > 0 ? (
<Box key="pane-item-more-actions" flexDirection="column">
<Button
key="pane-more-actions"
label={view.expanded ? '0 Fewer actions' : '0 More actions'}
hotkey="0"
variant="primary"
onPress={() => onAction({ key: '0', id: 'more-actions', label: 'More actions', desc: 'Show or hide the other actions.', command: 'pane-expand' })}
/>
<Text color={MUTED}>{' Show or hide the other actions.'}</Text>
</Box>
) : null}
{view.expanded && a.more.length > 0 ? null : playButton}
</Box>
) : playButton ? (
<Box flexDirection="column">{playButton}</Box>
) : null}
</Box>
)
}ライセンスの全文(MIT)
MIT License Copyright (c) 2025 Gal Naor 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.
コードが呼ぶもの
ファイル読み取りClaude を動かすツール呼び出し保存
コードから読み取ったデザイン
読み取ったコミットのソースから描いたもので、動かした結果ではありません。一覧は 3 回描き、条件はデスクトップアプリで描く最初の分岐を取り、動かしたときにだけ決まる値は仮の例(点線の下線)にするか省きます。色と書体はこのサイトのものです。
コードから読めること
2026-10-06 に読んだコミット c4b892bc6081 のソースから。最初のまとまりが載せる条件で、残りは自分で判断するための材料です。後のコミットは、次に読むまで見ていません。
| 載せる条件: 確かめやすいコード | |
|---|---|
| 入口を読んだ | hooks/hooks.json が名指すモジュールをすべて読んだ。hooks/temper-mod/register.tsx |
| 解析できる | すべてのファイルが TypeScript か JavaScript として解析できる。28 ファイルを解析 |
| コードが 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 galando/temper/plugin install temper@temper入るのはマーケットプレイスの最新のコミットで、ここで読んだもの(c4b892bc6081)と違うことがあります。入れる前に見比べてください。
Claude に聞く
modscode のコネクタを入れると、Claude がこのデザイン・コードが触るもの・コードを読んで、それをもとに作れます。たとえば:
modscode のデザイン「galando-temper」をコードごと読んで、同じようなペインを作って似たデザイン
-
Open a file first: /crit-tui file <path>Reopen this one in the crit browser view.Claude に頼む…
-
Claude に頼む…Agents●●●✻ AgentsEditNo agents yet. They show here while they run.Agent──Fix login────────● build ········━━━━━━━━········2h 10m● build ········━━━━━━━━········2h 10m● build ········━━━━━━━━········2h 10m✗ Grepclick an agent to open it · click "done" to hide finished ones
-
Claude に頼む…Pick a look for builddraw your own with /familiar draw. esc closes●●●●●●●●●clawd 3●●●●●●●●●clawd 3●●●●●●●●●clawd 3
-
Claude に頼む…────────Clear doneClaude⋯└─ buildCancelCancelCancel└─ buildCancelCancelCancel└─ buildCancelCancelCancel
-
何をするか
- 欄・プロンプトの上の帯を描く
- /lingo を足す
- prompt.edit・prompt.submit・session.startにフックする
- ターンをまたいで自分の状態を持つ
-
Claude に頼む…主控台主控台 示範資料 3 個專案2h 10m 更新執行者Opus·預設·預設⋯專案模式 build/console mode console 切回主控台下一步 Opus─ auto build ─ auto build ─ auto buildClaude3./spinner.tsx下一步./spinner.tsx下一步派工鎖定:Bypass./spinner.tsx下一步⇢ 改用 Claude 派工(build)執行者[下一步][下一步][下一步]手動交接:面板不派工(CARD、驗證、關卡照常)Codex 未派工:Claude驗證指令:Codex✓ 最後驗證 Codex(未正常結束)輸出已被執行器截斷,以下是擷取內容GitGitGit