Ranking|Claude Code Mods

ModsCode / Claude Code Mods / Ranking / file-explorer

file-explorer

A file explorer pane beside the conversation: browse the project as a collapsible tree with git status markers, and preview Markdown, CSV and text files without leaving Claude Code.

Code you can checkTerminal + desktopPaneToastBoxButtonCodeMarkdownText
runs programs, draws

What it does

  • Draws a pane
  • Adds /tree
  • Watches tool calls and can refuse them
  • Hooks classic.SessionStart, session.start, ui.close, ui.focus 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)

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

// Drawn like file-explorer by Flo Heissler (pane, toast), as ModsCode read it from the mod's code:
// https://modscode.com/claude-mods/mods/floheissler-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: "file-explorer" })
  on('ui.render', { component: 'Pane', requestId: 'my-pane' }, async ($, e) => {
    const { Box, Text, Button, Code } = $.ui.resolve(e)
    const above = '…'
    const label = '…'
    const glyph = '…'
    const below = '…'
    const name = '…'
    const source = '…'
    const hotkey = '…'
    const levels = '…'
    return (
      <Box flexDirection="column">
        <Box flexDirection="column" overflow="hidden">
          <Text dimColor wrap="truncate-end">
            {`↑ ${above} more`}
          </Text>
          <Box flexDirection="row" height={1}>
            <Text dimColor wrap="truncate-start" />
            <Button label={`${label}`} plain />
            <Text wrap="truncate-start">
              {` ${glyph}`}
            </Text>
            <Text wrap="truncate-start">
              {` ${glyph}`}
            </Text>
            <Text wrap="truncate-start">
              {` ${glyph}`}
            </Text>
          </Box>
          <Box flexDirection="row" height={1}>
            <Text dimColor wrap="truncate-start" />
            <Button label={`${label}`} plain />
            <Text wrap="truncate-start">
              {` ${glyph}`}
            </Text>
            <Text wrap="truncate-start">
              {` ${glyph}`}
            </Text>
            <Text wrap="truncate-start">
              {` ${glyph}`}
            </Text>
          </Box>
          <Box flexDirection="row" height={1}>
            <Text dimColor wrap="truncate-start" />
            <Button label={`${label}`} plain />
            <Text wrap="truncate-start">
              {` ${glyph}`}
            </Text>
            <Text wrap="truncate-start">
              {` ${glyph}`}
            </Text>
            <Text wrap="truncate-start">
              {` ${glyph}`}
            </Text>
          </Box>
          <Text dimColor wrap="truncate-end">
            {`↓ ${below} more`}
          </Text>
        </Box>
        <Box height={1} />
        <Box flexDirection="row" height={1}>
          <Text dimColor>
            {"── "}
          </Text>
          <Text bold wrap="truncate-middle">
            {name}
          </Text>
          <Text dimColor wrap="truncate-end">
            {" ────────"}
          </Text>
        </Box>
        <Box flexDirection="column" overflow="hidden">
          <Box flexDirection="column" flexShrink={0}>
            <Box flexDirection="row">
              <Box flexDirection="column" width={1} flexShrink={0}>
                <Text>
                  ▌
                </Text>
                <Text>
                  ▌
                </Text>
                <Text>
                  ▌
                </Text>
              </Box>
              <Box flexDirection="column" flexShrink={0}>
                <Code source={`${source}`} />
              </Box>
            </Box>
          </Box>
        </Box>
        <Box display="none">
          <Button label={`${label}`} hotkey={`${hotkey}`} plain />
          <Button label={`${label}`} hotkey={`${hotkey}`} plain />
          <Button label={`${label}`} hotkey={`${hotkey}`} plain />
          <Button label="collapse all" hotkey={`${levels}`} plain />
          <Button label="collapse all" hotkey={`${levels}`} plain />
          <Button label="collapse all" hotkey={`${levels}`} plain />
        </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.

hooks/register.tsx lines 2100–2259 · Pane
  on('ui.render', { component: 'Pane', requestId: 'file-explorer' }, async ($, e, next) => {
    if (e.surface !== 'terminal' && e.surface !== 'desktop') {
      return next(e)
    }

    const host = hostOf($)
    const { Box, Text, Button, Code, Markdown, Input } = $.ui.resolve(e)

    const [expanded, selected, treeTop, previewTop, isPinned, markdownMode, helpShown, filterText, searchText, written] =
      await Promise.all([
        read($, EXPANDED),
        read($, SELECTED),
        read($, TREE_TOP),
        read($, PREVIEW_TOP),
        read($, PINNED),
        read($, MARKDOWN_MODE),
        read($, HELP_SHOWN),
        read($, FILTER),
        read($, SEARCH),
        read($, WRITTEN),
      ])

    const current = listing

    if (current === null) {
      void ensureListing(host).then(
        () => host.invalidate(),
        () => undefined,
      )
    }

    // A query filters the tree once the project's file list is read
    if (queryOf(filterText ?? '') !== null && filtering.index === null) {
      void ensureFilterIndex(host).catch(() => undefined)
    }

    const unread: string[] = []

    const shown =
      current === null
        ? { rows: flattenTree(() => undefined, new Set()), view: null }
        : shownTreeOf(current, expanded, filterText, dir => unread.push(dir))

    const { rows } = shown

    if (current !== null && unread.length > 0) {
      void loadDirs(host, current, unread).catch(() => undefined)
    }

    // Git's view as last read, of this root: a reload of the module drew
    // none yet, and reads it now
    if (isGitStale && gitLoad === null) {
      void loadGit(host).catch(() => undefined)
    }

    const marks =
      current === null
        ? NO_MARKS
        : treeMarksOf(rows, gitRead?.root === current.root ? gitRead.status : null, written, styleOf(current.root))

    // The file read for the selection, or while a switch waits for the state
    // to name the next, the one it leaves
    const inHand = preview?.path === selected ? preview : leaving?.path === selected ? leaving : null
    const isPreviewStale = selected !== null && inHand === null

    if (isPreviewStale && previewLoad !== selected) {
      void loadPreview(host, selected)
        .then(() => host.invalidate())
        .catch(() => undefined)
    }

    // The layout follows each drawing's seat: the pane moves between the dock
    // and inline as the terminal is resized. Inline it shows one view, as
    // tall as its content.
    seat = { placement: e.props.placement, isClassic: e.viewport?.isFullscreen === false }
    room = e.props.scroll.bodyRows

    // Without the keyboard the pane shows no ring, and it takes the keyboard
    // back with the ring on nothing, or on the row drawn to take it
    if (!e.props.isFocused) {
      dropRing()
    }

    // The cells across a row: the dock keeps a column clear at its edge
    const columns = Math.max(
      1,
      e.props.bodyColumns - (seat.placement === 'dock' ? Limits.RIGHT_PAD_COLUMNS : 0),
    )

    const shownPreview = inHand
    const inlineView = seat.placement === 'inline' ? inlineViewOf({ helpShown, isFileShown, selected }) : null

    // The filter's row sits over the tree, whole or filtered; the help and an
    // inline file view stand in for both. The search's row sits over the
    // preview, docked or inline
    const hasFilter = filterText !== null && !helpShown && inlineView !== 'file'
    const hasSearch = searchText !== null && !helpShown && (inlineView === null ? selected !== null : inlineView === 'file')

    const layout =
      inlineView === null
        ? paneLayoutOf(e.props.scroll.bodyRows, selected !== null, { hasFilter, hasSearch })
        : inlineLayoutOf(
            e.props.scroll.bodyRows,
            inlineView,
            inlineView === 'tree'
              ? rows.length
              : inlineView === 'file'
                ? previewHeightOf(shownPreview)
                : helpHeightOf(seat, columns),
            { hasFilter, hasSearch },
          )

    const window = treeWindowOf(rows.length, treeTop, layout.treeRows)

    // While the search shows, Markdown draws as its source, where the
    // search's marks have rows; the mode kept for the project stays as it is
    const shownMarkdownMode = hasSearch ? 'source' : markdownMode

    // A source preview gives the search's marks their cells while it shows
    const isSourceShown =
      shownPreview?.kind === 'code' || (shownPreview?.kind === 'markdown' && shownMarkdownMode === 'source')

    const textColumns = Math.max(1, columns - (hasSearch && isSourceShown ? Limits.SEARCH_MARK_CELLS : 0))

    // The help view stands in for the tree: the scroll and focus hooks then
    // have no rows to steer
    drawn = helpShown ? null : { rows, layout, textColumns, hasFilter, hasSearch }

    // The field holds what was typed, ahead of the query while typing pauses
    const filter: FilterModel | null =
      filterText === null
        ? null
        : {
            key: filterKeyOf(filtering.submits),
            value: filtering.typed ?? filterText,
            status: queryOf(filterText) === null ? '' : filterStatusOf(shown.view),
            isBlank: queryOf(filtering.typed ?? filterText) === null,
          }

    // The search marks what its query matches in the file shown, and the
    // match the steps stand on while it still matches
    const found = hasSearch && shownPreview !== null && searchText !== null ? foundIn(shownPreview, searchText) : null
    const match = found === null || shownPreview === null ? null : currentMatchOf(shownPreview.path, found)

    const search: SearchModel | null =
      !hasSearch || searchText === null
        ? null
        : {
            key: searchKeyOf(searching.submits),
            value: searching.typed ?? searchText,
            status: shownPreview === null ? '' : searchStatusOf(found?.lines ?? null, match),
            isBlank: searchQueryOf(searching.typed ?? searchText) === null,
            query: found?.query ?? null,
            matches: found?.set ?? NO_MATCHES,
            current: match,
          }

    const tree = paneView(
      { Box, Text, Button, Code, Markdown, Input },
      actionsOf(host),
hooks/view.tsx lines 293–357 · Pane
export function paneView(
  ui: Ui,
  actions: PaneActions,
  columns: number,
  model: PaneModel,
): RenderElement {
  const { Box } = ui
  const kit: Kit = { ui, actions, columns }

  const search = model.search === null ? null : searchRow(kit, model.search)

  if (model.inlineView === 'file' && model.selected !== null) {
    const head = inlineFileHeadRow(kit, model, model.selected)

    return (
      <Box flexDirection="column" width={columns}>
        {head.row}
        {search?.row}
        {previewRegion(kit, model)}
        {hiddenKeys(kit, [...head.hidden, ...(search?.hidden ?? [])])}
      </Box>
    )
  }

  const header = headerRow(kit, model)

  if (model.helpShown) {
    return (
      <Box flexDirection="column" width={columns}>
        {header.row}
        {helpRegion(kit, model.layout.bodyRows - 1, model.seat)}
        {hiddenKeys(kit, header.hidden)}
      </Box>
    )
  }

  const filter = model.filter === null ? null : filterRow(kit, model.filter)

  if (model.inlineView === 'tree' || model.selected === null) {
    return (
      <Box flexDirection="column" width={columns}>
        {header.row}
        {filter}
        {treeRegion(kit, model)}
        {hiddenKeys(kit, header.hidden)}
      </Box>
    )
  }

  const meta = previewMetaRow(kit, model)

  return (
    <Box flexDirection="column" width={columns}>
      {header.row}
      {filter}
      {treeRegion(kit, model)}
      <Box height={1} />
      {previewTitleRow(kit, model.selected)}
      {meta.row}
      {search?.row}
      {previewRegion(kit, model)}
      {hiddenKeys(kit, [...header.hidden, ...meta.hidden, ...(search?.hidden ?? [])])}
    </Box>
  )
}
hooks/view.tsx lines 1136–1148 · Pane
function previewRegion(kit: Kit, model: PaneModel): RenderElement {
  const { Box } = kit.ui

  // As in the help view: the content keeps its natural height and the
  // region clips it, or Markdown's rows shrink and drop or overprint lines
  return (
    <Box flexDirection="column" height={model.layout.previewRows} overflow="hidden">
      <Box flexDirection="column" flexShrink={0}>
        {previewBody(kit, model)}
      </Box>
    </Box>
  )
}
hooks/view.tsx lines 1150–1185 · Pane
function previewBody(kit: Kit, model: PaneModel): RenderElement {
  const { Text, Markdown } = kit.ui
  const { preview, previewTop, layout, markdownMode } = model
  const rows = layout.previewRows

  if (preview === null) {
    return <Text dimColor italic>Loading…</Text>
  }

  switch (preview.kind) {
    case 'notice':
      return (
        <Text dimColor italic wrap="wrap">
          {preview.text}
        </Text>
      )
    case 'table':
      // The rows the window shows, each with its rule, set the columns'
      // widths, fitted to the row
      return (
        <Markdown
          text={tableWindowOf(preview.rows, previewTop, tableRowsIn(rows), kit.columns, tableMarkOf(model.search))}
        />
      )
    case 'markdown':
      if (markdownMode === 'rendered') {
        // Markdown can draw a line in less than a row (a joined paragraph),
        // so twice the rows are drawn and the region clips the rest.
        return <Markdown text={markdownWindowOf(preview.lines, previewTop, rows * 2)} />
      }

      return sourceOf(kit, model, preview.path, preview.lines, 'markdown')
    case 'code':
      return sourceOf(kit, model, preview.path, preview.lines)
  }
}
hooks/view.tsx lines 1216–1247 · Pane
function sourceOf(
  kit: Kit,
  model: PaneModel,
  path: string,
  lines: readonly string[],
  language?: string,
): RenderElement {
  const { Box, Text, Code } = kit.ui
  const { search, previewTop, layout } = model
  const window = codeWindowOf(lines, previewTop, layout.previewRows)
  const code = codeOf(Code, path, window, language)

  if (search === null) {
    return code
  }

  const lastLine = window.startLine + window.source.split('\n').length - 1
  const codeCells = Math.max(1, kit.columns - Limits.SEARCH_MARK_CELLS)
  const columns = sourceColumnsOf(lastLine, codeCells)
  const marks = windowMarksOf(lines, window.startLine - 1, layout.previewRows, columns, search.matches, search.current)

  return (
    <Box flexDirection="row">
      <Box flexDirection="column" width={Limits.SEARCH_MARK_CELLS} flexShrink={0}>
        {marks.map(mark => (mark === null ? <Box height={1} /> : <Text {...MATCH_TONES[mark]}>{MATCH_GLYPH}</Text>))}
      </Box>
      <Box flexDirection="column" width={codeCells} flexShrink={0}>
        {code}
      </Box>
    </Box>
  )
}
hooks/view.tsx lines 1249–1260 · Pane
function codeOf(
  Code: Ui['Code'],
  path: string,
  window: { source: string; startLine: number },
  language?: string,
): RenderElement {
  return language === undefined ? (
    <Code source={window.source} path={sanitize(path)} startLine={window.startLine} />
  ) : (
    <Code source={window.source} language={language} startLine={window.startLine} />
  )
}
Licence text (MIT)
MIT License

Copyright (c) 2026 Flo Heissler

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 filestool callsremembers

What its code shows

Read from the source at commit 1cc0cf5554c5. 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.hooks/register.tsx
ParsesEvery file parses as TypeScript or JavaScript.24 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.hooks/register.tsx:194 a program named at run time
Reads and sendsWhether it both reads something of yours (files, environment variables, the transcript, settings) and reaches outside (the network, an MCP server, another session, telemetry).reads files, the prompt box, but reaches nothing outside
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
Settings hooksHooks 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 shipsMCP 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, agentsWhat 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 MCPWhether 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 modelCompletions it runs ($.model.complete, fork, classify), subagents it spawns, prompts it submits as you, and the tools, commands and agents it adds.adds command tree
Events it hooksBy 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 (tree), tool.call · reads: classic.SessionStart · also: session.start, ui.render (Pane), ui.scroll, ui.focus (+1) · timers: clock.after
Reads, by nameThe environment variables and files it names, and whether it reads the transcript, settings.json, the prompt box or the mouse selection.files: a path computed at run time; the prompt box
Writes, by nameThe 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.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 floheissler/cc-file-explorer
/plugin install file-explorer@cc-file-explorer
/reload-plugins

This installs the marketplace's latest commit, which may not be the one read here (1cc0cf5554c5). 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/floheissler/cc-file-explorer
git -C cc-file-explorer checkout 1cc0cf5554c53c7cbe88632b8a7f2b46aa9ae891
claude plugin validate cc-file-explorer
claude --plugin-dir cc-file-explorer

The 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 "floheissler-file-explorer" with its code and make me one like it

Search them from Claude: the MCP connector

Similar mods

More by Flo Heissler

Badge for your README

If this is your mod, paste this into your README. It links to this page.

README.md
[![ModsCode](https://modscode.com/badge/floheissler-file-explorer.svg)](https://modscode.com/claude-mods/mods/floheissler-file-explorer/)