modscode JA

modscode / Gallery / file-explorer

file-explorer

A VS Code-style file explorer pane: tree, git decorations, preview and @-mention

Code you can checkTerminal + desktopPaneToastBoxButtonInputText

What it does

  • Draws a pane, toasts
  • Adds /files, /quote, /ref, /search
  • Watches tool calls and can refuse them
  • Hooks prompt.submit, session.start, ui.scroll
  • Keeps its own state between turns

Good points

  • No network calls
  • Written in TypeScript
  • Has a desktop-specific branch
  • Handles errors

Code to start from

Two kinds: a starter modscode writes from the design above, and the lines of the mod's own code that draw it.

Starter (register.tsx)

register.tsx
import type { Register } from 'claude-code'

// Drawn like file-explorer by tak-kam (pane, toast), as modscode read it from the mod's code:
// https://modscode.com/gallery/tak-kam-file-explorer/
// 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: "‹baseName›" })
  on('ui.render', { component: 'Pane', requestId: 'my-pane' }, async ($, e) => {
    const { Box, Text, Button, Input } = $.ui.resolve(e)
    const baseName = '…'
    const label = '…'
    const from = '…'
    const path = '…'
    const letter = '…'
    const value = '…'
    const note = '…'
    const pick = '…'
    return (
      <Box flexDirection="row">
        <Box flexDirection="column">
          <Box flexDirection="row" justifyContent="space-between">
            <Text bold>
              {baseName}
            </Text>
            <Box flexDirection="row" gap={1}>
              <Button label="follow" plain dimColor />
              <Button label="↻" plain />
              <Button label="⊟" plain />
              <Button label="@" plain />
            </Box>
          </Box>
          <Box flexDirection="row" gap={1} />
          <Box flexDirection="row" gap={1} />
          <Box flexDirection="row" gap={1} />
          <Box flexDirection="row" gap={1}>
            <Text dimColor>
              vs
            </Text>
            <Button label={`${label}`} plain />
          </Box>
          <Input placeholder="ref or a..b (empty = HEAD)" />
          <Box flexDirection="column">
            <Box flexDirection="row" gap={1}>
              <Button label="Name" plain dimColor />
              <Button label="Text" plain dimColor />
              <Button label="Aa" plain dimColor />
              <Button label=".*" plain dimColor />
            </Box>
            <Input placeholder="text in files (Enter)" />
            <Text dimColor>
              ripgrep, ignore files honoured
            </Text>
          </Box>
        </Box>
        <Box width={1} marginRight={1}>
          <Text dimColor>
            {from}
          </Text>
        </Box>
        <Box flexDirection="column" flexGrow={1}>
          <Text bold>
            {path}
          </Text>
          <Box flexDirection="row" gap={1} />
          <Box flexDirection="row" gap={1} />
          <Box flexDirection="row" gap={1} />
          <Text dimColor>
            <Text color="yellow">
              {letter}
            </Text>
            {value}
          </Text>
          <Text dimColor>
            {note}
          </Text>
          <Text color="blue">
            {`at ${pick}`}
          </Text>
        </Box>
      </Box>
    )
  })

  on('session.start', async ($, e, next) => {
    const name = '…'
    await $.ui.toast(`No main or master branch to compare with`)
    await $.ui.toast(`Not a ref: ${name}`)
    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.

file-explorer/hooks/register.tsx lines 2335–2355 · Pane
  on('ui.render', { component: 'Pane', requestId: EXPLORER }, async ($, e) => {
    const els = $.ui.resolve(e)
    const { Box, Text } = els
    const Input = e.surface === 'mobile' ? undefined : $.ui.resolve(e).Input
    const width = Math.max(20, e.props.bodyColumns)
    const rows = Math.max(8, e.props.scroll.bodyRows)
    layout.isSplit = width >= SPLIT_MIN_COLUMNS
    if (!layout.isSplit) return drawSidebar($, els, Input, width, undefined)

    const sidebar = clamp(Math.floor(width * 0.32), 26, 44)
    layout.sidebarColumns = sidebar
    return (
      <Box flexDirection="row">
        {await drawSidebar($, els, Input, sidebar, rows)}
        <Box width={1} marginRight={1}>
          <Text dimColor>{Array.from({ length: rows }, () => '│').join('\n')}</Text>
        </Box>
        {await drawPreview($, els, width - sidebar - 2, rows, false, e.surface)}
      </Box>
    )
  })
file-explorer/hooks/register.tsx lines 1285–1444 · Pane
async function drawSidebar(
  $: EngineInterface,
  els: Elements,
  Input: InputElement,
  width: number,
  rows: number | undefined,
): Promise<RenderElement> {
  const { Box, Text, Button } = els
  const dir = await read($, root)
  const current = await read($, view)
  const list = await read($, changes)
  const edited = new Set(await read($, touched))
  const chosen = await read($, selected)
  const against = await read($, base)

  let lines: { key: string; node: () => RenderElement }[] = []
  const isHidingIgnored = await read($, hideIgnored)
  // The tabs and the list's scroll Buttons, measured and packed into rows
  // that fit the sidebar: a Button pushed off the edge loses its hotkey.
  const isRoomy = width >= 44
  type Tab = { key: string; cells: number; draw: () => RenderElement }
  const tab = (key: ExplorerView, label: string, hotkey: string): Tab => ({
    key,
    cells: buttonCells(label, true),
    draw: () => (
      <Button key={`tab:${key}`} label={label} plain hotkey={hotkey} dimColor={current === key ? undefined : true}
        onPress={async () => {
          await update($, view, () => key)
          // The search tab is for typing: its field takes the focus, and only then.
          if (key === 'search') await focusOn($, 'search-input')
        }} />
    ),
  })
  const tabItems: Tab[] = [
    tab('files', 'Files', 'f'),
    tab('changes', `${isRoomy ? 'Changes' : 'Chg'} ${list.length}`, 'c'),
    tab('history', isRoomy ? 'History' : 'Log', 'h'),
    tab('search', isRoomy ? 'Search' : 'Find', 's'),
    tab('outline', isRoomy ? 'Outline' : 'Out', 't'),
    {
      key: 'ignored',
      cells: buttonCells('⊘', true),
      draw: () => (
        <Button key="ignored" label="⊘" plain hotkey="g" dimColor={isHidingIgnored ? undefined : true}
          onPress={() => update($, hideIgnored, now => !now)} />
      ),
    },
    {
      key: 'help',
      cells: buttonCells('?', true),
      draw: () => <Button key="help" label="?" plain hotkey="i" onPress={() => toggleHelp($)} />,
    },
  ]
  // Always drawn in the split view, dim when the list fits: these sit
  // before the search field, and a control appearing or vanishing there as
  // results change moved the focus off the field mid-typing.
  if (rows !== undefined) {
    tabItems.push({
      key: 'list:up',
      cells: buttonCells('▲', false),
      draw: () => (
        <Button key="list:up" label="▲" plain dimColor={isOver ? undefined : true}
          onPress={() => scroll(-Math.max(1, room - 2))} />
      ),
    })
    tabItems.push({
      key: 'list:down',
      cells: buttonCells('▼', false),
      draw: () => (
        <Button key="list:down" label="▼" plain dimColor={isOver ? undefined : true}
          onPress={() => scroll(Math.max(1, room - 2))} />
      ),
    })
  }
  const tabRows = packRows(tabItems, Math.max(8, width))
  let fixed = 1 + tabRows.length
  const extra: RenderElement[] = []

  if (current === 'search') {
    const found = await read($, search)
    fixed += 3
    if (Input === undefined) extra.push(<Text dimColor>Search needs a surface with text input.</Text>)
    if (found.mode === 'files') {
      lines = found.files.map(path => {
        const icon = iconFor(baseName(path), false, false, layout.icons)
        const room = width - 2 - iconWidth(icon, layout.icons)
        const label = fit(baseName(path), room)
        const rest = room - label.length - 1
        return {
          key: path,
          node: () => (
            <Box key={`line:${path}`} flexDirection="row">
              <Text color="blue">{path === chosen ? '▌' : ' '}</Text>
              {icon.glyph !== '' && <Text color={icon.color}>{icon.glyph}</Text>}
              <Button key={`found:${path}`} label={label} plain onPress={() => openFound($, path)} />
              {parentOf(path) !== '' && rest > 3 && <Text dimColor> {fit(parentOf(path), rest)}</Text>}
            </Box>
          ),
        }
      })
    } else {
      let lastPath = ''
      const pattern = compileQuery(found.query, found)
      const counts = new Map<string, number>()
      for (const hit of found.hits) counts.set(hit.path, (counts.get(hit.path) ?? 0) + 1)
      for (const hit of found.hits) {
        if (hit.path !== lastPath) {
          lastPath = hit.path
          const icon = iconFor(baseName(hit.path), false, false, layout.icons)
          const count = ` ${counts.get(hit.path) ?? 0}`
          const room = width - 1 - iconWidth(icon, layout.icons) - count.length
          lines.push({
            key: `file:${hit.path}`,
            node: () => (
              <Box key={`hits:${hit.path}`} flexDirection="row">
                <Text color="blue">{hit.path === chosen ? '▌' : ' '}</Text>
                {icon.glyph !== '' && <Text color={icon.color}>{icon.glyph}</Text>}
                <Button key={`hitfile:${hit.path}`} label={fit(hit.path, room)} plain onPress={() => openHit($, hit)} />
                <Box flexGrow={1} />
                <Text dimColor>{count}</Text>
              </Box>
            ),
          })
        }
        const number = String(hit.line)
        const room = width - 4 - number.length
        lines.push({
          key: `${hit.path}:${hit.line}:${hit.column}`,
          node: () => {
            const piece = excerpt(hit.text, matchSpan(hit.text, pattern), room)
            return (
            <Box key={`hitline:${hit.path}:${hit.line}:${hit.column}`} flexDirection="row">
              <Text>{'   '}</Text>
              <Button key={`hit:${hit.path}:${hit.line}:${hit.column}`} label={number} plain dimColor onPress={() => openHit($, hit)} />
              <Text> {piece.before}</Text>
              <Text color="black" backgroundColor="yellow">{piece.hit}</Text>
              <Text>{piece.after}</Text>
            </Box>
            )
          },
        })
      }
    }
  } else if (current === 'history') {
    const narrowed = await read($, historyOf)
    const ofFile = narrowed === '' ? [] : await read($, fileHistory)
    const commits: (ExplorerCommit & { path?: string })[] = narrowed === '' ? await read($, history) : ofFile
    if (narrowed !== '') {
      extra.push(
        <Box key="history:of" flexDirection="row">
          <Text color="blue">{fit(`⌚ ${narrowed}`, Math.max(4, width - 6))}</Text>
          <Box flexGrow={1} />
          <Button key="history:all" label="✕" plain onPress={() => update($, historyOf, () => '')} />
        </Box>,
      )
    }
    if (commits.length === 0) extra.push(<Text dimColor>No commits.</Text>)
    lines = commits.map(commit => {
      const room = width - commit.short.length - 2
      const subject = fit(commit.subject, room)
file-explorer/hooks/register.tsx lines 1217–1272 · Pane
async function drawSearchControls(
  $: EngineInterface,
  els: Elements,
  Input: InputElement,
  width: number,
): Promise<RenderElement> {
  const { Box, Text, Button } = els
  const found = await read($, search)
  const isText = found.mode === 'text'
  const setMode = (mode: 'files' | 'text') => async () => {
    await update($, search, now => ({ ...now, mode }))
    const now = await read($, search)
    if (mode === 'files') await searchFiles($, now.query)
    else if (now.hits.length === 0) await searchText($, now.query)
  }
  return (
    <Box flexDirection="column">
      <Box flexDirection="row" gap={1}>
        <Button key="search:files" label="Name" plain dimColor={isText ? true : undefined} onPress={setMode('files')} />
        <Button key="search:text" label="Text" plain dimColor={isText ? undefined : true} onPress={setMode('text')} />
        {isText && (
          <Button key="search:case" label="Aa" plain dimColor={found.isCaseSensitive ? undefined : true}
            onPress={() => toggleSearchFlag($, 'isCaseSensitive')} />
        )}
        {isText && (
          <Button key="search:regex" label=".*" plain dimColor={found.isRegex ? undefined : true}
            onPress={() => toggleSearchFlag($, 'isRegex')} />
        )}
      </Box>
      {Input !== undefined && (
        <Input
          key="search-input"
          placeholder={isText ? 'text in files (Enter)' : 'file name'}
          onInput={async (value: string) => {
            if (isText) await update($, search, now => ({ ...now, query: value }))
            else await searchFiles($, value)
            // Keep typing in the field however much the results moved around it.
            await $.ui.focus({ requestId: EXPLORER, key: 'search-input' }).catch(() => undefined)
          }}
          onSubmit={async (value: string) => {
            if (isText) {
              await searchText($, value)
              const first = (await read($, search)).hits[0]
              if (first !== undefined) await focusOn($, `hit:${first.path}:${first.line}:${first.column}`)
              return
            }
            await searchFiles($, value)
            const first = (await read($, search)).files[0]
            if (first !== undefined) await openFound($, first)
          }}
        />
      )}
      <Text dimColor>{fit(found.note || (isText ? 'ripgrep, ignore files honoured' : 'fuzzy, as you type'), width)}</Text>
    </Box>
  )
}
file-explorer/hooks/register.tsx lines 1664–1823 · Pane
async function drawPreview(
  $: EngineInterface,
  els: Elements,
  width: number,
  rows: number | undefined,
  isOwnPane: boolean,
  surface: RenderSurface,
): Promise<RenderElement> {
  const { Box, Text, Button, Code, Markdown } = els
  const shown = await read($, preview)
  if (shown === null) {
    return (
      <Box flexDirection="column" flexGrow={1}>
        <Text dimColor>Select a file in the explorer.</Text>
      </Box>
    )
  }
  const list = await read($, changes)
  const against = await read($, base)
  const at = list.findIndex(one => one.path === shown.path)
  const change = list[at]
  const verb = against.head === undefined ? 'vs' : 'in'
  const step = (by: number) => {
    const target = at < 0 ? list[0] : list[(at + by + list.length) % list.length]
    if (target !== undefined) void showPath($, target.path, { mode: 'diff' })
  }

  // Each hunk is a label row and its lines; the file is its lines.
  const hunks = shown.mode === 'diff' ? splitHunks(shown.diff) : []
  const isSource = shown.mode === 'file' || shown.mode === 'rendered'
  const fileLines = isSource && shown.text !== '' ? shown.text.replace(/\n$/, '').split('\n') : []
  const hunkRows = hunks.map(hunk => hunk.body.replace(/\n$/, '').split('\n').length)
  // A data file: each table or tree row one terminal row, cut, never wrapped.
  const parsed = shown.mode === 'data' && shown.text !== '' ? dataFor(shown) : undefined
  const tree = parsed?.kind === 'tree' ? await read($, dataView) : undefined
  const nodes = parsed?.kind === 'tree' && tree !== undefined
    ? jsonRows(parsed.root, new Set(tree.path === shown.path ? tree.toggled : []), 2, MAX_DATA_ROWS)
    : []
  const pick = tree !== undefined && tree.path === shown.path ? tree.pick : ''
  const dataTotal = parsed === undefined ? 0 : parsed.kind === 'table' ? parsed.lines.length : parsed.kind === 'tree' ? nodes.length : 1
  const total = shown.mode === 'data' ? dataTotal : isSource ? fileLines.length : hunkRows.reduce((sum, n) => sum + n, 0)
  const blamed = await read($, blame)
  const blameOf = blamed !== null && blamed.path === shown.path && shown.mode === 'file' ? blamed : undefined
  // Blame lines up beside the source one row a line: no wrapping under it.
  const isWrapped = (await read($, wrapLines)) && blameOf === undefined
  const blameCells = blameOf === undefined ? 0 : width >= 70 ? 24 : 8
  const isTable = parsed?.kind === 'table'
  const shift = isWrapped && !isTable ? 0 : await read($, sideways)
  const isMd = isMarkdown(shown.path)
  const isDataFile = isData(shown.path)
  const lineRoomEstimate = Math.max(10, width - String(Math.max(total, 1)).length * (shown.mode === 'diff' ? 2 : 1) - 6)
  const tableWidest = parsed?.kind === 'table' ? widest(parsed.lines.map(one => one.text)) : 0
  const canShiftEstimate =
    (isTable && tableWidest > width - 2) ||
    (!isWrapped &&
      (shown.mode === 'file' || shown.mode === 'diff') &&
      widest(isSource ? fileLines : hunks.map(hunk => hunk.body).join('\n').split('\n')) > lineRoomEstimate)

  // The toolbar, each Button with the cells it draws in, packed into rows
  // that fit: a row that overflowed dropped its last Buttons, hotkeys and all.
  type Tool = { key: string; cells: number; draw: () => RenderElement }
  const tool = (key: string, label: string, hotkey: string | undefined, draw: () => RenderElement): Tool => ({
    key,
    cells: buttonCells(label, hotkey !== undefined),
    draw,
  })
  const tools: Tool[] = []
  // Placeholders for closures defined once the window is known.
  const late: { scroll: (by: number) => unknown; slide: (by: number) => unknown; isOver: boolean; room: number; shift: number } = {
    scroll: () => undefined,
    slide: () => undefined,
    isOver: false,
    room: 1,
    shift,
  }
  if (shown.isOnDisk && isMd) {
    tools.push(tool('mode:rendered', 'Preview', 'm', () => (
      <Button key="mode:rendered" label="Preview" plain hotkey="m" dimColor={shown.mode === 'rendered' ? undefined : true}
        onPress={() => showPath($, shown.path, { mode: 'rendered' })} />
    )))
  }
  if (shown.isOnDisk && isDataFile) {
    const label = isDelimited(shown.path) ? 'Table' : 'Tree'
    tools.push(tool('mode:data', label, 'm', () => (
      <Button key="mode:data" label={label} plain hotkey="m" dimColor={shown.mode === 'data' ? undefined : true}
        onPress={() => showPath($, shown.path, { mode: 'data' })} />
    )))
  }
  if (shown.isOnDisk && (isMd || isDataFile || shown.isChanged)) {
    const label = isMd || isDataFile ? 'Source' : 'File'
    tools.push(tool('mode:file', label, 'o', () => (
      <Button key="mode:file" label={label} plain hotkey="o" dimColor={shown.mode === 'file' ? undefined : true}
        onPress={() => showPath($, shown.path, { mode: 'file' })} />
    )))
  }
  if (shown.isChanged) {
    tools.push(tool('mode:diff', 'Diff', 'd', () => (
      <Button key="mode:diff" label="Diff" plain hotkey="d" dimColor={shown.mode === 'diff' ? undefined : true}
        onPress={() => showPath($, shown.path, { mode: 'diff' })} />
    )))
  }
  // Always drawn, dim when there is nowhere to go, so the toolbar's
  // Buttons never shift under the focus as the content changes.
  tools.push(tool('up', '▲', 'k', () => (
    <Button key="up" label="▲" plain hotkey="k" dimColor={late.isOver ? undefined : true}
      onPress={() => late.scroll(-Math.max(1, Math.floor(late.room / 2)))} />
  )))
  tools.push(tool('down', '▼', 'j', () => (
    <Button key="down" label="▼" plain hotkey="j" dimColor={late.isOver ? undefined : true}
      onPress={() => late.scroll(Math.max(1, Math.floor(late.room / 2)))} />
  )))
  if (list.length > 0) {
    tools.push(tool('prev', '‹', 'p', () => <Button key="prev" label="‹" plain hotkey="p" onPress={() => step(-1)} />))
    tools.push(tool('next', '›', 'n', () => <Button key="next" label="›" plain hotkey="n" onPress={() => step(1)} />))
  }
  tools.push(tool('wrap', '↩', 'w', () => (
    <Button key="wrap" label="↩" plain hotkey="w" dimColor={isWrapped ? undefined : true}
      onPress={() => update($, wrapLines, now => !now)} />
  )))
  if (canShiftEstimate) {
    tools.push(tool('left', '◀', undefined, () => (
      <Button key="left" label="◀" plain dimColor={late.shift === 0 ? true : undefined} onPress={() => late.slide(-1)} />
    )))
    tools.push(tool('right', '▶', undefined, () => <Button key="right" label="▶" plain onPress={() => late.slide(1)} />))
  }
  if (shown.isHelp !== true) {
    tools.push(tool('quote', '❝', 'q', () => <Button key="quote" label="❝" plain hotkey="q" onPress={() => quoteSelection($, shown.path)} />))
    tools.push(tool('ref', '#', 'r', () => <Button key="ref" label="#" plain hotkey="r" onPress={() => referenceLines($, shown)} />))
    tools.push(tool('copy', '⧉', 'y', () => (
      <Button key="copy" label="⧉" plain hotkey="y" onPress={press => copyPath($, shown.path, press.surface)} />
    )))
    const isPinned = (await read($, pins)).includes(shown.path)
    tools.push(tool('pin', '★', 'b', () => (
      <Button key="pin" label={isPinned ? '★' : '☆'} plain hotkey="b" onPress={() => togglePin($, shown.path)} />
    )))
    const isRepo = (await read($, gitError)) !== 'Not a git repository'
    if (isRepo) {
      tools.push(tool('log', 'Log', 'l', () => <Button key="log" label="Log" plain hotkey="l" onPress={() => showFileLog($, shown.path)} />))
    }
    if (isRepo && shown.isOnDisk) {
      tools.push(tool('blame', 'Blame', 'a', () => (
        <Button key="blame" label="Blame" plain hotkey="a" dimColor={blameOf === undefined ? true : undefined}
          onPress={() => toggleBlame($, shown.path)} />
      )))
    }
  }
  if (isOwnPane) {
    tools.push(tool('mention', '@', undefined, () => <Button key="mention" label="@" plain onPress={() => mention($, shown.path)} />))
    tools.push(tool('close', '✕', undefined, () => (
      <Button key="close" label="✕" plain role="dismiss" onPress={() => $.ui.close({ id: PREVIEW })} />
    )))
  }
  const toolRows = packRows(tools, Math.max(8, width - 1))
  const hasStatus = shown.isChanged || total > 0 || shown.size !== undefined
  const nowMs = await clockNow($)
  const ageText = shown.mtimeMs === undefined ? '' : formatAge(shown.mtimeMs, nowMs)
  const fixed = 1 + toolRows.length + (hasStatus ? 1 : 0) + (shown.note !== '' ? 1 : 0) + (pick !== '' ? 1 : 0)
  const room = rows === undefined ? total : Math.max(1, rows - fixed)

  // The rows each unit takes: a line wrapped into the room beside its gutter
Licence text (MIT)
MIT License

Copyright (c) 2026 Takahiro Kamekura

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.

What its code calls

runs programsreads filesenv varstool callsremembers

The design, read from code

Drawn from the mod's source at the commit read, not from a run: a list is drawn three times, a condition takes its first branch that draws in the desktop app, and a value only the run time knows is shown as a made-up sample (dotted underline) or left out. Colours and type are this site's.

What its code shows

Read from the source at commit 838adcb8d602 on 2026-10-06. The first group decides whether a mod is listed; the rest is for you to weigh. A later commit is not read until the next crawl.

Decides the listing: code you can check
Entry readEvery module hooks/hooks.json names was read.file-explorer/hooks/register.tsx
ParsesEvery file parses as TypeScript or JavaScript.14 files parsed
All its code is in the modEvery import is a file of the mod or the engine's own module; no packages, no require.all its code is in the mod
ReadableNo 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 openNetwork 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 drawsThe 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 lineWhether 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 WindowsWhether every program it starts through $.process exists on Windows (tail, date, open, osascript, /usr/… do not).runs no program a Windows PC lacks
NetworkWhether every fetch names its https host in the code.no network
ProgramsWhether every program it starts is named in the code and is not a shell, an interpreter or a network tool.file-explorer/hooks/register.tsx:679 a program named at run time; file-explorer/hooks/register.tsx:741 a program named at run time; file-explorer/hooks/register.tsx:784 a program named at run time
Reads and sendsWhether it both reads files or environment variables and reaches the network.reaches no network
Keys in the sourceWhether the source holds what looks like an API key or a private key.no keys in the source
LicenceAn 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

This is a reading of the code text, not a security review: it does not run the mod, and it cannot see what a program the mod starts does. The check before installing is yours. How mods are chosen

Install it

Check it yourself before you install it. Mods run unsandboxed, with your permissions, and modscode does not vouch for what this code does. Read the code below (or run claude plugin validate . in its folder), weigh what it reaches, and install the commit you read.

Its repository is its marketplace. Add that marketplace (in the terminal with these commands, or in the desktop app's plugin settings) and install the mod from it:

/plugin marketplace add tak-kam/claude-mods
/plugin install file-explorer@claude-mods

This installs the marketplace's latest commit, which may not be the one read here (838adcb8d602). Compare them before you install.

Ask Claude about it

With the modscode connector added, Claude can read this design, what its code reaches and its code, and build on them. Ask it like this:

Read the modscode design "tak-kam-file-explorer" with its code and make me a pane like it

Search them from Claude: the MCP connector

Similar designs