ModsCode / Claude Code Mods / Ranking / huh
huh
/huh opens Claude's last answer in the sidebar, rewritten to be easy to read (a short summary first, clear sections, lists), with the original one click away.
What it does
- Draws a pane
- Hooks session.start
- Keeps its own state between turns
- Starts processes
Good points
- No network calls
- Written in TypeScript
- Has a desktop-specific branch
- Writes no files
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 huh by omeerdvrn (pane), as ModsCode read it from the mod's code:
// https://modscode.com/claude-mods/mods/omeerdvrn-huh/
// 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: "Reader" })
on('ui.render', { component: 'Pane', requestId: 'my-pane' }, async ($, e) => {
const { Box, Button, Text } = $.ui.resolve(e)
const pageLabel = '…'
const children = '…'
const text = '…'
const text2 = '…'
const text3 = '…'
const text4 = '…'
const text5 = '…'
const text6 = '…'
const at = '…'
const text7 = '…'
const text8 = '…'
const text9 = '…'
const text10 = '…'
const text11 = '…'
const text12 = '…'
const text13 = '…'
const text14 = '…'
const text15 = '…'
const text16 = '…'
const text17 = '…'
const text18 = '…'
const text19 = '…'
const text20 = '…'
const text21 = '…'
const text22 = '…'
const text23 = '…'
const text24 = '…'
const text25 = '…'
const text26 = '…'
const text27 = '…'
const text28 = '…'
const text29 = '…'
const text30 = '…'
const text31 = '…'
const text32 = '…'
const text33 = '…'
const text34 = '…'
const text35 = '…'
const text36 = '…'
const text37 = '…'
const text38 = '…'
const text39 = '…'
const text40 = '…'
const text41 = '…'
const text42 = '…'
const text43 = '…'
const text44 = '…'
const text45 = '…'
const text46 = '…'
const text47 = '…'
const text48 = '…'
const text49 = '…'
const text50 = '…'
const text51 = '…'
const text52 = '…'
const text53 = '…'
const text54 = '…'
const text55 = '…'
const text56 = '…'
const text57 = '…'
const text58 = '…'
const text59 = '…'
const text60 = '…'
const text61 = '…'
const text62 = '…'
const text63 = '…'
const text64 = '…'
const text65 = '…'
const text66 = '…'
const text67 = '…'
const text68 = '…'
const text69 = '…'
const text70 = '…'
const text71 = '…'
const text72 = '…'
const text73 = '…'
const text74 = '…'
const text75 = '…'
const text76 = '…'
const text77 = '…'
const text78 = '…'
const text79 = '…'
const text80 = '…'
const text81 = '…'
const text82 = '…'
const text83 = '…'
const text84 = '…'
const text85 = '…'
const text86 = '…'
const text87 = '…'
return (
<Box flexDirection="column" rowGap={1}>
<Box flexDirection="row" flexWrap="wrap" columnGap={2}>
<Button label="Show original" plain />
<Button label={`${pageLabel} → ${pageLabel}`} plain />
</Box>
<Box flexDirection="column" rowGap={1} paddingY={1}>
<Box flexDirection="column">
<Text>
{children}
</Text>
</Box>
<Box borderStyle="round" paddingX={1}>
<Text wrap="wrap">
<Text>
{text}
</Text>
<Text>
{text2}
</Text>
<Text>
{text3}
</Text>
</Text>
</Box>
<Box flexDirection="column" rowGap={1}>
<Box flexDirection="column" marginTop={1}>
<Text bold wrap="wrap">
<Text>
{text4}
</Text>
<Text>
{text5}
</Text>
<Text>
{text6}
</Text>
</Text>
{`${at}-rule`}
</Box>
<Box flexDirection="column" rowGap={1}>
<Box flexDirection="row" columnGap={2}>
<Box flexGrow={1} flexShrink={1}>
<Text wrap="wrap">
<Text>
{text7}
</Text>
<Text>
{text8}
</Text>
<Text>
{text9}
</Text>
</Text>
</Box>
<Box flexGrow={1} flexShrink={1}>
<Text wrap="wrap">
<Text>
{text10}
</Text>
<Text>
{text11}
</Text>
<Text>
{text12}
</Text>
</Text>
</Box>
<Box flexGrow={1} flexShrink={1}>
<Text wrap="wrap">
<Text>
{text13}
</Text>
<Text>
{text14}
</Text>
<Text>
{text15}
</Text>
</Text>
</Box>
</Box>
<Box flexDirection="row" columnGap={2}>
<Box flexGrow={1} flexShrink={1}>
<Text wrap="wrap">
<Text>
{text16}
</Text>
<Text>
{text17}
</Text>
<Text>
{text18}
</Text>
</Text>
</Box>
<Box flexGrow={1} flexShrink={1}>
<Text wrap="wrap">
<Text>
{text19}
</Text>
<Text>
{text20}
</Text>
<Text>
{text21}
</Text>
</Text>
</Box>
<Box flexGrow={1} flexShrink={1}>
<Text wrap="wrap">
<Text>
{text22}
</Text>
<Text>
{text23}
</Text>
<Text>
{text24}
</Text>
</Text>
</Box>
</Box>
<Box flexDirection="row" columnGap={2}>
<Box flexGrow={1} flexShrink={1}>
<Text wrap="wrap">
<Text>
{text25}
</Text>
<Text>
{text26}
</Text>
<Text>
{text27}
</Text>
</Text>
</Box>
<Box flexGrow={1} flexShrink={1}>
<Text wrap="wrap">
<Text>
{text28}
</Text>
<Text>
{text29}
</Text>
<Text>
{text30}
</Text>
</Text>
</Box>
<Box flexGrow={1} flexShrink={1}>
<Text wrap="wrap">
<Text>
{text31}
</Text>
<Text>
{text32}
</Text>
<Text>
{text33}
</Text>
</Text>
</Box>
</Box>
</Box>
</Box>
<Box flexDirection="column" rowGap={1}>
<Box flexDirection="column" marginTop={1}>
<Text bold wrap="wrap">
<Text>
{text34}
</Text>
<Text>
{text35}
</Text>
<Text>
{text36}
</Text>
</Text>
{`${at}-rule`}
</Box>
<Box flexDirection="column" rowGap={1}>
<Box flexDirection="row" columnGap={2}>
<Box flexGrow={1} flexShrink={1}>
<Text wrap="wrap">
<Text>
{text37}
</Text>
<Text>
{text38}
</Text>
<Text>
{text39}
</Text>
</Text>
</Box>
<Box flexGrow={1} flexShrink={1}>
<Text wrap="wrap">
<Text>
{text40}
</Text>
<Text>
{text41}
</Text>
<Text>
{text42}
</Text>
</Text>
</Box>
<Box flexGrow={1} flexShrink={1}>
<Text wrap="wrap">
<Text>
{text43}
</Text>
<Text>
{text44}
</Text>
<Text>
{text45}
</Text>
</Text>
</Box>
</Box>
<Box flexDirection="row" columnGap={2}>
<Box flexGrow={1} flexShrink={1}>
<Text wrap="wrap">
<Text>
{text46}
</Text>
<Text>
{text47}
</Text>
<Text>
{text48}
</Text>
</Text>
</Box>
<Box flexGrow={1} flexShrink={1}>
<Text wrap="wrap">
<Text>
{text49}
</Text>
<Text>
{text50}
</Text>
<Text>
{text51}
</Text>
</Text>
</Box>
<Box flexGrow={1} flexShrink={1}>
<Text wrap="wrap">
<Text>
{text52}
</Text>
<Text>
{text53}
</Text>
<Text>
{text54}
</Text>
</Text>
</Box>
</Box>
<Box flexDirection="row" columnGap={2}>
<Box flexGrow={1} flexShrink={1}>
<Text wrap="wrap">
<Text>
{text55}
</Text>
<Text>
{text56}
</Text>
<Text>
{text57}
</Text>
</Text>
</Box>
<Box flexGrow={1} flexShrink={1}>
<Text wrap="wrap">
<Text>
{text58}
</Text>
<Text>
{text59}
</Text>
<Text>
{text60}
</Text>
</Text>
</Box>
<Box flexGrow={1} flexShrink={1}>
<Text wrap="wrap">
<Text>
{text61}
</Text>
<Text>
{text62}
</Text>
<Text>
{text63}
</Text>
</Text>
</Box>
</Box>
</Box>
</Box>
<Box flexDirection="column" rowGap={1}>
<Box flexDirection="column" marginTop={1}>
<Text bold wrap="wrap">
<Text>
{text64}
</Text>
<Text>
{text65}
</Text>
<Text>
{text66}
</Text>
</Text>
{`${at}-rule`}
</Box>
<Box flexDirection="column" rowGap={1}>
<Box flexDirection="row" columnGap={2}>
<Box flexGrow={1} flexShrink={1}>
<Text wrap="wrap">
<Text>
{text67}
</Text>
<Text>
{text68}
</Text>
<Text>
{text69}
</Text>
</Text>
</Box>
<Box flexGrow={1} flexShrink={1}>
<Text wrap="wrap">
<Text>
{text70}
</Text>
<Text>
{text71}
</Text>
<Text>
{text72}
</Text>
</Text>
</Box>
<Box flexGrow={1} flexShrink={1}>
<Text wrap="wrap">
<Text>
{text73}
</Text>
<Text>
{text74}
</Text>
<Text>
{text75}
</Text>
</Text>
</Box>
</Box>
<Box flexDirection="row" columnGap={2}>
<Box flexGrow={1} flexShrink={1}>
<Text wrap="wrap">
<Text>
{text76}
</Text>
<Text>
{text77}
</Text>
<Text>
{text78}
</Text>
</Text>
</Box>
<Box flexGrow={1} flexShrink={1}>
<Text wrap="wrap">
<Text>
{text79}
</Text>
<Text>
{text80}
</Text>
<Text>
{text81}
</Text>
</Text>
</Box>
<Box flexGrow={1} flexShrink={1}>
<Text wrap="wrap">
<Text>
{text82}
</Text>
<Text>
{text83}
</Text>
<Text>
{text84}
</Text>
</Text>
</Box>
</Box>
<Box flexDirection="column" marginTop={1}>
<Text bold wrap="wrap">
<Text>
{text85}
</Text>
<Text>
{text86}
</Text>
<Text>
{text87}
</Text>
</Text>
{`${at}-rule`}
</Box>
</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.
mods/huh/hooks/register.tsx lines 218–377 · Pane
on('ui.render', { component: 'Pane', requestId: PANE }, async ($, e) => {
const { Box, Text, Button, Markdown, Image } = $.ui.resolve(e)
const current = await read($, reading)
const setting = await read($, page)
const colors = PALETTES[setting]
const bg = colors.background
if (current === null) return <Text color={colors.muted} wrap="wrap">Run /huh to open Claude's last answer here, made easy to read.</Text>
const shown = await read($, version)
const markdown = shown === 'readable' && current.readable ? current.readable : current.original
if (Math.abs(e.props.bodyColumns - columns) >= 6) {
columns = e.props.bodyColumns
void typesetPage($).catch(() => undefined)
}
const margin = bg ? 1 : 0
const width = Math.max(20, e.props.bodyColumns - margin * 2)
const gap = 1
// The terminal's own colors read best through the engine's Markdown, as Claude's replies do; the pages
// keep every color their own, so their text is drawn here.
const native = setting === 'terminal' && Markdown !== undefined
// Every piece of text carries the page's colors, so the page reads as one sheet in any terminal.
const T = (props: { children: unknown; color?: string; bold?: boolean; wrap?: 'wrap'; key?: string }) => (
<Text key={props.key} color={props.color ?? colors.text} backgroundColor={bg} bold={props.bold} wrap={props.wrap}>
{props.children as never}
</Text>
)
const inline = (parts: Span[], color?: string) =>
parts.map(part => <Text color={part.code ? colors.code : color ?? colors.text} backgroundColor={bg} bold={part.bold}>{part.text}</Text>)
const nextPage = PAGES[(PAGES.indexOf(setting) + 1) % PAGES.length]!
const pageLabel = { light: 'Light page', dark: 'Dark page', terminal: 'Terminal colors' }
const toolbar = (
<Box flexDirection="row" flexWrap="wrap" columnGap={2}>
{current.state === 'ready' && (
<Button
key="toggle"
label={shown === 'readable' ? 'Show original' : 'Show readable'}
plain
onPress={async () => {
await update($, version, value => (value === 'readable' ? 'original' : 'readable'))
void typesetPage($).catch(() => undefined)
}}
/>
)}
<Button
key="page"
label={`${pageLabel[setting]} → ${pageLabel[nextPage].toLowerCase()}`}
plain
onPress={async () => {
await update($, page, () => nextPage)
await $.store.set(PAGE_KEY, nextPage)
void typesetPage($).catch(() => undefined)
}}
/>
</Box>
)
const status =
current.state === 'rewriting'
? T({ color: colors.accent, children: 'Making it easier to read… the original is below until then.' })
: current.state === 'failed'
? T({ color: '#d1242f', wrap: 'wrap', children: `Could not make a readable version (${current.problem}). Showing the original.` })
: T({ color: colors.muted, children: shown === 'readable' ? 'Rewritten for reading; same content.' : 'As Claude wrote it.' })
const rule = (at: string) => T({ key: at, color: colors.edge, children: '─'.repeat(Math.min(width, 32)) })
/** A heading: section headings bold in the accent with a rule under them, smaller ones bold. */
const heading = (text: string, level: number, at: string) => {
const major = level <= 2
return (
<Box key={at} flexDirection="column" marginTop={major ? 1 : 0}>
<Text bold color={major ? colors.accent : colors.text} backgroundColor={bg} wrap="wrap">{inline(spansOf(text), major ? colors.accent : undefined)}</Text>
{major && rule(`${at}-rule`)}
</Box>
)
}
/** A section's body: the engine's Markdown on terminal colors, else drawn block by block for the page. */
const body = (text: string, at: string) => {
if (text.trim() === '') return null
if (native) return <Markdown key={at} text={text} />
return (
<Box key={at} flexDirection="column" rowGap={gap}>
{blocks(text).map((block, index) => {
const key = `${at}-${index}`
switch (block.kind) {
case 'heading':
return heading(block.spans.map(span => span.text).join(''), block.level, key)
case 'paragraph':
return <Text key={key} backgroundColor={bg} wrap="wrap">{inline(block.spans)}</Text>
case 'item':
return (
<Box key={key} flexDirection="row" paddingLeft={block.depth * 2} columnGap={1}>
<Box flexShrink={0}>{T({ color: colors.accent, children: block.marker })}</Box>
<Text backgroundColor={bg} wrap="wrap">{inline(block.spans)}</Text>
</Box>
)
case 'code':
return (
<Box key={key} flexDirection="column" borderStyle="single" borderColor={colors.edge} paddingX={1} backgroundColor={bg}>
{block.lines.map((line, row) => T({ key: `${key}-${row}`, color: colors.block, wrap: 'wrap', children: line || ' ' }))}
</Box>
)
case 'quote':
return (
<Box key={key} flexDirection="row" columnGap={1}>
{T({ color: colors.edge, children: '│' })}
<Text backgroundColor={bg} wrap="wrap">{inline(block.spans, colors.muted)}</Text>
</Box>
)
case 'row':
return (
<Box key={key} flexDirection="row" columnGap={2}>
{block.cells.map((cell, column) => (
<Box key={`${key}-${column}`} flexGrow={1} flexShrink={1}>
<Text bold={block.isHeader} backgroundColor={bg} wrap="wrap">{inline(cell, block.isHeader ? colors.accent : undefined)}</Text>
</Box>
))}
</Box>
)
default:
return rule(key)
}
})}
</Box>
)
}
// The typeset page: picture strips one under another, the pane scrolling through them.
const set = await read($, typeset)
const want = await wanted($)
if (e.surface === 'terminal' && Image !== undefined && set !== null && want !== null && set.key === want.key) {
return (
<Box flexDirection="column" rowGap={1}>
{toolbar}
{current.state !== 'ready' && status}
<Box flexDirection="column">
{set.strips.map((strip, index) => (
<Image
key={`strip-${index}`}
source={{ file: strip, format: 'png' }}
columns={columns}
rows={Math.max(1, Math.round(set.heights[index]! / cell.height))}
alt={index === 0 ? current.title : ' '}
/>
))}
</Box>
</Box>
)
}
const parts = sections(markdown)
// The buttons sit above the page, on the terminal's own colors: a button draws in the theme's colors,
// which would fade on a light page.
return (
<Box flexDirection="column" rowGap={1}>
{toolbar}
<Box flexDirection="column" rowGap={gap} backgroundColor={bg} paddingX={margin} paddingY={bg ? 1 : 0}>
<Box flexDirection="column">
{T({ bold: true, color: colors.accent, wrap: 'wrap', children: current.title })}
{status}
</Box>Licence text (MIT)
MIT License Copyright (c) 2026 omeerdvrn and o-mods contributors 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), Keep state with $.store
What its code calls
runs programsenv varsdrives Clauderemembers
What its code shows
Read from the source at commit 1ec0b1fdcf01. 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.mods/huh/hooks/register.tsx |
| Parses | Every file parses as TypeScript or JavaScript.2 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; parts are terminal-only: the Image element |
| 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.mods/huh/hooks/register.tsx:97 python3 (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, the transcript, but reaches nothing outside |
| 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.1 command: text only |
| 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, adds command huh |
| 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: command.run · also: session.start, ui.render (Pane) |
| 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: CLAUDE_CODE_FORCE_TERMINAL_IM…, KITTY_WINDOW_ID, TERM_PROGRAM; the transcript |
| 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.writes no files, environment variables, settings or conversation rows |
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 omeerdvrn/o-mods/plugin install huh@o-mods/reload-pluginsThis installs the marketplace's latest commit, which may not be the one read here (1ec0b1fdcf01). 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/omeerdvrn/o-modsgit -C o-mods checkout 1ec0b1fdcf01f962ecf441e38f02e506ead32890claude plugin validate o-mods/mods/huhclaude --plugin-dir o-mods/mods/huhThe 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 "omeerdvrn-huh" with its code and make me one like itAdd the ModsCode MCP to Claude or ChatGPT
Similar mods
- codev-spikeCodev★ 289
- intenticintentic★ 81
- cscs★ 47
- modtestdstoic★ 20
- stoadstoic★ 20
- qa-guideaieo-product★ 11
More from this repository
- faahomeerdvrn★ 0
- heatomeerdvrn★ 0
- linearomeerdvrn★ 0
- personaomeerdvrn★ 0
- pr-statusomeerdvrn★ 0
- scenesomeerdvrn★ 0
See all 12 mods in this repository
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/omeerdvrn-huh/)