ModsCode / Claude Code Mods / Ranking / fishstack
fishstack
A fishStack pane for Claude Code: a perm worktree with a read-only head start, crew dials and a context library.
What it does
- Draws a pane, a band above the prompt, toasts
- Adds /fishstack, /fs
- Watches AskUserQuestion calls and can refuse them
- Hooks classic.FileChanged, classic.PostToolBatch, classic.SessionStart, classic.Stop and 14 more
- Keeps its own state between turns
Good points
- Written in TypeScript
- Has a desktop-specific branch
- Handles errors
Code to start from
A starter ModsCode writes from the drawing it read, and the mod's own lines that draw, where there are any.
Starter (register.tsx)
import type { Register } from 'claude-code'
// Drawn like fishstack by Patrick Lai (pane, band, toast), as ModsCode read it from the mod's code:
// https://modscode.com/claude-mods/mods/patrick-lai-fishstack/
// 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: "fishStack" })
on('ui.render', { component: 'Pane', requestId: 'my-pane' }, async ($, e) => {
const { Box, Button, Text, Input } = $.ui.resolve(e)
const label = '…'
const index = '…'
const status = '…'
const input = '…'
const length = '…'
const length2 = '…'
const sum = '…'
const KIND_MARK = '…'
const title = '…'
const facts = '…'
const chars = '…'
const text = '…'
const KIND_MARK2 = '…'
const title2 = '…'
const facts2 = '…'
const chars2 = '…'
const KIND_MARK3 = '…'
const title3 = '…'
const facts3 = '…'
const chars3 = '…'
const percent = '…'
const tokens = '…'
const tokens2 = '…'
const name = '…'
const tokens3 = '…'
const name2 = '…'
const tokens4 = '…'
const name3 = '…'
const tokens5 = '…'
const tokens6 = '…'
const tokens7 = '…'
const tokens8 = '…'
const tokens9 = '…'
return (
<Box flexDirection="column" gap={1}>
<Box justifyContent="space-between" alignItems="center">
<Box gap={1}>
<Button label={`${label}`} hotkey={`${index}`} variant="primary" />
<Button label={`${label}`} hotkey={`${index}`} variant="primary" />
<Button label={`${label}`} hotkey={`${index}`} variant="primary" />
</Box>
<Text dimColor>
fishStack
</Text>
</Box>
<Box flexDirection="column" gap={1}>
<Box justifyContent="space-between" alignItems="flex-start" gap={1}>
<Box flexDirection="column" flexShrink={1}>
<Text bold>
Context the agent reads
</Text>
<Text dimColor>
Sources that are On go into every request. A folder you choose comes in as a group you can switch at once.
</Text>
</Box>
<Box flexShrink={0} gap={1} alignItems="center">
<Text dimColor>
Use context
</Text>
<Box gap={1} alignItems="center" flexWrap="wrap">
<Button label={`${label}`} variant="primary" />
<Button label={`${label}`} variant="primary" />
<Button label={`${label}`} variant="primary" />
<Text bold>
[
mixed
]
</Text>
</Box>
</Box>
</Box>
<Box flexDirection="column" gap={1}>
<Box justifyContent="space-between" alignItems="center" gap={1} flexWrap="wrap">
<Box gap={1} alignItems="center" flexWrap="wrap">
<Button label="Choosing…" variant="primary" />
<Button label="Choosing…" />
</Box>
<Text color="warning" wrap="truncate-end">
{status}
</Text>
</Box>
<Input placeholder="Or paste a link, or write a note" value={`${input}`} submitLabel="add" />
</Box>
<Box justifyContent="space-between" alignItems="center" gap={1} flexWrap="wrap">
<Box gap={1} alignItems="center">
<Text color="success">
████████░░░░░░░░
</Text>
<Text>
<Text bold>
{length}
</Text>
<Text dimColor>
{" of "}
</Text>
<Text bold>
{length2}
</Text>
<Text dimColor>
{" sources on"}
</Text>
</Text>
</Box>
<Text color="error">
{"about "}
{`${sum}${length}`}
{" of "}
12000
{" tokens"}
{" · over budget, switch some off"}
</Text>
</Box>
<Box flexDirection="column" gap={1}>
<Box flexDirection="column" marginTop={1} paddingLeft={2}>
<Box justifyContent="space-between" alignItems="center" gap={1}>
<Box gap={1} alignItems="center" flexShrink={1}>
<Button>
<Text color="success" bold>
● On
</Text>
</Button>
<Text>
{KIND_MARK}
</Text>
<Button plain>
<Text color="suggestion" bold>
{"▾ "}
</Text>
<Text bold>
{title}
</Text>
</Button>
</Box>
<Box gap={1} alignItems="center" flexShrink={0}>
<Text dimColor>
{facts}
</Text>
<Text color="warning">
may be empty
</Text>
<Button label="Refresh" dimColor />
<Button label="Strict" variant="primary" />
</Box>
</Box>
<Box flexDirection="column" gap={1} marginTop={1}>
<Box flexDirection="column" borderStyle="round" paddingX={1} paddingY={1}>
<Text wrap="wrap">
No readable text.
</Text>
<Text dimColor>
{"… "}
{chars}
{" more reach the agent"}
</Text>
</Box>
<Input label="Text " value={`${text}`} submitLabel="save" autoFocus />
<Box gap={1} alignItems="center" flexWrap="wrap">
<Box flexGrow={1}>
<Input label="Title " value={`${title}`} submitLabel="rename" />
</Box>
</Box>
<Box gap={1} justifyContent="flex-end" alignItems="center">
<Box flexGrow={1}>
<Text dimColor>
Off: hidden from the agent.
</Text>
</Box>
<Button label="Done" dimColor />
<Button label="Refresh" dimColor />
<Button>
<Text color="error">
Delete
</Text>
</Button>
</Box>
</Box>
</Box>
<Box flexDirection="column" marginTop={1} paddingLeft={2}>
<Box justifyContent="space-between" alignItems="center" gap={1}>
<Box gap={1} alignItems="center" flexShrink={1}>
<Button>
<Text color="success" bold>
● On
</Text>
</Button>
<Text>
{KIND_MARK2}
</Text>
<Button plain>
<Text color="suggestion" bold>
{"▾ "}
</Text>
<Text bold>
{title2}
</Text>
</Button>
</Box>
<Box gap={1} alignItems="center" flexShrink={0}>
<Text dimColor>
{facts2}
</Text>
<Text color="warning">
may be empty
</Text>
<Button label="Refresh" dimColor />
<Button label="Strict" variant="primary" />
</Box>
</Box>
<Box flexDirection="column" gap={1} marginTop={1}>
<Box flexDirection="column" borderStyle="round" paddingX={1} paddingY={1}>
<Text wrap="wrap">
No readable text.
</Text>
<Text dimColor>
{"… "}
{chars2}
{" more reach the agent"}
</Text>
</Box>
<Input label="Text " value={`${text}`} submitLabel="save" autoFocus />
<Box gap={1} alignItems="center" flexWrap="wrap">
<Box flexGrow={1}>
<Input label="Title " value={`${title}`} submitLabel="rename" />
</Box>
</Box>
<Box gap={1} justifyContent="flex-end" alignItems="center">
<Box flexGrow={1}>
<Text dimColor>
Off: hidden from the agent.
</Text>
</Box>
<Button label="Done" dimColor />
<Button label="Refresh" dimColor />
<Button>
<Text color="error">
Delete
</Text>
</Button>
</Box>
</Box>
</Box>
<Box flexDirection="column" marginTop={1} paddingLeft={2}>
<Box justifyContent="space-between" alignItems="center" gap={1}>
<Box gap={1} alignItems="center" flexShrink={1}>
<Button>
<Text color="success" bold>
● On
</Text>
</Button>
<Text>
{KIND_MARK3}
</Text>
<Button plain>
<Text color="suggestion" bold>
{"▾ "}
</Text>
<Text bold>
{title3}
</Text>
</Button>
</Box>
<Box gap={1} alignItems="center" flexShrink={0}>
<Text dimColor>
{facts3}
</Text>
<Text color="warning">
may be empty
</Text>
<Button label="Refresh" dimColor />
<Button label="Strict" variant="primary" />
</Box>
</Box>
<Box flexDirection="column" gap={1} marginTop={1}>
<Box flexDirection="column" borderStyle="round" paddingX={1} paddingY={1}>
<Text wrap="wrap">
No readable text.
</Text>
<Text dimColor>
{"… "}
{chars3}
{" more reach the agent"}
</Text>
</Box>
<Input label="Text " value={`${text}`} submitLabel="save" autoFocus />
<Box gap={1} alignItems="center" flexWrap="wrap">
<Box flexGrow={1}>
<Input label="Title " value={`${title}`} submitLabel="rename" />
</Box>
</Box>
<Box gap={1} justifyContent="flex-end" alignItems="center">
<Box flexGrow={1}>
<Text dimColor>
Off: hidden from the agent.
</Text>
</Box>
<Button label="Done" dimColor />
<Button label="Refresh" dimColor />
<Button>
<Text color="error">
Delete
</Text>
</Button>
</Box>
</Box>
</Box>
</Box>
<Box flexDirection="column" borderStyle="round" paddingX={1} paddingY={1}>
<Box justifyContent="space-between" alignItems="center" gap={1}>
<Box gap={1} alignItems="center" flexShrink={1}>
<Text dimColor>
Context window
</Text>
<Text>
████████░░░░░░░░
</Text>
<Text>
<Text bold>
{percent}
%
</Text>
<Text dimColor>
{" · "}
{tokens}
{" of "}
{tokens2}
</Text>
</Text>
</Box>
<Box gap={1}>
<Button label="Hide" dimColor />
<Button label="Compact" dimColor />
</Box>
</Box>
<Text>
<Text dimColor>
{name}
</Text>
{tokens3}
{" "}
<Text color="promptBorder">
████████░░░░░░░░
</Text>
</Text>
<Text>
<Text dimColor>
{name2}
</Text>
{tokens4}
{" "}
<Text color="promptBorder">
████████░░░░░░░░
</Text>
</Text>
<Text>
<Text dimColor>
{name3}
</Text>
{tokens5}
{" "}
<Text color="promptBorder">
████████░░░░░░░░
</Text>
</Text>
<Text dimColor>
{"Last response: in "}
{tokens6}
{" · out "}
{tokens7}
{" · cache read "}
{tokens8}
{" · cache write"}
{" "}
{tokens9}
</Text>
</Box>
</Box>
</Box>
)
})
// the band above the prompt; what else goes there is drawn under it
on('ui.render', { component: 'AbovePrompt' }, async ($, e, next) => {
const { Box, Button, Text } = $.ui.resolve(e)
const clock = '…'
const cachePercent = '…'
const tokens = '…'
const tokens2 = '…'
const costUsd = '…'
const preset = '…'
const picked = '…'
const picked2 = '…'
const sourcesOn = '…'
const branch = '…'
return (
<Box flexDirection="column">
<Box gap={2} alignItems="center" flexWrap="wrap">
<Button plain>
<Text bold color="suggestion">
≋
</Text>
</Button>
<Box gap={1} alignItems="center">
<Text color="warning">
▮▮▮▮▮▮▮▮
▯▯▯▯▯▯▯▯
</Text>
<Box>
<Text>
<Text dimColor>
{"Cache warm "}
</Text>
<Text bold>
{clock}
</Text>
<Text dimColor>
{" · "}
{cachePercent}
% hit
</Text>
</Text>
</Box>
</Box>
<Box>
<Text>
<Text>
<Text color="suggestion">
↑
</Text>
<Text bold>
{tokens}
</Text>
<Text dimColor>
{" in "}
</Text>
<Text color="success">
↓
</Text>
<Text bold>
{tokens2}
</Text>
<Text dimColor>
{" out"}
</Text>
</Text>
<Text dimColor>
{" · "}
≈ $
{costUsd}
{" API price"}
</Text>
</Text>
</Box>
<Button plain>
<Text>
<Text dimColor>
{"Dials "}
</Text>
<Text bold>
{preset}
</Text>
<Text color="warning">
{" "}
{"· picks "}
{picked}
{" "}
in under a minute
</Text>
<Text color="success">
{" · ✓ picked "}
{picked2}
{" for you"}
</Text>
</Text>
</Button>
<Button plain>
<Text>
<Text bold>
{sourcesOn}
</Text>
<Text dimColor>
{" "}
source on
</Text>
</Text>
</Button>
<Button plain>
<Text>
<Text color="success">
{"⎇ "}
</Text>
<Text bold>
{branch}
</Text>
</Text>
</Button>
</Box>
{await next(e)}
</Box>
)
})
on('session.start', async ($, e, next) => {
const pop = '…'
const number = '…'
await $.ui.toast(`fishStack: desktop sessions in ${pop} now start in a pool slot (.claude/settings.local.json, kept out of git).`)
await $.ui.toast(`Slot ${number} is in use now, so it stays.`)
return next(e)
})
}
The mod's own code
Shown under the mod's licence (MIT); its text is below. Keep the notice if you copy these lines.
hooks/context.tsx lines 419–578 · Pane
on('ui.render', { component: 'Pane', requestId: PANE }, async ($, e, next) => {
if ((await read($, tab)) !== 'context') return next(e)
const ui: Ui = resolveUi($.ui.resolve(e), e.surface, await read($, isClientDown))
const { Box, Text, Button, Input, Markdown } = ui
const rich = isRich(ui)
const list = await read($, sources)
const groups = await read($, folders)
const view = await readView($)
const draft = await read($, contextDraft)
const status = await read($, contextStatus)
const columns = e.props.bodyColumns
const go = (change: Partial<ContextView>) => () => void setView($, change)
const sharedList = list.filter(one => one.mode !== 'off')
const sharedChars = sharedList.reduce((sum, one) => sum + one.text.length, 0)
const sharedTokens = approxTokens(sharedChars)
const isOver = sharedTokens > TOKEN_BUDGET
const loose = list.filter(one => one.folderId === null)
const isThin = (source: Source) => source.kind === 'link' && source.text.length < 200
// On/Off is the main switch, drawn the same for a source and a folder.
const onOff = (key: string, state: 'on' | 'off' | 'some', onPress: () => void) =>
drawnButton(ui, key, switchArt(state), state === 'on' ? 'On' : state === 'some' ? 'Some on' : 'Off', 36, 22, onPress) ?? (
<Button key={key} onPress={onPress}>
{state === 'on' ? (
<Text color="success" bold>
● On
</Text>
) : state === 'some' ? (
<Text color="warning" bold>
◐ Some on
</Text>
) : (
<Text dimColor>○ Off</Text>
)}
</Button>
)
const sourceRow = (source: Source, isNested: boolean) => {
const isOn = source.mode !== 'off'
const isOpen = view.openId === source.id
const parts = [
<Box justifyContent="space-between" alignItems="center" gap={1}>
<Box gap={1} alignItems="center" flexShrink={1}>
{onOff(`toggle-${source.id}`, isOn ? 'on' : 'off', () => void setMode($, source.id, isOn ? 'off' : 'guidance'))}
{rich ? svg(ui, glyph(source.kind), source.kind, 18, 18) : <Text color={GLYPH_COLOR[source.kind]}>{KIND_MARK[source.kind]}</Text>}
<Button key={`open-${source.id}`} plain onPress={go({ openId: isOpen ? null : source.id, isEditingText: false })}>
<Text color="suggestion" bold>
{isOpen ? '▾ ' : '▸ '}
</Text>
<Text bold dimColor={!isOn}>
{shorten(source.title, Math.max(20, columns - (isNested ? 52 : 46)))}
</Text>
</Button>
</Box>
<Box gap={1} alignItems="center" flexShrink={0}>
<Text dimColor>{facts(source).replace(/^\w+ · /, '')}</Text>
{isThin(source) && <Text color="warning">may be empty</Text>}
{isThin(source) && <Button key={`thin-refresh-${source.id}`} label="Refresh" dimColor onPress={() => void refresh($, source)} />}
{isOn && (
<Button
key={`strict-${source.id}`}
label="Strict"
variant={source.mode === 'strict' ? 'primary' : undefined}
dimColor={source.mode !== 'strict'}
onPress={() => void setMode($, source.id, source.mode === 'strict' ? 'guidance' : 'strict')}
/>
)}
</Box>
</Box>,
isOpen && (
<Box flexDirection="column" gap={1} marginTop={1}>
{card(
ui,
`preview-${source.id}`,
[
source.kind === 'file' && /\.mdx?$/i.test(source.path ?? '') ? (
<Markdown key={`text-${source.id}`} text={source.text.slice(0, 1_500)} />
) : (
<Text wrap="wrap">{source.text.slice(0, 1_500) || 'No readable text.'}</Text>
),
source.text.length > 1_500 && <Text dimColor>… {chars(source.text.length - 1_500)} more reach the agent</Text>,
],
{ tone: 'muted' },
)}
{view.isEditingText && source.kind === 'note' && Input !== undefined && (
<Input key={`edit-text-${source.id}`} label="Text " value={source.text} submitLabel="save" autoFocus onSubmit={value => void editNote($, source.id, value)} />
)}
<Box gap={1} alignItems="center" flexWrap="wrap">
{Input !== undefined && (
<Box flexGrow={1}>
<Input key={`rename-source-${source.id}`} label="Title " value={source.title} submitLabel="rename" onSubmit={value => void renameSource($, source.id, value)} />
</Box>
)}
</Box>
<Box gap={1} justifyContent="flex-end" alignItems="center">
<Box flexGrow={1}>
<Text dimColor>
{!isOn ? 'Off: hidden from the agent.' : source.mode === 'strict' ? 'Strict: the agent must follow it.' : 'On: the agent weighs it.'}
</Text>
</Box>
{source.kind === 'note' && Input !== undefined && (
<Button key={`edit-text-start-${source.id}`} label={view.isEditingText ? 'Done' : 'Edit text'} dimColor onPress={go({ isEditingText: !view.isEditingText })} />
)}
{source.kind !== 'note' && <Button key={`refresh-${source.id}`} label="Refresh" dimColor onPress={() => void refresh($, source)} />}
<Button key={`remove-${source.id}`} onPress={() => void removeSource($, source.id)}>
<Text color="error">Delete</Text>
</Button>
</Box>
</Box>
),
]
return isNested ? (
<Box key={`row-${source.id}`} flexDirection="column" marginTop={1} paddingLeft={2}>
{parts}
</Box>
) : (
card(ui, `row-card-${source.id}`, parts, { tone: source.mode === 'strict' ? 'accent' : isOn ? 'plain' : 'muted' })
)
}
const folderBlock = (folder: Folder) => {
const members = list.filter(one => one.folderId === folder.id)
const onCount = members.filter(one => one.mode !== 'off').length
const state = members.length === 0 || onCount === 0 ? 'off' : onCount === members.length ? 'on' : 'some'
const isOpen = view.openFolders.includes(folder.id)
return card(
ui,
`folder-card-${folder.id}`,
[
<Box justifyContent="space-between" alignItems="center" gap={1}>
<Box gap={1} alignItems="center" flexShrink={1}>
{members.length > 0 && onOff(`folder-toggle-${folder.id}`, state, () => void setFolderOn($, folder.id, state !== 'on'))}
{rich && svg(ui, glyph('folder'), 'folder', 18, 18)}
<Button key={`fold-${folder.id}`} plain onPress={() => void toggleFolderOpen($, folder.id)}>
<Text color="suggestion" bold>
{isOpen ? '▾ ' : '▸ '}
</Text>
<Text bold>{folder.name}</Text>
<Text dimColor>
{members.length === 0 ? ' empty' : ` ${members.length} ${members.length === 1 ? 'source' : 'sources'} · ${onCount} on`}
</Text>
</Button>
</Box>
<Box gap={1} alignItems="center" flexShrink={0}>
<Button key={`folder-delete-${folder.id}`} dimColor onPress={go({ deletingFolder: folder.id })}>
Remove
</Button>
</Box>
</Box>,
view.deletingFolder === folder.id && (
<Box flexDirection="column" marginTop={1} gap={1}>
<Text>
Remove <Text bold>{folder.name}</Text> and its {members.length} sources? <Text dimColor>The files on disk stay as they are.</Text>
</Text>
<Box gap={1} justifyContent="flex-end" flexWrap="wrap">
<Button key="delete-cancel" label="Cancel" dimColor onPress={go({ deletingFolder: null })} />
<Button key="delete-folder" label="Remove" variant="primary" onPress={() => void deleteFolder($, folder.id)} />
</Box>
</Box>hooks/ui.tsx lines 45–87 · Pane
export function frame(ui: Ui, current: Tab, columns: number, onSelect: (id: Tab) => void, body: RenderElement) {
const { Box, Button, Text, Svg } = ui
// The tabs are the surface's own buttons, so a press answers at once (a
// drawn tab bar went through a Client and a redrawn picture, and lagged);
// the current one filled, keys 1 to 3. No tray behind them: the desktop
// draws a box's background square, and it read as a stray box. On the
// desktop the mark and the name lead, a still picture.
const tabs = (
<Box gap={1}>
{TABS.map((one, index) => (
<Button
key={`tab-${one.id}`}
label={one.label}
hotkey={String(index + 1)}
variant={one.id === current ? 'primary' : undefined}
dimColor={one.id !== current}
onPress={() => onSelect(one.id)}
/>
))}
</Box>
)
if (Svg !== undefined) {
const mark = wordmarkArt()
return (
<Box flexDirection="column" width={columns} gap={1}>
<Box key="pane-head" gap={2} alignItems="center">
<Svg source={mark.source} alt="fishStack" width={mark.width} height={mark.height} />
{tabs}
</Box>
{body}
</Box>
)
}
return (
<Box flexDirection="column" width={columns} gap={1}>
<Box justifyContent="space-between" alignItems="center">
{tabs}
<Text dimColor>fishStack</Text>
</Box>
{body}
</Box>
)
}hooks/kit.tsx lines 321–330 · Pane
export function useSwitch(ui: Ui, key: string, name: string, isOn: boolean, onChange: (isOn: boolean) => void) {
const { Box, Text } = ui
return (
<Box key={`${key}-row`} flexShrink={0} gap={1} alignItems="center">
<Text dimColor>{name}</Text>
{drawnButton(ui, key, switchArt(isOn ? 'on' : 'off'), `${name}: ${isOn ? 'on' : 'off'}`, 36, 22, () => onChange(!isOn)) ??
segmented(ui, key, ON_OFF, isOn ? 'on' : 'off', choice => onChange(choice === 'on'))}
</Box>
)
}hooks/kit.tsx lines 70–92 · Pane
export function segmented<T extends string>(
ui: Ui,
key: string,
options: readonly { value: T; label: string }[],
value: T | 'mixed' | null,
onPick: (value: T) => void,
) {
const { Box, Button, Text } = ui
return (
<Box gap={1} alignItems="center" flexWrap="wrap">
{options.map(one => (
<Button
key={`${key}-${one.value}`}
label={one.label}
variant={value === one.value ? 'primary' : undefined}
dimColor={value !== one.value}
onPress={() => onPick(one.value)}
/>
))}
{value === 'mixed' && chip(ui, 'mixed', 'warning')}
</Box>
)
}hooks/kit.tsx lines 95–106 · Pane
export function chip(ui: Ui, text: string, color: string) {
const { Text } = ui
return isRich(ui) ? (
<Text backgroundColor={color} color="inverseText" bold>
{`\u00a0\u00a0${text}\u00a0\u00a0`}
</Text>
) : (
<Text color={color} bold>
[{text}]
</Text>
)
}hooks/kit.tsx lines 32–58 · Pane
export function card(
ui: Ui,
key: string,
children: RenderElement | (RenderElement | false | null | undefined)[],
options: { tone?: Tone; width?: number | string; direction?: 'row' | 'column'; grow?: number } = {},
) {
const { Box } = ui
const tone = options.tone ?? 'plain'
const rich = isRich(ui)
return (
<Box
key={key}
flexDirection={options.direction ?? 'column'}
width={options.width}
flexGrow={options.grow}
borderStyle="round"
borderColor={BORDER[tone]}
borderDimColor={tone === 'plain' || tone === 'muted'}
backgroundColor={rich ? (tone === 'selected' ? FILL_SELECTED : FILL) : undefined}
hover={rich ? { backgroundColor: tone === 'selected' ? FILL_SELECTED : FILL_HOVER, borderColor: tone === 'muted' || tone === 'plain' ? 'suggestion' : BORDER[tone] } : undefined}
paddingX={1}
paddingY={rich ? 1 : 0}
>
{children}
</Box>
)
}Licence text (MIT)
MIT License Copyright (c) 2026 Patrick Lai 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.
How to build this: Pane (panel), Deny a tool call
What its code calls
networkruns programswrites filesenv varsdrives Claudetool callsrememberscalls tools
What its code shows
Read from the source at commit a006eb6d919f. 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.17 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, with its own branch for the desktop |
| 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).hooks/worktree.tsx:186 /bin/bash (not on Windows); hooks/worktree.tsx:267 find (not on Windows); hooks/worktree.tsx:389 mkdir (not on Windows); hooks/worktree.tsx:392 mkdir (not on Windows); hooks/worktree.tsx:395 rm (not on Windows) |
| Network | Whether every fetch names its https host in the code.hooks/context.tsx:204 fetch(url) |
| Programs | Whether every program it starts is named in the code and is not a shell, an interpreter or a network tool.hooks/worktree.tsx:186 /bin/bash (a shell or interpreter); hooks/worktree.tsx:597 /bin/bash (a shell or interpreter) |
| Reads and sends | Whether it both reads something of yours (files, environment variables, the transcript, settings) and reaches outside (the network, an MCP server, another session, telemetry).reads environment variables, 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.MIT |
| Settings hooks | Hooks declared in hooks/hooks.json or plugin.json beside the module: a command (a shell when it has no args), an HTTP request, an MCP tool or a model prompt at an event. They run outside $.no settings hooks: its function hooks alone |
| Servers it ships | MCP servers (a program, or a URL; a headersHelper is a shell command; a .mcpb bundle is unpacked at run time), LSP servers, monitors (a shell command for the whole session) and bin/ (on the PATH of the Bash tool).ships no MCP or LSP server, no monitor, no bin/ |
| Skills, commands, agents | What its Markdown declares beyond text: allowed-tools granted for the turn, hooks added when a skill is invoked, a command run before Claude reads the skill.no skills, commands, agents or workflows |
| Tools and MCP | Whether every tool it calls through $.tool.call and $.mcp.call is named in the code, and none is a shell (Bash through the tool runs a shell without $.process).tool.call: EnterWorktree |
| Asks of the model | Completions it runs ($.model.complete, fork, classify), subagents it spawns, prompts it submits as you, and the tools, commands and agents it adds.adds command ?, prompt.submit (as the person) |
| Events it hooks | By what a hook there can do: gates (refuse a tool call, a prompt, a setting, another plugin), shapes (what the model reads: the system prompt, tool descriptions, each request), reads (your input, the events of the settings hooks, every event with *), and the rest.gates: tool.call (AskUserQuestion), classic.Stop, command.run (fishstack, fs), prompt.submit · shapes: turn.step, prompt.compose · reads: ui.message, classic.SessionStart, classic.PostToolBatch, classic.WorktreeCreate, classic.FileChanged, ui.press · also: ui.render (Pane, AbovePrompt), ui.fault, session.start, session.attach (+5) · timers: clock.every, clock.after |
| Reads, by name | The environment variables and files it names, and whether it reads the transcript, settings.json, the prompt box or the mouse selection.env: HOME; files: a path computed at run time, …/…, …/.claude/plugins/store, …/.git, …/.lock (+2) |
| Writes, by name | The files and environment variables it names, and whether it changes settings, the prompt box, the clipboard, the conversation (a row the model reads) or another session.files: …/…, a path computed at run time; the clipboard |
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 its code (or run claude plugin validate . in its folder), weigh what it reaches, and install the commit you read.
From its marketplace
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 patrick-lai/claude-fish-stack-mod/plugin install fishstack@claude-fish-stack-mod/reload-pluginsThis installs the marketplace's latest commit, which may not be the one read here (a006eb6d919f). Compare them before you install. /reload-plugins loads it into a session that is already open.
Try the commit ModsCode read
No marketplace needed. In a terminal, clone the repository, check out the commit read, validate the mod, and load it for one session:
git clone https://github.com/patrick-lai/claude-fish-stack-modgit -C claude-fish-stack-mod checkout a006eb6d919f1c96380e59c973ad3a48d1cb3f6bclaude plugin validate claude-fish-stack-modclaude --plugin-dir claude-fish-stack-modThe validate line lists the events the mod hooks and what it asks Claude Code to do, without running it. The last line loads the mod for this session only and writes nothing to your settings. If the author has rewritten history, the commit may no longer exist.
Ask Claude or ChatGPT about it
With ModsCode added as a connector, Claude or ChatGPT can read this mod's code, what it reaches and how its controls are wired, and build on them. Ask it like this:
Read the ModsCode mod "patrick-lai-fishstack" with its code and make me one like itAdd the ModsCode MCP to Claude or ChatGPT
Similar mods
- claudelingoKeisuke Yoda★ 2
- a2a-modAliasgar Khimani★ 1
- aitoolsMichael Shepanski★ 1
- cockpitAndré Servaes★ 0
- context-gaugekirishimarisano-rgb★ 0
- links-bartripolskiydigital★ 0
Badge for your README
If this is your mod, paste this into your README. It links to this page.
[](https://modscode.com/claude-mods/mods/patrick-lai-fishstack/)