gtm-operator
The GTM operator mod for Claude Code: scores every go-to-market draft with its own skill pack's scorer, flags stale and inconsistent drafts across packs, pack dashboards, a guided sprint, analytics, and a guard that keeps brand-config.json…
何をするか
- プロンプトの上の帯・欄・トーストを描く
- /gtm-board・/gtm-score・/gtm-health・/gtm-sprint を足す
- Write・Edit・mcp__gtm-operator__gtm_status・mcp__gtm-operator__gtm_score の呼び出しを見張る(止めることがある)
- classic.SessionStart・prompt.compose・session.start・turn.completeにフックする
- ターンをまたいで自分の状態を持つ
良いところ
- ネットワークに出ない
- TypeScript で書かれている
- エラーを扱う
- ファイルを書かない
作り始めるためのコード
2 種類あります。上のデザインから modscode が書いた雛形と、その Mod 自身のコードのうち描いている部分です。
雛形(register.tsx)
import type { Register } from 'claude-code'
// Drawn like gtm-operator by Jay Mount Consulting (pane, band, status, toast), as modscode read it from the mod's code:
// https://modscode.com/gallery/cmj-hub-gtm-operator/
// 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 count = '…'
const fixText = '…'
const warnText = '…'
const command = '…'
const why = '…'
return (
<Box flexDirection="column">
<Box flexDirection="row" gap={1}>
<Box flexShrink={0}>
<Text bold>
{count}
</Text>
</Box>
<Box flexShrink={0}>
<Text color="yellow">
{fixText}
</Text>
</Box>
<Box flexShrink={0}>
<Text color="yellow">
{warnText}
</Text>
</Box>
<Box flexShrink={1}>
<Text wrap="truncate-end">
{"Next: "}
<Text bold>
{command}
</Text>
<Text dimColor>
{" — "}
{why}
</Text>
</Text>
</Box>
<Button label="Use" variant="primary" />
<Button label="Run" />
<Button label="Board" />
<Button label="Hide" />
</Box>
{await next(e)}
</Box>
)
})
// the pane: open it with $.ui.open({ id: 'my-pane', title: "GTM board" })
on('ui.render', { component: 'Pane', requestId: 'my-pane' }, async ($, e) => {
const { Box, Button, Text } = $.ui.resolve(e)
const length = '…'
const label = '…'
const title = '…'
const signal = '…'
return (
<Box flexDirection="column">
<Box flexDirection="row" gap={2}>
<Button label="Board" hotkey="1" plain />
<Button label="Detail" hotkey="2" plain />
<Button label={`Health (${length})`} hotkey="3" plain />
<Button label="Views" hotkey="4" plain />
<Button label="Analytics" hotkey="5" plain />
</Box>
<Box flexDirection="row" gap={1}>
<Button label={`[${label}]`} plain />
<Button label={`[${label}]`} plain />
<Button label={`[${label}]`} plain />
</Box>
<Text>
{" "}
</Text>
<Box flexDirection="column">
<Box flexDirection="column">
<Text>
{`Call this week (${length})`}
</Text>
<Text>
{` ${title} — ${signal}`}
</Text>
<Text>
{` ${title} — ${signal}`}
</Text>
<Text>
{` ${title} — ${signal}`}
</Text>
<Text>
{` +${length} more`}
</Text>
</Box>
<Box flexDirection="column">
<Text>
{`Hold (${length})`}
</Text>
<Text>
{` ${title} — ${signal}`}
</Text>
<Text>
{` ${title} — ${signal}`}
</Text>
<Text>
{` ${title} — ${signal}`}
</Text>
<Text>
{` +${length} more`}
</Text>
</Box>
<Box flexDirection="column">
<Text>
{`Drop (${length})`}
</Text>
<Text>
{` ${title} — ${signal}`}
</Text>
<Text>
{` ${title} — ${signal}`}
</Text>
<Text>
{` ${title} — ${signal}`}
</Text>
<Text>
{` +${length} more`}
</Text>
</Box>
<Box flexDirection="column">
<Text>
{`Not scored (${length})`}
</Text>
<Text>
{` ${title} — ${signal}`}
</Text>
<Text>
{` ${title} — ${signal}`}
</Text>
<Text>
{` ${title} — ${signal}`}
</Text>
<Text>
{` +${length} more`}
</Text>
</Box>
</Box>
</Box>
)
})
on('session.start', async ($, e, next) => {
const names = '…'
const name = '…'
const command = '…'
await $.ui.toast(`GTM: ${names} done. Every step is in place.`)
await $.ui.toast(`GTM sprint: ${name} passes. Next: ${command}`)
return next(e)
})
}
Mod 自身のコード
Mod のライセンス(MIT)に従って載せています。全文は下にあります。写すときは著作権表示を残してください。
hooks/register.tsx 1075〜1124 行 · バンド
on('ui.render', { component: 'AbovePrompt' }, async ($, e, next) => {
const found = await read($, board)
if (e.props.hasSurvey || found === null || !found.hasProject || (await read($, isBandHidden))) {
return next(e)
}
const { Box, Button, Text } = $.ui.resolve(e)
const theirs = await next(e)
const step = nextStep(found)
const count = `GTM ${doneCount(found)}/${found.steps.length}`
const failing = failingCount(await read($, scores))
const warnings = (await read($, findings)).length
const fixText = failing > 0 ? `${failing} to fix` : ''
const warnText = warnings > 0 ? `${warnings} warning${warnings === 1 ? '' : 's'}` : ''
// The reason for the next step goes first when the row is short of room,
// as it is beside a docked pane: the labels and buttons never wrap.
const BUTTONS = '[ Use ] [ Run ] [ Board ] [ Hide ]'.length
const fixed = [count, fixText, warnText].filter(one => one !== '').reduce((n, one) => n + one.length + 1, 0) + BUTTONS + 1
const showWhy = step !== undefined &&
fixed + `Next: ${step.command} — ${step.why}`.length <= e.props.bodyColumns
return (
<Box flexDirection="column">
{theirs}
<Box flexDirection="row" gap={1}>
<Box flexShrink={0}><Text bold>{count}</Text></Box>
{fixText !== '' && <Box flexShrink={0}><Text color="yellow">{fixText}</Text></Box>}
{warnText !== '' && <Box flexShrink={0}><Text color="yellow">{warnText}</Text></Box>}
{step === undefined
? <Text dimColor>every step in place</Text>
: (
<Box flexShrink={1}>
<Text wrap="truncate-end">Next: <Text bold>{step.command}</Text>{showWhy && <Text dimColor> — {step.why}</Text>}</Text>
</Box>
)}
{step !== undefined && (
<Button
key="use"
label="Use"
variant="primary"
onPress={() => $.prompt.fill({ text: step.command })}
/>
)}
{step !== undefined && <Button key="run" label="Run" onPress={() => runNext($, step.command)} />}
<Button key="board" label="Board" onPress={() => $.ui.open({ id: PANE, title: 'GTM board' })} />
<Button key="hide" label="Hide" onPress={() => setBandHidden($, true)} />
</Box>
</Box>
)
})hooks/register.tsx 1126〜1285 行 · ペイン
on('ui.render', { component: 'Pane', requestId: PANE }, async ($, e) => {
const { Box, Button, Text } = $.ui.resolve(e)
const found = await read($, board)
const width = Math.max(24, e.props.bodyColumns ?? e.viewport?.columns ?? 60)
if (found === null || !found.hasProject) {
return (
<Box flexDirection="column">
<Text>No GTM project here yet.</Text>
<Text dimColor>Run /gtm:setup to answer the shared questions once.</Text>
</Box>
)
}
const all = await read($, scores)
const past = await read($, history)
const current = await read($, tab)
const health = await read($, findings)
const current_view = await read($, view)
const tabs = (
<Box flexDirection="row" gap={2}>
<Button key="tab-board" label="Board" hotkey="1" plain onPress={() => update($, tab, () => 'board' as Tab)} />
<Button key="tab-detail" label="Detail" hotkey="2" plain onPress={() => update($, tab, () => 'detail' as Tab)} />
<Button key="tab-health" label={`Health${health.length > 0 ? ` (${health.length})` : ''}`} hotkey="3" plain onPress={() => update($, tab, () => 'health' as Tab)} />
<Button key="tab-views" label="Views" hotkey="4" plain onPress={() => loadView($, settings, current_view)} />
<Button key="tab-analytics" label="Analytics" hotkey="5" plain onPress={() => update($, tab, () => 'analytics' as Tab)} />
</Box>
)
if (current === 'analytics') {
const elements = $.ui.resolve(e)
const Input = 'Input' in elements ? elements.Input : undefined
const stats = allStats(past)
const log = await read($, outcomes)
const versions = outcomesByVersion(log)
const resolved = stats.reduce((sum, one) => sum + one.fixesResolved, 0)
return (
<Box flexDirection="column">
{tabs}
<Text> </Text>
<Text bold>{`Score history · ${resolved} fix${resolved === 1 ? '' : 'es'} resolved`}</Text>
{stats.length === 0 && <Text dimColor>No drafts scored yet.</Text>}
{stats.map(one => {
const pack = packById(one.pack)
const range = one.first !== undefined && one.last !== undefined ? `${one.first}→${one.last}` : `${one.samples} run${one.samples === 1 ? '' : 's'}`
const pass = one.draftsToPass === undefined ? 'not passing yet'
: one.draftsToPass === 0 ? 'passed first time'
: `passed after ${one.draftsToPass} failing draft${one.draftsToPass === 1 ? '' : 's'} (${duration(one.timeToPass ?? 0)})`
return <Text>{cut(`${(pack?.name ?? one.pack).padEnd(20)} ${sparkline(past[one.pack] ?? [], 10).padEnd(10)} ${range} · ${pass}`, width)}</Text>
})}
<Text> </Text>
<Text bold>Outcomes (log weekly; tied to the live cold email)</Text>
{versions.length === 0 && <Text dimColor>{cut('Nothing logged. The packs never read your CRM: log replies and meetings here, or /gtm-outcomes import <file.csv>.', width)}</Text>}
{versions.map(row => (
<Text>{cut(`${row.version === 'imported' ? 'imported from CSV' : `letter ${row.version}`}${row.score !== undefined ? ` (scored ${row.score})` : ''}: ${countOf(row.replies, 'reply', 'replies')} · ${countOf(row.meetings, 'meeting', 'meetings')}`, width)}</Text>
))}
{Input !== undefined && (
<Input key="outcome-replies" label="Replies this week" placeholder="a number" value="" submitLabel="log" onSubmit={(value: string) => logOutcome($, 'replies', value)} />
)}
{Input !== undefined && (
<Input key="outcome-meetings" label="Meetings this week" placeholder="a number" value="" submitLabel="log" onSubmit={(value: string) => logOutcome($, 'meetings', value)} />
)}
{Input === undefined && <Text dimColor>Log outcomes from the terminal or the Desktop app.</Text>}
<Text> </Text>
<Button key="digest" label="Copy weekly digest" onPress={async press => {
const copied = await $.ui.copy({ text: await weeklyDigest($), surface: press.surface })
$.ui.toast(copied.isCopied ? 'GTM: weekly digest copied.' : 'GTM: could not copy here; run /gtm-digest instead.')
}} />
</Box>
)
}
if (current === 'health') {
const kindLabel = { stale: 'Stale', consistency: 'Mismatch', coverage: 'Gap' } as const
return (
<Box flexDirection="column">
{tabs}
<Text> </Text>
<Text bold>Cross-pack checks</Text>
<Text dimColor>{cut('Heuristics across packs. Warnings only; nothing is blocked.', width)}</Text>
<Text> </Text>
{health.length === 0 && <Text>No stale drafts, no disagreements, no missing buyers.</Text>}
{health.map(one => (
<Box flexDirection="column">
<Text color="yellow">{cut(`${kindLabel[one.kind]}: ${one.message}`, width * 2)}</Text>
{one.fix && (
<Button key={`finding-${one.id}`} label="Fix with Claude" onPress={() => $.prompt.fill({ text: one.fix ?? '' })} />
)}
</Box>
))}
</Box>
)
}
if (current === 'views') {
const viewTabs = (
<Box flexDirection="row" gap={1}>
{([['pricing', 'Pricing'], ['prospects', 'Prospects'], ['cold-email', 'Cold email'], ['evp', 'EVP'], ['geo', 'GEO'], ['founder', 'Founder']] as const)
.map(([id, label]) => (
<Button key={`view-${id}`} label={id === current_view ? `[${label}]` : label} plain onPress={() => loadView($, settings, id)} />
))}
</Box>
)
return (
<Box flexDirection="column">
{tabs}
{viewTabs}
<Text> </Text>
{await drawView($, e, settings, current_view, width)}
</Box>
)
}
if (current === 'detail') {
const id = await read($, selected)
const pack = packById(id) ?? PACKS[0]!
const score = all[pack.id]
const samples = past[pack.id] ?? []
const change = trend(samples)
const index = PACKS.indexOf(pack)
const prev = PACKS[(index + PACKS.length - 1) % PACKS.length]!
const nextPack = PACKS[(index + 1) % PACKS.length]!
const items = score === undefined ? [] : score.fixes.length > 0 ? score.fixes : score.reasons
return (
<Box flexDirection="column">
{tabs}
<Text> </Text>
<Text bold>{cut(`${pack.step}. ${pack.name} ${scoreLabel(score) || 'not scored'}`, width)}</Text>
{score?.verdict && <Text dimColor>{cut(score.verdict, width)}</Text>}
{samples.length > 1 && (
<Text>{cut(`Trend ${sparkline(samples, Math.min(24, width - 16))}${change !== undefined ? ` ${change >= 0 ? '+' : ''}${change}` : ''}`, width)}</Text>
)}
{score?.status === 'missing' && <Text dimColor>{cut(`No draft yet. Run ${pack.command}.`, width)}</Text>}
{score?.status === 'unknown' && <Text color="yellow">{cut(score.detail ?? 'Not scored.', width)}</Text>}
{(score?.axes.length ?? 0) > 0 && <Text> </Text>}
{score?.axes.map(axis => (
<Text>{cut(`${axis.name.padEnd(12)} ${bar(axis.score, axis.max, 10)} ${axis.score}/${axis.max}`, width)}</Text>
))}
{items.length > 0 && <Text> </Text>}
{items.length > 0 && <Text bold>{score?.fixes.length ? 'Fixes' : 'Reasons'}</Text>}
{items.slice(0, 8).map(line => <Text>{cut(`- ${line}`, width)}</Text>)}
{(score?.voice?.length ?? 0) > 0 && (
<Text color="yellow">{cut(`Refused phrases from SOUL.md: ${score?.voice?.join(', ')}`, width)}</Text>
)}
{score?.excerpt && <Text> </Text>}
{score?.excerpt?.split('\n').filter(line => line.trim() !== '').slice(0, 8).map(line => <Text dimColor>{cut(line.replace(/\s+/g, ' '), width)}</Text>)}
<Text> </Text>
<Box flexDirection="row" gap={1}>
<Button key="prev" label={`← ${prev.name}`} onPress={() => update($, selected, () => prev.id)} />
<Button key="next-pack" label={`${nextPack.name} →`} onPress={() => update($, selected, () => nextPack.id)} />
</Box>
<Box flexDirection="row" gap={1}>
{score !== undefined && (score.status === 'fail' || (score.voice?.length ?? 0) > 0) && (
<Button
key="fix"
label="Fix with Claude"
variant="primary"
onPress={() => $.prompt.fill({
text: fixPrompt(pack.command, {hooks/register.tsx 625〜750 行 · ペイン
async function drawView($: $, e: RenderEvent, settings: Settings, id: ViewId, width: number) {
const { Box, Button, Text } = $.ui.resolve(e)
const runs = await read($, toolRuns)
const root = await projectRoot($)
const config = parseConfig(await readText($, `${root}/${CONFIG}`).catch(() => undefined)) ?? {}
const now = await $.clock.now()
const line = (text: string, props: { bold?: boolean; dimColor?: boolean; color?: string } = {}) =>
<Text {...props}>{cut(text, width)}</Text>
const empty = (text: string) => <Box flexDirection="column">{line(text, { dimColor: true })}</Box>
if (id === 'pricing') {
const priceView = pricingView(runs.waterfall?.stdout, runs.decoy?.stdout, await draftFile($, 'gtm/price.json'))
if (priceView.customers.length === 0 && priceView.checks.length === 0 && priceView.contrastSet.length === 0) {
return empty('No pricing data yet. /pricing:pricing writes gtm/price.json; the waterfall reads gtm/waterfall.csv, the decoy check gtm/tiers.json.')
}
const barWidth = Math.max(8, Math.min(30, width - 40))
return (
<Box flexDirection="column">
{priceView.valueMetric !== '' && line(`Value metric: ${priceView.valueMetric}`)}
{priceView.contrastSet.length > 0 && line(`Contrast set: ${priceView.contrastSet.join(' · ')}`)}
{priceView.customers.length > 0 && <Text> </Text>}
{priceView.customers.length > 0 && line(`Pocket-price waterfall: ${money(priceView.totalPocket)} kept of ${money(priceView.totalList)} list`, { bold: true })}
{priceView.customers.map(one => line(`${one.id.padEnd(10)} ${shareBar(one.pocket, Math.max(one.list, one.pocket), barWidth)} ${money(one.pocket)} of ${money(one.list)} (${leakLabel(one.leakPct)})`))}
{priceView.byStep.length > 0 && line(`Biggest leaks: ${priceView.byStep.slice(0, 3).map(step => `${step.name} ${money(step.leak)}`).join(', ')}`, { color: 'yellow' })}
{priceView.checks.length > 0 && <Text> </Text>}
{priceView.checks.length > 0 && line(`Tier contrast check${priceView.tiersScore !== undefined ? `: ${priceView.tiersScore}/100` : ''}`, { bold: true })}
{priceView.checks.map(check => line(`${check.passed ? '✓' : '✗'} ${check.rule}: ${check.detail}`, check.passed ? { dimColor: true } : { color: 'yellow' }))}
</Box>
)
}
if (id === 'prospects') {
const board = prospectBoard(await draftFile($, 'gtm/list.json'))
const total = board.call.length + board.hold.length + board.drop.length + board.unscored.length
if (total === 0) return empty('No prospects yet. Run /prospect-list:who-to-contact.')
const column = (title: string, items: { title: string; signal: string }[], color?: string) => (
<Box flexDirection="column">
{line(`${title} (${items.length})`, { bold: true, ...(color ? { color } : {}) })}
{items.slice(0, 8).map(one => line(` ${one.title}${one.signal ? ` — ${one.signal}` : ''}`))}
{items.length > 8 && line(` +${items.length - 8} more`, { dimColor: true })}
</Box>
)
return (
<Box flexDirection="column">
{column('Call this week', board.call, 'green')}
{column('Hold', board.hold)}
{column('Drop', board.drop, 'gray')}
{board.unscored.length > 0 && column('Not scored', board.unscored, 'yellow')}
</Box>
)
}
if (id === 'cold-email') {
const mail = coldEmailView({
letter: await draftFile($, 'gtm/letter.json'),
config,
...(runs.spam ? { spam: runs.spam.stdout } : {}),
...(runs.subject ? { subject: runs.subject.stdout } : {}),
...(runs.replies ? { replies: runs.replies.stdout } : {}),
...(runs.deliverability ? { deliverability: runs.deliverability } : {}),
now,
})
const replyKinds = Object.entries(mail.replies)
return (
<Box flexDirection="column">
{mail.words === 0 ? line('No first touch yet. Run /cold-email:cold-email.', { dimColor: true }) : line(`First touch: ${mail.words} words${mail.subject ? ` · subject "${mail.subject}"` : ''}`, { bold: true })}
{mail.signal !== '' && line(`Signal: ${mail.signal}`)}
{mail.spamScore !== undefined && line(`Spam lint: ${mail.spamScore}/100 ${mail.spamVerdict}`, mail.spamScore >= 75 ? {} : { color: 'yellow' })}
{mail.subjectScore !== undefined && line(`Subject line: ${mail.subjectScore}/100`, mail.subjectScore >= 70 ? {} : { color: 'yellow' })}
<Text> </Text>
{line(`Rhythm: ${mail.rhythm.map(day => (day.isSendDay ? (day.isToday ? `[${day.day}]` : day.day) : day.isToday ? `(${day.day.toLowerCase()})` : '·')).join(' ')}`)}
{replyKinds.length > 0 && line(`Replies: ${replyKinds.map(([kind, count]) => `${kind} ${count}`).join(' · ')}`)}
<Text> </Text>
{line(`Deliverability${mail.domain ? ` for ${mail.domain}` : ''}`, { bold: true })}
{mail.domain === '' && line('No sending domain in brand-config.infrastructure. /cold-email:cold-email setup asks for it.', { dimColor: true })}
{mail.deliverability?.lines.slice(0, 15).map(one => line(one, one.startsWith('✗') ? { color: 'yellow' } : {}))}
{mail.domain !== '' && (
<Button key="deliverability" label="Check deliverability (DNS, needs dig)" onPress={() => loadView($, settings, 'cold-email', true)} />
)}
</Box>
)
}
if (id === 'evp') {
const ladder = evpLadder(config)
if (ladder.primary === '' && ladder.rungs.every(rung => rung.lines.length === 0)) return empty('No value line yet. Run /evp:evp.')
return (
<Box flexDirection="column">
{line('Awareness ladder (Schwartz): one line per reader', { bold: true })}
{ladder.rungs.map(rung => (
<Box flexDirection="column">
{line(`${rung.isChosen ? '▸' : ' '} ${rung.tier}. ${rung.name}${rung.isChosen ? ' (outreach line)' : ''}`, rung.isChosen ? { bold: true, color: 'cyan' } : { dimColor: rung.lines.length === 0 })}
{rung.lines.slice(0, 2).map(text => line(` ${text}`))}
</Box>
))}
</Box>
)
}
if (id === 'geo') {
const geo = geoView(await draftFile($, 'gtm/findability.json'), now)
if (geo === undefined) return empty('No findability record yet. Run /geo:geo.')
return (
<Box flexDirection="column">
{geo.question !== '' && line(`Buyer question: ${geo.question}`, { bold: true })}
{geo.killDate !== '' && line(`Kill date ${geo.killDate}${geo.daysLeft !== undefined ? ` · ${geo.daysLeft >= 0 ? `${geo.daysLeft} days left` : `${-geo.daysLeft} days past: review now (/geo:geo review)`}` : ''}`, geo.daysLeft !== undefined && geo.daysLeft < 0 ? { color: 'yellow' } : {})}
{geo.isIndexable !== undefined && line(`Indexable: ${geo.isIndexable ? 'yes' : 'no'}`, geo.isIndexable ? {} : { color: 'yellow' })}
{geo.blockedBots.length > 0 && line(`Blocked crawlers: ${geo.blockedBots.join(', ')}`, { color: 'yellow' })}
{geo.engines.length > 0 && <Text> </Text>}
{geo.engines.length > 0 && line('Citations by engine', { bold: true })}
{geo.engines.map(one => line(`${one.engine.padEnd(22)} brand ${one.status || 'unknown'} · ${one.cited} cited URL${one.cited === 1 ? '' : 's'}`))}
</Box>
)
}
const entries = await $.fs.list(`${root}/drafts`).catch(() => [])
const founder = founderView(entries.filter(one => one.kind === 'file'), now)
return (
<Box flexDirection="column">
{line(founder.daysSinceLast === undefined ? 'No posts in drafts/ yet. Run /founder-brand:founder-brand.' : `Last post ${founder.daysSinceLast} day${founder.daysSinceLast === 1 ? '' : 's'} ago · ${founder.postsLast28} in the last 28 days`, founder.isLate ? { color: 'yellow', bold: true } : { bold: true })}
{founder.isLate && founder.daysSinceLast !== undefined && line('Over 7 days since the last post: the rotation has stalled.', { color: 'yellow' })}
<Text> </Text>
{founder.pillars.map(one => line(`${one.pillar.padEnd(8)} ${one.count} post${one.count === 1 ? '' : 's'}${one.lastDaysAgo !== undefined ? ` · last ${one.lastDaysAgo}d ago` : ' · none yet'}`, one.count === 0 ? { dimColor: true } : {}))}
</Box>
)
}ライセンスの全文(MIT)
MIT License Copyright (c) 2026 Jay Mount Consulting 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 に読んだコミット bee9bae32b57 のソースから。最初のまとまりが載せる条件で、残りは自分で判断するための材料です。後のコミットは、次に読むまで見ていません。
| 載せる条件: 確かめやすいコード | |
|---|---|
| 入口を読んだ | hooks/hooks.json が名指すモジュールをすべて読んだ。hooks/register.tsx |
| 解析できる | すべてのファイルが TypeScript か JavaScript として解析できる。10 ファイルを解析 |
| コードが 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 のホスト)がコードに書いてあるか。通信なし |
| プログラム | 起動するプログラムの名前がコードに書いてあり、シェル・インタプリタ・通信用の道具でないか。hooks/register.tsx:325 実行時に決まるプログラム |
| 読んで送る | ファイルや環境変数を読み、かつ通信するか。通信しない |
| ソースの鍵 | ソースに API キーや秘密鍵らしきものがあるか。ソースに鍵なし |
| ライセンス | オープンなライセンス(MIT・Apache-2.0・BSD・ISC・Unlicense・0BSD・CC0)で全文があれば、modscode にコードを載せる。違えばリンクだけ。MIT |
コードの文面を読んだだけで、安全の審査ではありません。動かしてはおらず、起動するプログラムの中で何が起きるかも見えません。入れる前の確認はあなたの役目です。 載せる条件
入れる
入れる前に、必ず自分で確かめてください。Mod はサンドボックスなしで、あなたの権限で動きます。modscode はこのコードの安全を保証しません。下のコードを読み(またはフォルダーで claude plugin validate .)、触るものを見て、読んだコミットを入れてください。
リポジトリがそのままマーケットプレイスです。このマーケットプレイスを足し(ターミナルでは次のコマンド、デスクトップアプリではプラグインの設定)、そこから Mod を入れます。
/plugin marketplace add cmj-hub/gtm-operator-claude-mod/plugin install gtm-operator@gtm-operator-claude-mod入るのはマーケットプレイスの最新のコミットで、ここで読んだもの(bee9bae32b57)と違うことがあります。入れる前に見比べてください。
Claude に聞く
modscode のコネクタを入れると、Claude がこのデザイン・コードが触るもの・コードを読んで、それをもとに作れます。たとえば:
modscode のデザイン「cmj-hub-gtm-operator」をコードごと読んで、同じようなペインを作って似たデザイン
-
Claude に頼む…2h 10m · █████░░░✓ build ✓ build ✓ buildJavaKotlin3 Python■ ok 3 ■ ok 3 ■ ok 3 Razor proven 3 Razor proven 3 Razor proven 3Phases ──────── 3/3build Pythonbuild Pythonbuild Python… 3 more phasesLua ──────── 3/Kotlin■ the whole upgrade Ruby■ build build Ruby■ build build Ruby■ build build Ruby … 3 moreNext ──────── PythonRuby (by hand)Podsclick a button, or ctrl+x tab then Tab, EnterAttention ──────── 3! Scala ! Scala ! Scala … 3 moreSession ──────── okJava
-
Claude に頼む…agent-discoverbuildbuildbuildRefreshMCP Browse/3Tab / shift+Tab move · Enter presses · ↑↓ scroll · Esc back to the promptBrowse...Audit asks:DeclineAcceptDeclineCancelAudit asks:DeclineAcceptDeclineCancelAudit asks:DeclineAcceptDeclineCancel
-
Claude に頼む…────────Clear doneClaude⋯└─ buildCancelCancelCancel└─ buildCancelCancelCancel└─ buildCancelCancelCancel
-
Claude に頼む…AgentsNo subagents yetmain: 3 3 · 2h 10m ago────────Each subagent shows here the moment it starts, with what it is doing now.›● 3 build build 3›● 3 build build 3›● 3 build build 3buildAgentsbuild1-9 picks an agent · Tab walks the controls · Esc gives the keyboard back14:32 3 314:32 3 314:32 3 3No tool calls yet.Answer: StopMessage this agent… SendStopBack b
-
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
-
Claude に頼む…no-limitTurn offauto-resume onUsageNo readings yet: they arrive with the next reply.5-hourCancelWeekly42%2h 10m5-hourCancelWeekly42%2h 10m5-hourCancelWeekly42%2h 10mbuild hit. Napping until it resets.Retry 3 of 3: the last resume hit the limit again.█████░░░█████░░░resuming in 2h 10mResume prompt (default)The usage limit has reset. Carry on with the task you were working on when the limit stopped you. If it was already fin…Type a new resume prompt, Enter to save (empty: default) SaveHistoryNo resumes yet.✓ 2h 10m after the build, waited 2h 10m✓ 2h 10m after the build, waited 2h 10m✓ 2h 10m after the build, waited 2h 10mResume now rCancel cTurn off oTest (1 min) t