helm
The control panel for Claude Code: it sets up each project with the right skills and tools, shows what is in use, and vets new tools before you add them.
What it does
- Draws a band above the prompt, a pane
- Adds /helm
- Watches Skill calls
- Hooks prompt.submit, session.start, turn.complete, ui.message
- Keeps its own state between turns
Good points
- No network calls
- Written in TypeScript
- Has a desktop-specific branch
- Handles errors
Code to start from
Two kinds: a starter modscode writes from the design above, and the lines of the mod's own code that draw it.
Starter (register.tsx)
import type { Register } from 'claude-code'
// Drawn like helm by rlpb (pane, band), as modscode read it from the mod's code:
// https://modscode.com/gallery/rlpb-helm/
// 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 name = '…'
const active = '…'
const length = '…'
const label = '…'
const clamp = '…'
const label2 = '…'
const label3 = '…'
const t = '…'
const done = '…'
const total = '…'
const litName = '…'
return (
<Box flexDirection="column">
<Box justifyContent="space-between">
<Box columnGap={2}>
<Box columnGap={1}>
<Text bold color="claude">
⎈
</Text>
<Text dimColor>
{`${name} · ${active}/${length}`}
</Text>
</Box>
<Box columnGap={1}>
<Text dimColor>
{label}
</Text>
<Text bold>
{`${clamp}%`}
</Text>
</Box>
<Box columnGap={1}>
<Text dimColor>
{label2}
</Text>
<Text bold>
{`${clamp}%`}
</Text>
</Box>
<Box columnGap={1}>
<Text dimColor>
{label3}
</Text>
<Text bold>
{`${clamp}%`}
</Text>
</Box>
<Box>
<Text>
●
</Text>
<Button label={`${t} ${done}/${total}`} plain />
</Box>
<Text>
{`● ${litName}`}
</Text>
</Box>
<Button label={`${t}`} />
</Box>
{await next(e)}
</Box>
)
})
// the pane: open it with $.ui.open({ id: 'my-pane', title: "Helm" })
on('ui.render', { component: 'Pane', requestId: 'my-pane' }, async ($, e) => {
const { Box, Text, Button, Client } = $.ui.resolve(e)
const name = '…'
const label = '…'
const topLine = '…'
const text = '…'
const T = '…'
const repo = '…'
const stars = '…'
const description = '…'
const mark = '…'
const license = '…'
const note = '…'
const mark2 = '…'
const label2 = '…'
const mark3 = '…'
const label3 = '…'
const length = '…'
const sev = '…'
const pattern = '…'
const where = '…'
const text2 = '…'
const text3 = '…'
const issueText = '…'
const issueText2 = '…'
const issueText3 = '…'
const text4 = '…'
const ago = '…'
const text5 = '…'
const score = '…'
const map = '…'
const text6 = '…'
const name2 = '…'
const n = '…'
const name3 = '…'
const name4 = '…'
const text7 = '…'
const repo2 = '…'
const repo3 = '…'
const repo4 = '…'
const text8 = '…'
const value = '…'
const total = '…'
const name5 = '…'
const name6 = '…'
const name7 = '…'
const name8 = '…'
const name9 = '…'
const name10 = '…'
const name11 = '…'
const name12 = '…'
const name13 = '…'
return (
<Box flexDirection="column">
<Box flexDirection="column">
<Box justifyContent="space-between">
<Text bold>
{name}
</Text>
<Text dimColor>
head.reading
</Text>
</Box>
<Box marginTop={1} columnGap={1}>
<Button label={`${label}`} variant="primary" />
<Button label={`${label}`} variant="primary" />
</Box>
<Text dimColor>
────────
</Text>
<Box marginTop={1}>
<Text color="error">
{`✗ ${topLine}`}
</Text>
</Box>
</Box>
<Box flexDirection="column">
<Box flexDirection="column" marginTop={1} borderStyle="round" borderColor="#f2b84b" paddingX={1}>
<Box flexDirection="column">
<Text bold>
{text}
</Text>
<Text dimColor>
find.about
</Text>
<Box flexDirection="column" marginTop={1}>
<Client module="./editor.tsx" width="100%" />
<Box marginTop={1} columnGap={1}>
<Button label={`${T}`} variant="primary" />
<Button label={`${T}`} plain />
</Box>
</Box>
<Box flexDirection="column" marginTop={1}>
<Box columnGap={1}>
<Button label={`${repo}`} />
<Text dimColor wrap="truncate-end">
{`${stars}★ ${description}`}
</Text>
</Box>
<Box columnGap={1}>
<Button label={`${repo}`} />
<Text dimColor wrap="truncate-end">
{`${stars}★ ${description}`}
</Text>
</Box>
<Box columnGap={1}>
<Button label={`${repo}`} />
<Text dimColor wrap="truncate-end">
{`${stars}★ ${description}`}
</Text>
</Box>
</Box>
<Box flexDirection="column" marginTop={1}>
<Text bold>
batch.title
</Text>
<Box flexDirection="column" marginTop={1}>
<Box columnGap={1}>
<Text>
{mark}
</Text>
<Text bold>
{label}
</Text>
<Text dimColor>
{`${license} · ${stars}★`}
</Text>
</Box>
<Text dimColor wrap="truncate-end">
{` ${note}`}
</Text>
</Box>
<Box flexDirection="column" marginTop={1}>
<Box columnGap={1}>
<Text>
{mark2}
</Text>
<Text bold>
{label2}
</Text>
<Text dimColor>
{`${license} · ${stars}★`}
</Text>
</Box>
<Text dimColor wrap="truncate-end">
{` ${note}`}
</Text>
</Box>
<Box flexDirection="column" marginTop={1}>
<Box columnGap={1}>
<Text>
{mark3}
</Text>
<Text bold>
{label3}
</Text>
<Text dimColor>
{`${license} · ${stars}★`}
</Text>
</Box>
<Text dimColor wrap="truncate-end">
{` ${note}`}
</Text>
</Box>
<Box marginTop={1} columnGap={1}>
<Button label={`${T} · ${length}`} variant="primary" />
<Button label={`${T}`} plain />
</Box>
</Box>
<Box flexDirection="column" marginTop={1} borderStyle="round" paddingX={1}>
<Box columnGap={1}>
<Text bold>
{repo}
</Text>
<Text dimColor>
{`${license} · ${stars}★`}
</Text>
</Box>
<Text bold>
verdict.ok
</Text>
<Text dimColor>
{`· ${T}`}
</Text>
<Text dimColor>
{`· ${T}`}
</Text>
<Text dimColor>
{`· ${T}`}
</Text>
<Text dimColor wrap="truncate-end">
{` ${sev} · ${pattern} · ${where}`}
</Text>
<Text dimColor wrap="truncate-end">
{` ${sev} · ${pattern} · ${where}`}
</Text>
<Text dimColor wrap="truncate-end">
{` ${sev} · ${pattern} · ${where}`}
</Text>
<Box marginTop={1}>
<Button label={`${T}`} />
</Box>
<Box marginTop={1}>
<Button label={`${T}`} />
</Box>
<Box marginTop={1}>
<Button label={`${T}`} variant="primary" />
</Box>
</Box>
</Box>
</Box>
<Box flexDirection="column" marginTop={1} borderStyle="round" paddingX={1}>
<Box flexDirection="column">
<Box justifyContent="space-between">
<Text bold>
{text2}
</Text>
<Text bold color="success">
{`✓ ${T}`}
</Text>
</Box>
<Box flexDirection="row" flexWrap="wrap" columnGap={1} rowGap={1} marginTop={1}>
<Box flexDirection="column" borderStyle="round" paddingX={1} flexGrow={1}>
<Box flexDirection="column">
<Text bold>
{text3}
</Text>
<Text dimColor>
g.unchecked
</Text>
<Box flexDirection="column" marginTop={1}>
<Text>
{issueText}
</Text>
<Button label={`${T}`} />
<Button label={`${T}`} />
</Box>
<Box flexDirection="column" marginTop={1}>
<Text>
{issueText2}
</Text>
<Button label={`${T}`} />
<Button label={`${T}`} />
</Box>
<Box flexDirection="column" marginTop={1}>
<Text>
{issueText3}
</Text>
<Button label={`${T}`} />
<Button label={`${T}`} />
</Box>
<Text dimColor>
g.more
</Text>
<Box flexGrow={1} />
<Box marginTop={1}>
<Button label={`${T}`} />
</Box>
</Box>
</Box>
<Box flexDirection="column" borderStyle="round" paddingX={1} flexGrow={1}>
<Box flexDirection="column">
<Text bold>
{text4}
</Text>
<Text dimColor>
g.updatesText
</Text>
<Text color="success" bold>
{`✓ ${T}`}
</Text>
<Text color="warning" bold>
{`▲ ${T}`}
</Text>
<Text dimColor>
up.updated
</Text>
<Text dimColor wrap="truncate-end">
{`${name}: ${note}`}
</Text>
<Text dimColor wrap="truncate-end">
{`${name}: ${note}`}
</Text>
<Text dimColor wrap="truncate-end">
{`${name}: ${note}`}
</Text>
<Text dimColor>
up.manual
</Text>
<Text dimColor>
{ago}
</Text>
<Box flexGrow={1} />
<Box marginTop={1}>
<Button label={`${T}`} />
</Box>
</Box>
</Box>
<Box flexDirection="column" borderStyle="round" paddingX={1} flexGrow={1}>
<Box flexDirection="column">
<Text bold>
{text5}
</Text>
<Text dimColor>
sec.missing
</Text>
<Text dimColor>
sec.ready
</Text>
<Text color="suggestion">
sec.running
</Text>
<Text color="success" bold>
{`✓ ${T}`}
</Text>
<Text color="error" bold>
{`▲ ${T}`}
</Text>
<Box flexDirection="column" marginTop={1}>
<Text>
{`${name} · ${score}/100`}
</Text>
<Text dimColor wrap="truncate-end">
{`${pattern} · ${where}`}
</Text>
<Button label={`${T}`} />
</Box>
<Box flexDirection="column" marginTop={1}>
<Text>
{`${name} · ${score}/100`}
</Text>
<Text dimColor wrap="truncate-end">
{`${pattern} · ${where}`}
</Text>
<Button label={`${T}`} />
</Box>
<Box flexDirection="column" marginTop={1}>
<Text>
{`${name} · ${score}/100`}
</Text>
<Text dimColor wrap="truncate-end">
{`${pattern} · ${where}`}
</Text>
<Button label={`${T}`} />
</Box>
<Box flexDirection="column" marginTop={1}>
<Text color="warning" bold>
{`▲ ${T}`}
</Text>
<Text dimColor wrap="truncate-end">
{map}
</Text>
</Box>
<Box flexGrow={1} />
<Box marginTop={1}>
<Button label={`${T}`} />
</Box>
</Box>
</Box>
</Box>
</Box>
</Box>
<Box flexDirection="column" marginTop={1} borderStyle="round" borderColor="#b28cff" paddingX={1}>
<Box flexDirection="column">
<Text bold>
{text6}
</Text>
<Text dimColor>
g.nothingUsed
</Text>
<Box flexDirection="row" flexWrap="wrap" columnGap={3}>
<Box columnGap={1}>
<Text>
●
</Text>
<Text bold>
{name2}
</Text>
<Text dimColor>
{`×${n} · ${ago}`}
</Text>
</Box>
<Box columnGap={1}>
<Text>
●
</Text>
<Text bold>
{name3}
</Text>
<Text dimColor>
{`×${n} · ${ago}`}
</Text>
</Box>
<Box columnGap={1}>
<Text>
●
</Text>
<Text bold>
{name4}
</Text>
<Text dimColor>
{`×${n} · ${ago}`}
</Text>
</Box>
</Box>
<Text dimColor>
g.never
</Text>
<Box flexDirection="column" marginTop={1}>
<Text bold>
{text7}
</Text>
<Box columnGap={1}>
<Text>
{repo2}
</Text>
<Button label={`${T}`} />
</Box>
<Box columnGap={1}>
<Text>
{repo3}
</Text>
<Button label={`${T}`} />
</Box>
<Box columnGap={1}>
<Text>
{repo4}
</Text>
<Button label={`${T}`} />
</Box>
</Box>
</Box>
</Box>
<Box flexDirection="column" marginTop={1} borderStyle="round" borderColor="#5aa9ff" paddingX={1}>
<Box flexDirection="column">
<Box justifyContent="space-between">
<Text bold>
{text8}
</Text>
<Button label={`${T}`} plain />
</Box>
<Box flexDirection="column" marginTop={1}>
<Box columnGap={1}>
<Text>
●
</Text>
<Button label={`▾ ${T}`} plain />
<Text dimColor>
{`${value}/${total}`}
</Text>
</Box>
<Box flexDirection="column" paddingLeft={3}>
<Box flexDirection="row" flexWrap="wrap" columnGap={1}>
<Box columnGap={0}>
<Text color="inactive">
●
</Text>
<Button label={`▸ ${name}`} plain />
</Box>
<Box columnGap={0}>
<Text color="inactive">
●
</Text>
<Button label={`▸ ${name}`} plain />
</Box>
<Box columnGap={0}>
<Text color="inactive">
●
</Text>
<Button label={`▸ ${name}`} plain />
</Box>
</Box>
<Box flexDirection="column" marginTop={1} borderStyle="round" paddingX={1}>
<Text bold>
{name5}
</Text>
<Text dimColor>
{`${T} · ${T} · ${T} · ${T}`}
</Text>
<Text>
—
</Text>
</Box>
<Box flexDirection="column" marginTop={1} borderStyle="round" paddingX={1}>
<Text bold>
{name6}
</Text>
<Text dimColor>
{`${T} · ${T} · ${T} · ${T}`}
</Text>
<Text>
—
</Text>
</Box>
<Box flexDirection="column" marginTop={1} borderStyle="round" paddingX={1}>
<Text bold>
{name7}
</Text>
<Text dimColor>
{`${T} · ${T} · ${T} · ${T}`}
</Text>
<Text>
—
</Text>
</Box>
</Box>
</Box>
<Box flexDirection="column" marginTop={1}>
<Box columnGap={1}>
<Text>
●
</Text>
<Button label={`▾ ${T}`} plain />
<Text dimColor>
{`${value}/${total}`}
</Text>
</Box>
<Box flexDirection="column" paddingLeft={3}>
<Box flexDirection="row" flexWrap="wrap" columnGap={1}>
<Box columnGap={0}>
<Text color="inactive">
●
</Text>
<Button label={`▸ ${name}`} plain />
</Box>
<Box columnGap={0}>
<Text color="inactive">
●
</Text>
<Button label={`▸ ${name}`} plain />
</Box>
<Box columnGap={0}>
<Text color="inactive">
●
</Text>
<Button label={`▸ ${name}`} plain />
</Box>
</Box>
<Box flexDirection="column" marginTop={1} borderStyle="round" paddingX={1}>
<Text bold>
{name8}
</Text>
<Text dimColor>
{`${T} · ${T} · ${T} · ${T}`}
</Text>
<Text>
—
</Text>
</Box>
<Box flexDirection="column" marginTop={1} borderStyle="round" paddingX={1}>
<Text bold>
{name9}
</Text>
<Text dimColor>
{`${T} · ${T} · ${T} · ${T}`}
</Text>
<Text>
—
</Text>
</Box>
<Box flexDirection="column" marginTop={1} borderStyle="round" paddingX={1}>
<Text bold>
{name10}
</Text>
<Text dimColor>
{`${T} · ${T} · ${T} · ${T}`}
</Text>
<Text>
—
</Text>
</Box>
</Box>
</Box>
<Box flexDirection="column" marginTop={1}>
<Box columnGap={1}>
<Text>
●
</Text>
<Button label={`▾ ${T}`} plain />
<Text dimColor>
{`${value}/${total}`}
</Text>
</Box>
<Box flexDirection="column" paddingLeft={3}>
<Box flexDirection="row" flexWrap="wrap" columnGap={1}>
<Box columnGap={0}>
<Text color="inactive">
●
</Text>
<Button label={`▸ ${name}`} plain />
</Box>
<Box columnGap={0}>
<Text color="inactive">
●
</Text>
<Button label={`▸ ${name}`} plain />
</Box>
<Box columnGap={0}>
<Text color="inactive">
●
</Text>
<Button label={`▸ ${name}`} plain />
</Box>
</Box>
<Box flexDirection="column" marginTop={1} borderStyle="round" paddingX={1}>
<Text bold>
{name11}
</Text>
<Text dimColor>
{`${T} · ${T} · ${T} · ${T}`}
</Text>
<Text>
—
</Text>
</Box>
<Box flexDirection="column" marginTop={1} borderStyle="round" paddingX={1}>
<Text bold>
{name12}
</Text>
<Text dimColor>
{`${T} · ${T} · ${T} · ${T}`}
</Text>
<Text>
—
</Text>
</Box>
<Box flexDirection="column" marginTop={1} borderStyle="round" paddingX={1}>
<Text bold>
{name13}
</Text>
<Text dimColor>
{`${T} · ${T} · ${T} · ${T}`}
</Text>
<Text>
—
</Text>
</Box>
</Box>
</Box>
</Box>
</Box>
</Box>
</Box>
)
})
}
The mod's own code
Shown under the mod's licence (Apache-2.0); its text is below. Keep the notice if you copy these lines.
hooks/register.tsx lines 876–903 · Band
on('ui.render', { component: 'AbovePrompt' }, async ($, e, next) => {
if (e.props.hasSurvey) return next(e)
const ui = $.ui.resolve(e as any) as any
const c = await read($, core)
const now = await $.clock.now()
// The row redraws while a turn runs; each redraw is a chance to refresh the figures (throttled).
if (e.props.isWorking) void refreshUsageSoon($)
const lit = Object.entries(c.used)
.sort((x, y) => y[1] - x[1])
.find(([key, at]) => glow({ [key]: at }, key, now) > 0)
const litEntry = lit ? (c.index ?? []).find(x => x.key === lit[0]) : undefined
const act = {
open: () => void $.ui.open({ id: PANE, title: 'Helm', focus: true, closeOnEscape: true }),
accept: (key: string, scope: 'project' | 'session') => void accept($, key, scope),
dismiss: (key: string) => void dismiss($, key),
start: () => {
void setState($, 'ready')
void $.ui.open({ id: PANE, title: 'Helm', focus: true, closeOnEscape: true })
},
look: () => void lookHere($),
skip: () => void setState($, 'declined'),
security: () => {
void update($, nav, s => ({ ...s, tab: 'global' }))
void $.ui.open({ id: PANE, title: 'Helm', focus: true, closeOnEscape: true })
},
}
return Band({ ui, c, lang: c.lang, act, terminal: e.surface === 'terminal', width: e.props.bodyColumns ?? 100, litName: litEntry?.name, litCat: litEntry?.category })
})src/views/band.tsx lines 23–89 · Band
export function Band({ ui, c, lang, act, terminal, width, litName, litCat }: Props) {
const { Box, Button, Text } = ui
const hinted = c.hint ? (c.index ?? []).find(x => x.key === c.hint) : undefined
if (c.project && c.state === 'new') {
// A chat already under way is joined, not set up from zero: Helm reads the folder and proposes tools.
return (
<Box columnGap={1}>
<Text bold color="claude">⎈</Text>
<Text dimColor>{t(lang, c.chat ? 'band.existing' : 'band.new', c.project.name)}</Text>
{c.chat ? (
<Button key="look" label={t(lang, 'band.look')} variant="primary" onPress={act.look} />
) : (
<Button key="open" label={t(lang, 'band.open')} variant="primary" onPress={act.start} />
)}
<Button key="skip" label={t(lang, 'band.skip')} onPress={act.skip} />
</Box>
)
}
if (hinted && c.project) {
return (
<Box columnGap={1}>
<Text bold color="claude">⎈</Text>
<Text dimColor>{t(lang, 'hint.fits', hinted.name)}</Text>
<Button key="hint-session" label={t(lang, 'hint.session')} variant="primary" onPress={() => act.accept(hinted.key, 'session')} />
<Button key="hint-project" label={t(lang, 'hint.project')} onPress={() => act.accept(hinted.key, 'project')} />
<Button key="hint-no" label={t(lang, 'hint.no')} onPress={() => act.dismiss(hinted.key)} />
</Box>
)
}
const index = c.index ?? []
const active = index.filter(x => x.on).length
const u = c.usage
// On a narrow row the least urgent limit gives way.
const meters = [
u?.five != null && { id: 'five', label: t(lang, 'meter.five'), pct: u.five },
u?.week != null && { id: 'week', label: t(lang, 'meter.week'), pct: u.week },
u?.ctx != null && width >= 120 && { id: 'ctx', label: t(lang, 'meter.context'), pct: u.ctx },
].filter(Boolean) as { id: string; label: string; pct: number }[]
// The security dot: green when the last scan was clean, amber for cautions, red for a "do not install", dim when nothing was scanned yet.
const found = flagged(c.scans)
const scanned = Object.keys(c.scans).length > 0
// Green only when every installed tool was scanned and none is flagged or under caution; anything unscanned keeps it amber.
const unscanned = (c.index ?? []).filter(x => !c.scans[x.key]).length
const shield = c.scanning ? 'suggestion' : !scanned ? 'inactive' : found.length > 0 ? 'error' : watched(c.scans) > 0 || unscanned > 0 ? 'warning' : 'success'
const dot = litCat ? `#${(COLOR[litCat] ?? COLOR.other).toString(16).padStart(6, '0')}` : '#6fd08c'
return (
<Box justifyContent="space-between">
<Box columnGap={2}>
<Box columnGap={1}>
<Text bold color="claude">⎈</Text>
<Text dimColor>{c.project ? `${c.project.name} · ${active}/${index.length}` : t(lang, 'head.none')}</Text>
</Box>
{meters.map(m => Meter({ ui, terminal, id: m.id, label: m.label, pct: m.pct }))}
<Box>
<Text color={shield}>●</Text>
<Button key="helm-security" label={c.scanning ? `${t(lang, 'sec.title')} ${c.scanning.done}/${c.scanning.total}` : found.length > 0 ? `${t(lang, 'sec.title')} ${found.length}` : t(lang, 'sec.title')} plain onPress={act.security} />
</Box>
{litName && <Text color={dot}>{`● ${litName}`}</Text>}
</Box>
<Button key="helm-open" label={t(lang, 'band.openHelm')} onPress={act.open} />
</Box>
)
}src/views/meter.tsx lines 36–45 · Band
export function Meter({ ui, terminal, id, label, pct }: Props) {
const { Box, Raster, Svg, Text } = ui
return (
<Box key={id} columnGap={1}>
<Text dimColor>{label}</Text>
{terminal ? <Raster key={`m-${label}`} columns={8} rows={1} cells={meterCells(pct, 8)} /> : <Svg source={meterSvg(pct)} alt={`${label} ${clamp(pct)}%`} width={64} height={8} />}
<Text bold>{`${clamp(pct)}%`}</Text>
</Box>
)
}hooks/register.tsx lines 905–963 · Pane
on('ui.render', { component: 'Pane', requestId: PANE }, async ($, e) => {
const ui = $.ui.resolve(e as any) as any
const c = await read($, core)
const n = await read($, nav)
const github = hasGithub(await $.tool.list().catch(() => []))
const terminal = e.surface === 'terminal'
const width = Math.max(40, Math.min(e.props.bodyColumns ?? 80, 100))
const now = await $.clock.now()
const act = {
tab: (tab: Nav['tab']) => void update($, nav, s => ({ ...s, tab })),
fold: (cat: string) => void update($, nav, s => ({ ...s, open: (s.open ?? []).includes(cat) ? s.open.filter(x => x !== cat) : [...(s.open ?? []), cat] })),
foldAll: (cats: string[]) => void update($, nav, s => ({ ...s, open: (s.open ?? []).length > 0 ? [] : cats })),
inspect: (key: string) => void update($, nav, s => ({ ...s, inspect: s.inspect === key ? null : key })),
lang: (pref: string) => void setLang($, pref),
ask: (text: string) => void update($, core, s => ({ ...s, ask: { text, picks: shortlist(s.index ?? [], text) } })),
refine: () => void refine($),
turnOn: () => void turnOnHere($),
undo: () => void undoHere($),
gh: () => void setSetup($, s => ({ ...s, on: !s.on })),
license: () => void setSetup($, s => ({ ...s, license: nextLicense(s.license) })),
item: (id: string) => void setSetup($, toggleItem(id)),
details: (text: string) => void setSetup($, s => ({ ...s, details: text })),
research: (text: string) => void research($, text),
search: () => void research($, draft),
clearDraft: () => {
draft = ''
cleared += 1
void update($, nav, s => ({ ...s }))
},
pickRow: (i: number) => void update($, core, s => ({ ...s, batch: s.batch ? s.batch.map((row, j) => (j === i ? { ...row, pick: !row.pick } : row)) : s.batch })),
installBatch: (scope: 'user' | 'local') => void installBatch($, scope),
clearBatch: () => void update($, core, s => ({ ...s, batch: null, message: null })),
pick: (repo: string) => void pickHit($, repo),
install: (scope: 'user' | 'local') => void install($, scope),
check: () => void runCheckup($),
update: () => void runUpdate($),
fix: (key: string) => void fixIssue($, key),
makeGlobal: (repo: string) => void globalInstall($, repo),
scan: () => void runScan($),
installScanner: () => void installScanner($),
toggle: (key: string) => void toggleTool($, key),
anyway: (scope: 'user' | 'local') => void installAnyway($, scope),
}
try {
isTerminal = terminal
// The module path has to be a literal in this file; surfaces without a `Client` keep the one-line field.
const Client = ui.Client
const editor = Client ? <Client key="research-editor" module="./editor.tsx" width="100%" props={{ placeholder: t(c.lang, 'find.placeholder'), start: draft, reset: cleared }} /> : null
return Panel({ ui, c, n, github, act, terminal, width, now, lang: c.lang, editor })
} catch (err) {
// A panel that cannot draw says why, instead of the engine's empty "nothing to show".
return (
<ui.Box flexDirection="column">
<ui.Text bold color="claude">Helm</ui.Text>
<ui.Text color="error">{`The panel could not be drawn: ${String((err as Error)?.message ?? err).slice(0, 300)}`}</ui.Text>
</ui.Box>
)
}
})src/views/panel.tsx lines 76–235 · Pane
export function Panel({ ui, c, n, github, act, terminal, width, now, lang, editor }: Props) {
const { Box, Button, Input, Select, Text } = ui
const T = (key: Key, ...vars: (string | number)[]) => t(lang, key, ...vars)
const index = c.index ?? []
const active = index.filter(x => x.on).length
const here = c.project !== null
const rule = terminal ? <Text dimColor>{'─'.repeat(Math.max(10, width))}</Text> : null
const title = (text: string, color?: string) => (
<Text bold color={color} dimColor={!color}>
{text.toUpperCase()}
</Text>
)
const card = (key: string, children: any, borderColor = 'subtle') => (
<Box key={`card-${key}`} flexDirection="column" marginTop={1} borderStyle="round" borderColor={borderColor} paddingX={1}>
{children}
</Box>
)
const tab = (id: Nav['tab'], label: string) => <Button key={id} label={label} variant={n.tab === id ? 'primary' : 'secondary'} onPress={() => act.tab(id)} />
const topLine = c.scanning ? T('sec.running', c.scanning.done, c.scanning.total) : c.message
const header = (
<Box flexDirection="column">
<Box justifyContent="space-between">
<Text bold>{c.project ? c.project.name : T('head.none')}</Text>
<Text dimColor>{c.index === null ? T('head.reading') : T('head.counts', index.length, active)}</Text>
</Box>
<Box marginTop={1} columnGap={1}>
{tab('project', T('tab.project'))}
{tab('global', T('tab.global'))}
</Box>
{rule}
{topLine && (
<Box marginTop={1}>
<Text color={c.failed ? 'error' : c.busy || c.scanning ? 'suggestion' : 'success'}>{`${c.failed ? '✗ ' : c.busy || c.scanning ? '◌ ' : '✓ '}${topLine}`}</Text>
</Box>
)}
</Box>
)
const footer = (
<Box marginTop={1} flexDirection="column">
<Select
key="lang"
label={`${T('lang.label')} `}
value={c.pref}
options={[{ value: 'auto', label: T('lang.auto') }, ...LANGS.map(l => ({ value: l.code, label: l.name }))]}
onSelect={act.lang}
/>
</Box>
)
// ---- the research box: the same in Discover and in Global ----
const discover = card(
'discover',
<Box flexDirection="column">
{title(T('find.title'), '#f2b84b')}
<Text dimColor>{T('find.about')}</Text>
{editor ? (
<Box flexDirection="column" marginTop={1}>
{editor}
<Box marginTop={1} columnGap={1}>
<Button key="research-go" label={T('find.submit')} variant="primary" onPress={act.search} />
<Button key="research-clear" label={T('batch.clear')} plain onPress={act.clearDraft} />
</Box>
</Box>
) : (
<Input key="research" placeholder={T('find.placeholder')} submitLabel={T('find.submit')} onSubmit={act.research} />
)}
{c.hits && (
<Box flexDirection="column" marginTop={1}>
{c.hits.map(h => (
<Box key={`hit-${h.repo}`} columnGap={1}>
<Button key={`h-${h.repo}`} label={h.repo} onPress={() => act.pick(h.repo)} />
<Text dimColor wrap="truncate-end">{`${h.stars}★ ${h.description}`}</Text>
</Box>
))}
</Box>
)}
{c.batch && (
<Box flexDirection="column" marginTop={1}>
<Text bold>{T('batch.title', c.batch.length)}</Text>
{c.batch.map((row, i) => {
const f = row.found
const level = f?.verdict.level
// Not a skill or a plugin at all is not a danger: it is greyed, not red.
const other = row.state === 'done' && !!f && level === 'no' && f.verdict.reasons.every(r => r.k === 'noform')
const color = row.state === 'installed' || row.state === 'have' ? 'success' : row.state === 'failed' ? 'error' : row.state === 'wait' || row.state === 'check' ? 'suggestion' : row.state === 'missing' || row.state === 'unsupported' || other ? 'inactive' : level ? LEVEL[level] : 'inactive'
const mark = row.state === 'installed' || row.state === 'have' ? '✓' : row.state === 'failed' ? '✗' : row.state === 'wait' || row.state === 'check' ? '◌' : row.state === 'missing' || row.state === 'unsupported' ? '?' : other ? '–' : level === 'ok' ? '●' : level === 'caution' ? '▲' : '✗'
const ready = row.state === 'done' && !!f && level !== 'no'
const note = (() => {
if (row.state === 'wait' || row.state === 'check') return T('batch.checking')
if (row.state === 'have') return T('batch.have')
if (other) return T('why.noform')
if (row.state === 'missing') return T('batch.missing')
if (row.state === 'unsupported') return T('batch.unsupported')
if (row.state === 'installed') return T('batch.installed')
if (row.state === 'failed') return `${T('batch.failed')}${row.why ? `: ${row.why}` : ''}`
return [T(level === 'ok' ? 'verdict.ok' : level === 'caution' ? 'verdict.caution' : 'verdict.no'), ...(f?.verdict.reasons ?? []).map(r => T(WHY[r.k], r.n ?? 0)), ...(row.via ? [T('batch.matched', row.via)] : [])].join(' · ')
})()
return (
<Box key={`b-${i}`} flexDirection="column" marginTop={1}>
<Box columnGap={1}>
{ready ? <Button key={`b-pick-${i}`} label={row.pick ? '☑' : '☐'} plain onPress={() => act.pickRow(i)} /> : <Text color={color}>{mark}</Text>}
<Text bold>{f?.meta.repo ?? row.label}</Text>
{f && <Text dimColor>{`${f.meta.license ?? '—'} · ${f.meta.stars}★`}</Text>}
</Box>
<Text color={color} dimColor wrap="truncate-end">{` ${note}`}</Text>
</Box>
)
})}
<Box marginTop={1} columnGap={1}>
{c.batch.some(row => row.pick && row.state === 'done') && (
<Button
key="b-install"
label={`${here && n.tab === 'project' ? T('install.here') : T('install.all')} · ${c.batch.filter(row => row.pick && row.state === 'done').length}`}
variant="primary"
onPress={() => act.installBatch(here && n.tab === 'project' ? 'local' : 'user')}
/>
)}
<Button key="b-clear" label={T('batch.clear')} plain onPress={act.clearBatch} />
</Box>
</Box>
)}
{c.found && (
<Box flexDirection="column" marginTop={1} borderStyle="round" borderColor={LEVEL[c.found.verdict.level]} paddingX={1}>
<Box columnGap={1}>
<Text bold>{c.found.meta.repo}</Text>
<Text dimColor>{`${c.found.meta.license ?? '—'} · ${c.found.meta.stars}★`}</Text>
</Box>
<Text color={LEVEL[c.found.verdict.level]} bold>
{T(c.found.verdict.level === 'ok' ? 'verdict.ok' : c.found.verdict.level === 'caution' ? 'verdict.caution' : 'verdict.no')}
</Text>
{c.found.verdict.reasons.map(r => (
<Text key={r.k} dimColor>{`· ${T(WHY[r.k], r.n ?? 0)}`}</Text>
))}
{(c.found.scan?.top ?? []).map(f => (
<Text key={`${f.pattern}${f.where}`} dimColor wrap="truncate-end">
{` ${f.sev.toLowerCase()} · ${f.pattern} · ${f.where}`}
</Text>
))}
{c.scanner.state === 'missing' && (
<Box marginTop={1}>
<Button key="scanner-install-found" label={T('sec.install')} onPress={act.installScanner} />
</Box>
)}
{isOverridable(c.found) && (
<Box marginTop={1}>
<Button key="anyway" label={c.anyway === c.found.meta.repo ? T('sec.anywayAgain') : T('sec.anyway')} onPress={() => act.anyway(here && n.tab === 'project' ? 'local' : 'user')} />
</Box>
)}
{c.found.verdict.level !== 'no' && (
<Box marginTop={1}>
<Button key="install" label={here && n.tab === 'project' ? T('install.here') : T('install.all')} variant="primary" onPress={() => act.install(here && n.tab === 'project' ? 'local' : 'user')} />
</Box>
)}
</Box>
)}
</Box>,
'#f2b84b',Licence text (Apache-2.0)
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright 2026 rlpb
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
What its code calls
runs programswrites filesenv varsdrives Claudetool callsremembers
The design, read from code
Drawn from the mod's source at the commit read, not from a run: a list is drawn three times, a condition takes its first branch that draws in the desktop app, and a value only the run time knows is shown as a made-up sample (dotted underline) or left out. Colours and type are this site's.
What its code shows
Read from the source at commit 22cf85002765 on 2026-10-06. The first group decides whether a mod is listed; the rest is for you to weigh. A later commit is not read until the next crawl.
| Decides the listing: code you can check | |
|---|---|
| Entry read | Every module hooks/hooks.json names was read.hooks/register.tsx |
| Parses | Every file parses as TypeScript or JavaScript.34 files parsed |
| All its code is in the mod | Every import is a file of the mod or the engine's own module; no packages, no require.all its code is in the mod |
| Readable | No minified lines, no eval or new Function, no import of a computed path, no encoded blobs.no minified code, no eval, no encoded blobs |
| Calls in the open | Network and programs are reached as $.http.fetch and $.process.run in place, never passed around.every call outside goes through $ in the open |
| For you to weigh before installing | |
| Where it draws | The terminal, the desktop app, both, or nothing (hooks only: a guard or a prompt rewriter), as its code says. Shown, never a reason to leave a mod out.draws in the terminal and the desktop app, the same in both |
| Install line | Whether its repository's own .claude-plugin/marketplace.json lists it, so it installs from that marketplace with the lines on its page.listed in its repository's .claude-plugin/marketplace.json: installs from there |
| Programs on Windows | Whether every program it starts through $.process exists on Windows (tail, date, open, osascript, /usr/… do not).runs no program a Windows PC lacks |
| Network | Whether every fetch names its https host in the code.no network |
| Programs | Whether every program it starts is named in the code and is not a shell, an interpreter or a network tool.hooks/register.tsx:370 a program named at run time; hooks/register.tsx:543 a program named at run time; hooks/register.tsx:569 a program named at run time; hooks/register.tsx:609 a program named at run time; hooks/register.tsx:616 a program named at run time |
| Reads and sends | Whether it both reads files or environment variables and reaches the network.reads environment variables and files and reaches the network |
| Keys in the source | Whether the source holds what looks like an API key or a private key.no keys in the source |
| Licence | An open licence (MIT, Apache-2.0, BSD, ISC, Unlicense, 0BSD, CC0) with its text lets modscode show its code; otherwise the code is linked.Apache-2.0 |
This is a reading of the code text, not a security review: it does not run the mod, and it cannot see what a program the mod starts does. The check before installing is yours. How mods are chosen
Install it
Check it yourself before you install it. Mods run unsandboxed, with your permissions, and modscode does not vouch for what this code does. Read the code below (or run claude plugin validate . in its folder), weigh what it reaches, and install the commit you read.
Its repository is its marketplace. Add that marketplace (in the terminal with these commands, or in the desktop app's plugin settings) and install the mod from it:
/plugin marketplace add rlpb/helm/plugin install helm@helmThis installs the marketplace's latest commit, which may not be the one read here (22cf85002765). Compare them before you install.
Ask Claude about it
With the modscode connector added, Claude can read this design, what its code reaches and its code, and build on them. Ask it like this:
Read the modscode design "rlpb-helm" with its code and make me a pane like itSearch them from Claude: the MCP connector
Similar designs
-
Ask Claude…Historyf ◂ expand⚙ settingsFix loginbuildRemindAuto Remind ConcisebuildRemindAuto Remind ConcisebuildRemindAuto Remind Concise$1.24 this session · auto-compact at 3wrap-up 5h Remind · 7d Remind · /compact Learningwrap-up in 2h 10m CancelFix loginauto 2h 10m ■ Stop stotal 2h 10m · think 2h 10m0 · write 2h 10m0 · tools 2h 10m03 out · 12.4 tok/s◌ build 2h 10m◌ build 2h 10m◌ build 2h 10mFix login● 2h 10m · think 2h 10m · Explanatory tok/s · 3 tools · stopped● 2h 10m · think 2h 10m · Explanatory tok/s · 3 tools · stopped● 2h 10m · think 2h 10m · Explanatory tok/s · 3 tools · stoppedFix loginbuild 3 · Remind%build 3 · Remind%build 3 · Remind%
-
Ask 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
-
Ask Claude…Mod controlsLive Claude ModCount: 0 / Initial / oneAdd oneName InitialOne**Markdown** with a [link](https://example.com)
const count = 1;
./counter.tsxFill composerAppend noteSuggest draftCopy text -
Ask Claude…蹦一蹦Claude needs youBack to ClaudeClick, hold SpaceContextShortcutShortcutShortcutSlow network, still loading…3 Skills33 Skills33 Skills3SkillsLeave leaderboardok. Showing the last resultsRetry3♪
-
Ask Claude…────────Clear doneClaude⋯└─ buildCancelCancelCancel└─ buildCancelCancelCancel└─ buildCancelCancelCancel
-
What it does
- Draws a pane, a band above the prompt
- Adds /lingo
- Hooks prompt.edit, prompt.submit, session.start
- Keeps its own state between turns