ModsCode / Claude Code Mods / Ranking / ostrakon
ostrakon
Capture thoughts mid-work, triage them across projects and machines, and turn them into prompts
What it does
- Draws a band above the prompt, a pane
- Adds /jot
- Watches tool calls and can refuse them
- Hooks config.set, prompt.edit, prompt.submit, session.append and 6 more
- Keeps its own state between turns
Good points
- Written in TypeScript
- 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 ostrakon by gaius-codius (pane, band, toast), as ModsCode read it from the mod's code:
// https://modscode.com/claude-mods/mods/gaius-codius-ostrakon/
// 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 } = $.ui.resolve(e)
return (
<Box flexDirection="column">
{await next(e)}
</Box>
)
})
// the pane: open it with $.ui.open({ id: 'my-pane', title: "ostrakon" })
on('ui.render', { component: 'Pane', requestId: 'my-pane' }, async ($, e) => {
const { Box, Text, Input, Button, Select } = $.ui.resolve(e)
const lead = '…'
const draft = '…'
const captureLabel = '…'
const glyph = '…'
const count = '…'
const number = '…'
const marker = '…'
const part = '…'
const part2 = '…'
const part3 = '…'
const ageOf = '…'
const number2 = '…'
const marker2 = '…'
const part4 = '…'
const part5 = '…'
const part6 = '…'
const ageOf2 = '…'
const number3 = '…'
const marker3 = '…'
const part7 = '…'
const part8 = '…'
const part9 = '…'
const ageOf3 = '…'
const glyph2 = '…'
const count2 = '…'
const noMatch = '…'
const metaOf = '…'
return (
<Box flexDirection="column">
<Box borderStyle="round" borderColor="claude" paddingX={1}>
<Box flexShrink={0}>
<Text color="claude" bold>
{lead}
</Text>
</Box>
<Box>
<Input placeholder="write a note" value={`${draft}`} submitLabel="" autoFocus />
</Box>
<Box flexShrink={0}>
<Text color="claude">
{" "}
{captureLabel}
</Text>
</Box>
</Box>
<Box height={1} />
<Box flexDirection="column" flexShrink={0} overflow="hidden">
<Box flexDirection="column" flexShrink={0}>
<Box flexDirection="column">
<Box>
<Button plain dimColor label=" " />
<Text dimColor>
{glyph}
{" "}
{count}
{" more"}
</Text>
</Box>
<Box backgroundColor="subtle">
<Button plain label=" " />
<Text>
{" "}
</Text>
<Text color="claude" bold>
{number}
</Text>
<Text>
{" "}
{marker}
{" "}
</Text>
<Box>
<Text>
<Text bold color="claude">
{part}
</Text>
<Text bold color="claude">
{part2}
</Text>
<Text bold color="claude">
{part3}
</Text>
</Text>
</Box>
<Text>
{" "}
</Text>
<Text dimColor>
{ageOf}
</Text>
</Box>
<Box backgroundColor="subtle">
<Button plain label=" " />
<Text>
{" "}
</Text>
<Text color="claude" bold>
{number2}
</Text>
<Text>
{" "}
{marker2}
{" "}
</Text>
<Box>
<Text>
<Text bold color="claude">
{part4}
</Text>
<Text bold color="claude">
{part5}
</Text>
<Text bold color="claude">
{part6}
</Text>
</Text>
</Box>
<Text>
{" "}
</Text>
<Text dimColor>
{ageOf2}
</Text>
</Box>
<Box backgroundColor="subtle">
<Button plain label=" " />
<Text>
{" "}
</Text>
<Text color="claude" bold>
{number3}
</Text>
<Text>
{" "}
{marker3}
{" "}
</Text>
<Box>
<Text>
<Text bold color="claude">
{part7}
</Text>
<Text bold color="claude">
{part8}
</Text>
<Text bold color="claude">
{part9}
</Text>
</Text>
</Box>
<Text>
{" "}
</Text>
<Text dimColor>
{ageOf3}
</Text>
</Box>
<Box>
<Button plain dimColor label=" " />
<Text dimColor>
{glyph2}
{" "}
{count2}
{" more"}
</Text>
</Box>
</Box>
<Box flexDirection="column" paddingY={0}>
<Text>
{" "}
</Text>
<Text>
{" "}
</Text>
<Text>
{" "}
</Text>
<Box height={1} />
<Text dimColor>
{`${noMatch}`}
</Text>
</Box>
<Box>
<Select label="move to" />
</Box>
<Box flexDirection="column">
<Box height={1} />
<Text>
<Text dimColor>
▎
{" "}
</Text>
{" "}
</Text>
<Text>
<Text dimColor>
▎
{" "}
</Text>
{" "}
</Text>
<Text>
<Text dimColor>
▎
{" "}
</Text>
{" "}
</Text>
<Text dimColor>
▎
{" "}
{metaOf}
</Text>
</Box>
</Box>
</Box>
</Box>
)
})
}
The mod's own code
Shown under the mod's licence (MIT); its text is below. Keep the notice if you copy these lines.
plugin/hooks/register.tsx lines 1551–1593 · Band
on('ui.render', { component: 'AbovePrompt' }, async ($, e, next) => {
const below = await next(e)
if (e.props.hasSurvey) return below
const el = $.ui.resolve(e) as Elements['terminal']
const { Box } = el
const columns = e.props.bodyColumns
const run = (work: Promise<unknown>) => {
work.catch(error => reportStorage($, error))
}
const proposals = await proposalsOf($)
const opener = openerOf(project.name)
const look = { isWorking: e.props.isWorking, fresh: await read($, fresh) }
const handlers: BandHandlers = {
chip: (n, id) => run(serially(() => pocketChip($, n, id))),
keep: id => run(serially(() => keep($, [id]))),
keepAll: ids => run(serially(() => keep($, ids))),
open: () => serially(() => openPane($, 'browse')).catch(error => reportStorage($, error)),
}
let row: JSX.Element
if (proposals.length > 0) {
const hasHint = (await read($, harvest))?.turnId === (await read($, harvestHint))
row = (
<HarvestRow
el={el}
proposals={proposals}
harvest={harvestOf(proposals, columns, opener)}
look={look}
hasHint={hasHint}
columns={columns}
handlers={handlers}
/>
)
} else {
const all = pocketOptions.isOn ? Object.values(await read($, notes)) : []
row = <PocketRow el={el} pocket={pocketOf(all, project.key, pocketOptions.max, columns, opener)} opener={opener} look={look} handlers={handlers} />
}
return (
<Box flexDirection='column'>
{below}
{row}
</Box>
)
})plugin/hooks/register.tsx lines 1628–1653 · Pane
on('ui.render', { component: 'Pane', requestId: PANE }, async ($, e) => {
geometry.bodyRows = e.props.scroll.bodyRows
geometry.width = Math.max(20, e.props.bodyColumns - 1)
geometry.isInline = e.props.placement === 'inline'
geometry.isFocused = e.props.isFocused
const el = $.ui.resolve(e) as Elements['terminal']
const view = await viewOf($)
const run = (work: Promise<unknown>) => {
work.catch(error => reportStorage($, error))
}
// Typing goes straight to state; everything else waits its turn (serially).
const handlers: Handlers = {
action: action => run(serially(() => act($, action))),
digit: n => run(serially(() => digit($, n))),
pressSlot: slot => run(serially(() => pressSlot($, slot))),
searchInput: value => run(searchInput($, value)),
searchSubmit: value => run(serially(() => searchSubmit($, value))),
captureInput: value => run(setPane($, state => ({ ...state, capture: { ...state.capture, draft: value } }))),
captureSubmit: value => run(serially(() => captureSubmit($, value))),
editInput: value => run(setPane($, state => ({ ...state, edit: state.edit ? { ...state.edit, draft: value } : null }))),
editSubmit: value => run(serially(() => editSubmit($, value))),
editCancel: () => run(serially(() => act($, 'back'))),
moveTo: value => run(serially(() => moveTo($, value))),
}
return <Pane el={el} view={view} handlers={handlers} hasHub={hubOptions.url !== ''} hasHarvest={false} bundleRows={view.bundleRows} />
})plugin/src/ui/pane.tsx lines 684–744 · Pane
export const Pane = ({
el,
view,
handlers,
hasHub,
hasHarvest,
bundleRows,
}: {
el: E
view: PaneView
handlers: Handlers
hasHub: boolean
hasHarvest: boolean
bundleRows: number
}) => {
const { Box } = el
const { pane } = view
const hasNotes = view.lines.some(line => line.kind !== 'group')
const body = () => {
if (pane.mode === 'capture') return <Capture el={el} view={view} />
if (pane.mode === 'bundle') return <Bundle el={el} view={view} handlers={handlers} rows={bundleRows} />
// A storage problem's row stays above the no-match line.
if (isNoMatch(view)) return [view.lines.length > 0 && <Rows el={el} view={view} handlers={handlers} />, <NoMatch el={el} view={view} />]
if (view.lines.length === 0 && pane.query.trim() === '') return <Empty el={el} view={view} hasHub={hasHub} hasHarvest={hasHarvest} />
return <Rows el={el} view={view} handlers={handlers} />
}
const showPreview = hasPreview(view) && (pane.mode === 'browse' || pane.mode === 'sheet' || pane.mode === 'move' || pane.mode === 'edit') && hasNotes
const middle = [
body(),
pane.mode === 'move' && <Move el={el} view={view} handlers={handlers} />,
showPreview && (view.preview ? <Preview el={el} view={view} note={view.preview} /> : <Box height={PREVIEW_ROWS} />),
]
// With the key sheet up the pane takes the whole body and the footer its last row, so the sheet,
// paged to the rows between, never covers the footer or runs past a short inline pane. What it
// sits over is cut at those rows: in a short body the rows and the preview run taller than the
// room, and squeezed the footer out.
const isSheet = pane.mode === 'sheet'
const footerRows = view.isInline ? FOOTER_ROWS : 1 + FOOTER_ROWS
return (
<Box flexDirection='column' width={view.width} height={isSheet ? view.bodyRows : undefined}>
{pane.mode === 'bundle' ? null : pane.mode === 'capture' ? (
<CaptureRow el={el} view={view} handlers={handlers} />
) : (
<SearchRow el={el} view={view} handlers={handlers} />
)}
{pane.mode !== 'bundle' && !view.isInline && <Box height={1} />}
{isSheet ? (
<Box flexDirection='column' flexShrink={0} height={Math.max(0, view.bodyRows - sheetTop(view.isInline) - footerRows)} overflow='hidden'>
<Box flexDirection='column' flexShrink={0}>
{middle}
</Box>
</Box>
) : (
middle
)}
<Footer el={el} view={view} />
{isSheet && <KeySheet el={el} view={view} />}
<ActionLayer el={el} view={view} handlers={handlers} />
</Box>
)
}plugin/src/ui/pane.tsx lines 251–283 · Pane
const CaptureRow = ({ el, view, handlers }: { el: E; view: PaneView; handlers: Handlers }) => {
const { Box, Text, Input } = el
const isFramed = !view.isInline
const inner = view.width - (isFramed ? 4 : 0)
const lead = `${GLYPH.capture} ${TEXT.captureLabel} `
return (
<Box width={view.width} borderStyle={isFramed ? 'round' : undefined} borderColor={isFramed ? COLOUR.accent : undefined} paddingX={isFramed ? 1 : 0}>
<Box flexShrink={0}>
<Text color={COLOUR.accent} bold>
{lead}
</Text>
</Box>
{/* An explicit width: left to flex, the field's own "⏎ save" hint wraps onto a second row. */}
<Box width={Math.max(10, inner - cells(lead) - 1 - cells(cut(view.captureLabel, WIDTH.label)))}>
<Input
key={CAPTURE_KEY}
placeholder='write a note'
value={view.pane.capture.draft}
submitLabel=''
autoFocus
onInput={value => handlers.captureInput(value)}
onSubmit={value => handlers.captureSubmit(value)}
/>
</Box>
<Box flexShrink={0}>
<Text color={isFramed ? COLOUR.accent : undefined} dimColor={!isFramed}>
{' '}
{cut(view.captureLabel, WIDTH.label)}
</Text>
</Box>
</Box>
)
}plugin/src/ui/pane.tsx lines 222–247 · Pane
const SearchRow = ({ el, view, handlers }: { el: E; view: PaneView; handlers: Handlers }) => {
const { Box, Text, Input } = el
const isFocused = view.focus.kind === 'search' || view.focus.kind === 'empty'
const right = rightText(view, Math.max(10, Math.floor(view.width / 2)))
return (
<Box width={view.width}>
<Text color={isFocused ? COLOUR.accent : COLOUR.history} bold>
{GLYPH.search}{' '}
</Text>
{/* An explicit width, as capture's: left to flex, the field's "⏎ to list" wraps onto a second row. */}
<Box width={searchWidth(view)}>
<Input
key={SEARCH_KEY}
placeholder={TEXT.placeholder}
value={view.pane.query}
submitLabel={isNoMatch(view) ? '' : TEXT.toList}
autoFocus={view.pane.mode === 'browse' ? true : undefined}
onInput={value => handlers.searchInput(value)}
onSubmit={value => handlers.searchSubmit(value)}
/>
</Box>
<Box flexGrow={1} />
<Text dimColor> {right}</Text>
</Box>
)
}plugin/src/ui/pane.tsx lines 543–569 · Pane
const Capture = ({ el, view }: { el: E; view: PaneView }) => {
const { Box, Text } = el
const { capture } = view.pane
const keep = view.isInline ? WIDTH.savedInline : WIDTH.savedDocked
const draft = capture.draft.trim() === '' ? [] : draftLines(capture.draft, view.width, view.isInline ? 1 : WIDTH.previewLines)
return (
<Box flexDirection='column' paddingY={view.isInline ? 0 : 1}>
{draft.map(line => (
<Text>{line === '' ? ' ' : line}</Text>
))}
{draft.length > 0 && !view.isInline && <Box height={1} />}
{/* The newest save is bright; earlier ones step back. */}
{capture.saved.slice(-keep).map((text, i, saved) => (
<Text>
<Text color={i === saved.length - 1 ? COLOUR.saved : COLOUR.history}>{GLYPH.saved} </Text>
<Text dimColor={i !== saved.length - 1}>{cut(oneLine(text), view.width - 14)}</Text>
<Text dimColor> · just now</Text>
</Text>
))}
{capture.error !== null ? (
<Text color={COLOUR.problem}>{cut(capture.error, view.width)}</Text>
) : (
<Text dimColor>{TEXT.captureHint(view.captureLabel)}</Text>
)}
</Box>
)
}Licence text (MIT)
MIT License Copyright (c) 2026 gaius-codius 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 callsremembers
What its code shows
Read from the source at commit 81a653593a3e. 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.plugin/hooks/register.tsx |
| Parses | Every file parses as TypeScript or JavaScript.18 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).plugin/hooks/register.tsx:170 mkdir (not on Windows); plugin/hooks/register.tsx:173 mv (not on Windows); plugin/hooks/register.tsx:177 rm (not on Windows); plugin/hooks/register.tsx:210 mv (not on Windows); plugin/hooks/register.tsx:215 rm (not on Windows) |
| Network | Whether every fetch names its https host in the code.plugin/hooks/register.tsx:1245 fetch(url) |
| Programs | Whether every program it starts is named in the code and is not a shell, an interpreter or a network tool.plugin/hooks/register.tsx:228 sh (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, the prompt box 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).calls no tool, MCP server or command |
| 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.model.complete, model.fork (sends its own transcript), adds command jot, adds tool ? |
| 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: config.set, tool.call, command.run (jot), prompt.submit, session.append · reads: prompt.edit · also: session.start, session.end, ui.render (PromptHint, AbovePrompt, Pane), turn.start (+3) · timers: clock.after, clock.every |
| 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, OSTRAKON_DIR, COLORFGBG, CLAUDE_CONFIG_DIR; files: a path computed at run time, /etc/hostname, …/themes/….json; the prompt box |
| 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: ….….tmp, a path computed at run time; the prompt box; 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 gaius-codius/ostrakon/plugin install ostrakon@ostrakon/reload-pluginsThis installs the marketplace's latest commit, which may not be the one read here (81a653593a3e). 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/gaius-codius/ostrakongit -C ostrakon checkout 81a653593a3e4d1c3dc1721085fdf24d719c904aclaude plugin validate ostrakon/pluginclaude --plugin-dir ostrakon/pluginThe 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 "gaius-codius-ostrakon" with its code and make me one like itAdd the ModsCode MCP to Claude or ChatGPT
Similar mods
- agent-discoverkeshrath★ 7
- fanyijax★ 5
- mod-storehellosverre★ 4
- devtoolsNMenzel★ 2
- sc-toolboxSimpleCORE★ 2
- cockpitSyed Muhammad Hassaan★ 1
More from this repository
- spcgaius-codius★ 2
- spgallerygaius-codius★ 2
- spmockgaius-codius★ 2
- spwgaius-codius★ 2
- spxgaius-codius★ 2
- spx0gaius-codius★ 2
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/gaius-codius-ostrakon/)