ModsCode / Claude Code Mods / Ranking / folio
folio
Read the files of your project in a calm pane beside the chat.
What it does
- Draws a pane, toasts
- Adds /files
- Watches Edit, Write calls and can refuse them
- Hooks session.start, turn.complete, turn.start, ui.close and 1 more
- 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
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 folio by Krishna Goutham (pane, toast), as ModsCode read it from the mod's code:
// https://modscode.com/claude-mods/mods/krishna-goutham-tls-folio/
// 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: "Files" })
on('ui.render', { component: 'Pane', requestId: 'my-pane' }, async ($, e) => {
const { Box, Text, Button, Link } = $.ui.resolve(e)
const href = '…'
const text = '…'
const text2 = '…'
const text3 = '…'
const title = '…'
const mark = '…'
const name = '…'
const dot = '…'
const mark2 = '…'
const name2 = '…'
const dot2 = '…'
const mark3 = '…'
const name3 = '…'
const dot3 = '…'
return (
<Box flexDirection="row" overflow="hidden">
<Text>
{" "}
</Text>
<Box flexDirection="column" overflow="hidden">
<Box flexDirection="row" height={1} overflow="hidden">
<Button plain>
<Text color="inactive">
{`‹ `}
</Text>
</Button>
<Box>
<Text wrap="truncate-end">
<Link href={`${href}`}>
<Text>
{text}
</Text>
</Link>
<Link href={`${href}`}>
<Text>
{text2}
</Text>
</Link>
<Link href={`${href}`}>
<Text>
{text3}
</Text>
</Link>
</Text>
</Box>
<Text>
{" "}
</Text>
<Button plain>
<Text bold color="suggestion">
Read
</Text>
</Button>
<Text>
{" "}
</Text>
<Button plain>
<Text bold color="suggestion">
Source
</Text>
</Button>
</Box>
<Text color="subtle">
{" "}
</Text>
<Text>
{" "}
</Text>
<Box flexDirection="column" overflow="hidden" />
<Text>
{" "}
</Text>
<Box flexDirection="row" height={1} overflow="hidden">
<Box>
<Text color="subtle" wrap="truncate-end">
{" "}
</Text>
</Box>
<Button plain>
<Text color="inactive">
Reveal
</Text>
</Button>
<Text>
{" "}
</Text>
<Button plain>
<Text color="inactive">
Mention
</Text>
</Button>
<Text>
{" "}
</Text>
<Button plain>
<Text color="inactive">
Open
</Text>
</Button>
</Box>
</Box>
<Text>
{" "}
</Text>
│
<Box flexDirection="column" overflow="hidden">
<Box flexDirection="row" height={1} overflow="hidden">
<Box>
<Text bold wrap="truncate-end">
{` ${title}`}
</Text>
</Box>
<Button plain>
<Text color="subtle">
⇄
</Text>
</Button>
</Box>
<Text>
{" "}
</Text>
<Box>
<Button plain>
<Text color="suggestion">
▎
</Text>
{" "}
<Text color="inactive">
{mark}
</Text>
<Text>
{name}
</Text>
<Text color="claude">
{dot}
</Text>
</Button>
</Box>
<Box>
<Button plain>
<Text color="suggestion">
▎
</Text>
{" "}
<Text color="inactive">
{mark2}
</Text>
<Text>
{name2}
</Text>
<Text color="claude">
{dot2}
</Text>
</Button>
</Box>
<Box>
<Button plain>
<Text color="suggestion">
▎
</Text>
{" "}
<Text color="inactive">
{mark3}
</Text>
<Text>
{name3}
</Text>
<Text color="claude">
{dot3}
</Text>
</Button>
</Box>
<Text color="subtle">
{" This folder is empty."}
</Text>
</Box>
{" "}
</Box>
)
})
on('session.start', async ($, e, next) => {
const path = '…'
await $.ui.toast(`${path} is not in this project`)
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.
folio/hooks/register.tsx lines 500–630 · Pane
on('ui.render', { component: 'Pane', requestId: PANE }, async ($, e, next) => {
if (isIdle) {
return next(e)
}
const el = $.ui.resolve(e)
const { Box, Text } = el
try {
const base = await rootOf($)
const state = await read($, ui)
const written = await read($, touched)
if (state.tick !== seenTick) {
forget()
seenTick = state.tick
}
const columns = Math.max(24, e.props.bodyColumns)
const rows = Math.max(8, e.props.scroll.bodyRows)
const isSplit = columns >= SPLIT_FROM
const treeWidth = isSplit ? clamp(Math.round(columns * 0.29), 26, 38) : columns
const isTreeRight = isSplit && state.side === 'right'
const frame: Frame = {
columns,
rows,
isSplit,
isTreeRight,
treeWidth,
// Beside the text: the tree, the line between them and the two thumbs, or one margin and a thumb.
textWidth: Math.max(8, isSplit ? columns - treeWidth - 5 : columns - 3),
treeRows: rows - 2,
docRows: rows - 5,
}
const nodes = await treeNodes($, new Set(state.expanded))
const treeMax = Math.max(0, nodes.length - frame.treeRows)
let treeTop = clamp(state.treeTop, 0, treeMax)
if (reveal !== '') {
const at = nodes.findIndex(node => node.rel === reveal)
if (at !== -1 && (at < treeTop || at >= treeTop + frame.treeRows)) {
treeTop = clamp(at - Math.floor(frame.treeRows / 3), 0, treeMax)
}
reveal = ''
}
const isSource = state.mode === 'source' && hasTwoForms(baseOf(state.selected))
const doc =
state.selected === ''
? undefined
: await loadDoc($, {
root: base,
path: state.selected,
isSource,
isRevealed: state.revealed.includes(state.selected),
columns: frame.textWidth,
measure: MEASURE,
rows: frame.docRows,
now: await $.clock.now(),
})
const docMax = doc === undefined || doc.picture !== undefined ? 0 : Math.max(0, doc.rows.length - frame.docRows)
const docTop = clamp(state.docTop, 0, docMax)
Object.assign(drawn, {
isSplit,
isReading: state.selected !== '',
treeFrom: isTreeRight ? columns - treeWidth - 1 : 0,
treeTo: isTreeRight ? columns : treeWidth,
treeTop,
treeMax,
docTop,
docMax,
})
const change = (step: (state: FolioUi) => FolioUi) => {
void update($, ui, step).then(() => keep($))
}
const actions: Actions = {
toggle: path =>
change(now => ({
...now,
expanded: now.expanded.includes(path) ? now.expanded.filter(open => open !== path) : [...now.expanded, path],
})),
open: path => change(now => ({ ...now, selected: path, docTop: 0 })),
back: () => change(now => ({ ...now, selected: '' })),
mode: (mode: FolioMode) => change(now => ({ ...now, mode, docTop: 0 })),
reveal: () => change(now => ({ ...now, revealed: [...now.revealed, state.selected] })),
mention: () => {
void $.prompt.fill({ text: `@${state.selected} `, mode: 'insert' })
},
outside: () => {
void $.process.run(['open', `${base}/${state.selected}`], { timeoutMs: 10_000 }).catch(() => undefined)
},
swap: () => {
void update($, ui, (now): FolioUi => ({ ...now, side: now.side === 'right' ? 'left' : 'right' })).then(now => $.store.set('side', now.side))
},
follow: href => {
const path = resolve(dirOf(state.selected), href)
void show($, path).then(isShown => {
if (!isShown) {
$.ui.toast(`${path} is not in this project`)
}
})
},
}
return drawPane(e.surface === 'terminal' ? $.ui.resolve(e) : el, {
frame,
title: baseOf(base) || base,
nodes,
treeTop,
selected: state.selected,
touched: new Set(written),
touchedFolders: new Set(written.flatMap(path => ancestors(path))),
doc,
docTop,
mode: isSource ? 'source' : 'read',
on: actions,
})
} catch (error) {
return (
<Box flexDirection="column">
<Text bold>The files pane could not draw.</Text>
<Text dimColor>{String(error instanceof Error ? error.message : error).slice(0, 300)}</Text>
</Box>
)
}
})folio/hooks/view.tsx lines 425–471 · Pane
export const drawPane = (el: El, props: PaneProps): RenderElement => {
const { Box, Text } = el
const { frame, doc } = props
const docTotal = doc === undefined || doc.picture !== undefined ? 0 : doc.rows.length
const docRail = (rest: string) => rail(el, frame.rows, 3, frame.docRows, docTotal, props.docTop, rest)
const treeRail = (rest: string) => rail(el, frame.rows, 2, frame.treeRows, props.nodes.length, props.treeTop, rest)
if (!frame.isSplit) {
if (props.selected === '') {
return tree(el, props)
}
return (
<Box flexDirection="row" width={frame.columns} height={frame.rows} overflow="hidden">
<Text> </Text>
{reader(el, props)}
<Text> </Text>
{docRail(' ')}
</Box>
)
}
// The line between the two parts carries the thumb of the part on its left.
if (frame.isTreeRight) {
return (
<Box flexDirection="row" width={frame.columns} height={frame.rows} overflow="hidden">
<Text> </Text>
{reader(el, props)}
<Text>{' '}</Text>
{docRail('│')}
{tree(el, props)}
{treeRail(' ')}
</Box>
)
}
return (
<Box flexDirection="row" width={frame.columns} height={frame.rows} overflow="hidden">
{tree(el, props)}
{treeRail('│')}
<Text>{' '}</Text>
{reader(el, props)}
<Text> </Text>
{docRail(' ')}
</Box>
)
}folio/hooks/view.tsx lines 124–149 · Pane
const tree = (el: El, props: PaneProps): RenderElement => {
const { Box, Text, Button } = el
const { frame } = props
const cells = frame.treeWidth
const shown = props.nodes.slice(props.treeTop, props.treeTop + frame.treeRows)
return (
<Box flexDirection="column" width={cells} height={frame.rows} overflow="hidden">
<Box key="tree-head" flexDirection="row" width={cells} height={1} overflow="hidden">
<Box width={Math.max(1, cells - 3)}>
<Text bold wrap="truncate-end">
{` ${truncate(props.title, cells - 5)}`}
</Text>
</Box>
{props.frame.isSplit ? (
<Button key="swap" plain hover={{ inverse: false, color: C.accent }} onPress={() => props.on.swap()}>
<Text color={C.faint}>⇄</Text>
</Button>
) : null}
</Box>
{empty(el)}
{shown.map(node => treeRow(el, props, node, cells))}
{shown.length === 0 ? <Text color={C.faint}>{' This folder is empty.'}</Text> : null}
</Box>
)
}folio/hooks/view.tsx lines 81–81 · Pane
const empty = (el: El): RenderElement => <el.Text> </el.Text>folio/hooks/view.tsx lines 85–122 · Pane
const treeRow = (el: El, props: PaneProps, node: Node, cells: number): RenderElement => {
const { Box, Text, Button } = el
const indent = ' '.repeat(Math.min(node.depth, 12))
if (node.isEmpty) {
return (
<Text color={C.faint} wrap="truncate-end">
{` ${indent}empty`}
</Text>
)
}
const isOpenFile = !node.isDir && node.rel === props.selected
const room = Math.max(4, cells - 4 - indent.length)
const name = pad(truncateMiddle(node.name, room), room)
const mark = node.isDir ? (node.isOpen ? '▾ ' : '▸ ') : ' '
const dot = props.touched.has(node.rel) ? '●' : node.isDir && !node.isOpen && props.touchedFolders.has(node.rel) ? '•' : ' '
const isQuiet = node.name.startsWith('.')
return (
<Box key={`row:${node.rel}`} width={cells} {...(isOpenFile ? { backgroundColor: C.fill } : {})}>
<Button
key={`node:${node.rel}`}
plain
hover={SOFT}
onPress={() => (node.isDir ? props.on.toggle(node.rel) : props.on.open(node.rel))}
>
{isOpenFile ? <Text color={C.accent}>▎</Text> : ' '}
{indent}
{node.isDir ? <Text color={C.muted}>{mark}</Text> : mark}
<Text {...(isOpenFile ? { bold: true } : {})} {...(isQuiet && !isOpenFile ? { color: C.muted } : {})}>
{name}
</Text>
{dot === ' ' ? ' ' : <Text color={C.touched}>{dot}</Text>}
</Button>
</Box>
)
}folio/hooks/view.tsx lines 406–422 · Pane
const reader = (el: El, props: PaneProps): RenderElement => {
const { Box, Text } = el
const { frame, doc } = props
const cells = frame.textWidth
const isBare = doc === undefined && frame.isSplit
return (
<Box flexDirection="column" width={cells} height={frame.rows} overflow="hidden">
{isBare ? empty(el) : header(el, props, cells)}
<Text color={C.faint}>{isBare ? ' ' : '─'.repeat(cells)}</Text>
{empty(el)}
{body(el, props, cells, frame.docRows)}
{empty(el)}
{footer(el, props, cells)}
</Box>
)
}Licence text (MIT)
MIT License Copyright (c) 2026 Krishna Goutham 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
runs programsreads filesenv varstool callsremembers
What its code shows
Read from the source at commit 2358dba651cf on 2026-10-11. 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.folio/hooks/register.tsx |
| Parses | Every file parses as TypeScript or JavaScript.8 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).folio/hooks/register.tsx:170 sips (not on Windows); folio/hooks/register.tsx:193 mkdir (not on Windows); folio/hooks/register.tsx:200 sips (not on Windows); folio/hooks/register.tsx:211 mv (not on Windows); folio/hooks/register.tsx:593 open (not on Windows) |
| 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.sips, mkdir, qlmanage, mv, open (reaches the network) |
| 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).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.adds command files |
| 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 (files), tool.call (Edit, Write) · also: session.start, ui.close, ui.scroll, turn.start (+2) |
| 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: TMPDIR, FOLIO_HOME; files: a path computed at run time, …/… |
| 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.env: FOLIO_HOME; the prompt box |
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 krishna-goutham-tls/cc-mods/plugin install folio@cc-mods/reload-pluginsThis installs the marketplace's latest commit, which may not be the one read here (2358dba651cf). 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/krishna-goutham-tls/cc-modsgit -C cc-mods checkout 2358dba651cfee487f5342068e370f82fd1477c0claude plugin validate cc-mods/folioclaude --plugin-dir cc-mods/folioThe 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 about it
With the ModsCode connector added, Claude can read this mod's code and what it reaches, and build on them. Ask it like this:
Read the ModsCode mod "krishna-goutham-tls-folio" with its code and make me one like itSearch them from Claude: the MCP connector
Similar mods
- session-inboxpetekp★ 47
- show-your-workUmer Ansari★ 24
- explain-asSumit Paul★ 20
- uploadsBuild Internet★ 18
- breadcrumbsKOZMOS★ 9
- batonAshish S Kumar★ 5
More from 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/krishna-goutham-tls-folio/)