Ranking|Claude Code Mods

ModsCode / Claude Code Mods / Ranking / md

md

Read, write and review markdown with Claude in a pane inside Claude Code: drafts stream in, comments stay on their words, and Claude suggests edits you accept or reject.

Code you can checkTerminal + desktopPaneToastBoxButtonClientInputText
writes files, runs programs, draws

What it does

  • Draws a pane, toasts
  • Adds /md
  • Watches mcp__md__view, mcp__md__reply, mcp__md__open, mcp__md__close calls
  • Hooks session.start, turn.step, ui.message, ui.scroll
  • Keeps its own state between turns

Good points

  • No network calls
  • Written in TypeScript
  • Handles errors

Code to start from

A starter ModsCode writes from the drawing it read, and the mod's own lines that draw, where there are any.

Starter (register.tsx)

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

// Drawn like md by Dave Kiss (pane, toast), as ModsCode read it from the mod's code:
// https://modscode.com/claude-mods/mods/davekiss-md/
// 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: "Open markdown" })
  on('ui.render', { component: 'Pane', requestId: 'my-pane' }, async ($, e) => {
    const { Box, Text, Button, Client } = $.ui.resolve(e)
    const relative = '…'
    const excerpt = '…'
    const countWords = '…'
    const words = '…'
    const length = '…'
    const size = '…'
    const label = '…'
    const stale = '…'
    const value = '…'
    const alt = '…'
    const src = '…'
    const head = '…'
    const note = '…'
    const head2 = '…'
    const note2 = '…'
    const head3 = '…'
    const note3 = '…'
    const head4 = '…'
    const reply = '…'
    const head5 = '…'
    const reply2 = '…'
    const head6 = '…'
    const reply3 = '…'
    const draft = '…'
    const submit = '…'
    return (
      <Box flexDirection="column">
        <Box flexDirection="row" columnGap={2}>
          <Text bold wrap="truncate-start">
            {relative}
          </Text>
          <Text dimColor>
            {`“${excerpt}” · ${countWords} of ${words} words`}
            {" ·"}
            {" "}
            {length}
            {" open"}
            {` · ${size} changed`}
            {` · ${length} suggested`}
            {" · ✎ Claude is writing…"}
          </Text>
        </Box>
        <Box flexDirection="column">
          <Box flexDirection="row" columnGap={2}>
            <Button hotkey={0} label={`${label}`} plain dimColor />
            <Button hotkey={0} label={`${label}`} plain dimColor />
            <Button hotkey={0} label={`${label}`} plain dimColor />
            <Button hotkey={0} label={`${label}`} plain dimColor />
            <Button hotkey={0} label={`${label}`} plain dimColor />
            <Button hotkey={0} label={`${label}`} plain dimColor />
            <Button hotkey={0} label={`${label}`} plain dimColor />
            <Button hotkey={0} label={`${label}`} plain dimColor />
            <Button hotkey={0} label={`${label}`} plain dimColor />
            <Button hotkey={0} label={`${label}`} plain dimColor />
          </Box>
          <Box flexDirection="row" columnGap={2}>
            <Button hotkey={0} label={`${label}`} plain dimColor />
            <Button hotkey={0} label={`${label}`} plain dimColor />
            <Button hotkey={0} label={`${label}`} plain dimColor />
            <Button hotkey={0} label={`${label}`} plain dimColor />
            <Button hotkey={0} label={`${label}`} plain dimColor />
            <Button hotkey={0} label={`${label}`} plain dimColor />
          </Box>
        </Box>
        <Text dimColor>
          Click to place the caret, drag to select, type to edit · ctrl+k comment, ctrl+j ask, ctrl+u undo, tab to buttons
        </Text>
        <Client module="./editor.tsx" />
        <Text dimColor>
          {stale}
          {" comment(s) lost their lines after an edit."}
        </Text>
        <Text dimColor>
          ────────
        </Text>
        <Box flexDirection="column">
          <Text dimColor wrap="truncate-end">
            {`${alt} · ${src}`}
          </Text>
        </Box>
        <Box flexDirection="column">
          <Text color="magenta" wrap="wrap">
            {head}
          </Text>
          <Box flexDirection="row" columnGap={2}>
            <Text dimColor wrap="truncate-end">
              {note}
            </Text>
            <Button hotkey="y" label="accept" />
            <Button hotkey="d" label="reject" plain dimColor />
            <Text dimColor>
              tab, then y / d
            </Text>
          </Box>
        </Box>
        <Box flexDirection="column">
          <Text color="magenta" wrap="wrap">
            {head2}
          </Text>
          <Box flexDirection="row" columnGap={2}>
            <Text dimColor wrap="truncate-end">
              {note2}
            </Text>
            <Button hotkey="y" label="accept" />
            <Button hotkey="d" label="reject" plain dimColor />
            <Text dimColor>
              tab, then y / d
            </Text>
          </Box>
        </Box>
        <Box flexDirection="column">
          <Text color="magenta" wrap="wrap">
            {head3}
          </Text>
          <Box flexDirection="row" columnGap={2}>
            <Text dimColor wrap="truncate-end">
              {note3}
            </Text>
            <Button hotkey="y" label="accept" />
            <Button hotkey="d" label="reject" plain dimColor />
            <Text dimColor>
              tab, then y / d
            </Text>
          </Box>
        </Box>
        <Box flexDirection="column">
          <Text color="yellow" wrap="wrap">
            {head4}
          </Text>
          <Text color="green" wrap="wrap">
            {reply}
          </Text>
        </Box>
        <Box flexDirection="column">
          <Text color="yellow" wrap="wrap">
            {head5}
          </Text>
          <Text color="green" wrap="wrap">
            {reply2}
          </Text>
        </Box>
        <Box flexDirection="column">
          <Text color="yellow" wrap="wrap">
            {head6}
          </Text>
          <Text color="green" wrap="wrap">
            {reply3}
          </Text>
        </Box>
        <Text wrap="truncate-start">
          <Text bold>
            {label}
            {": "}
          </Text>
          {draft}
          <Text inverse>
            {" "}
          </Text>
          <Text dimColor>
            {" Enter to "}
            {submit}
            , empty to cancel
          </Text>
        </Text>
      </Box>
    )
  })

  on('session.start', async ($, e, next) => {
    const docName = '…'
    const err = '…'
    const what = '…'
    await $.ui.toast(`Could not open ${docName}: ${err}`)
    await $.ui.toast(`Copied ${what}`)
    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.

hooks/register.tsx lines 1109–1268 · Pane
  on('ui.render', { component: 'Pane', requestId: PANE }, async ($, e, next) => {
    if (e.surface === 'mobile') return next(e)
    if (e.surface === 'vscode') return next(e)
    const E = $.ui.resolve(e)
    const { Box, Text, Button, Input, Client } = E
    const doc = await read($, docAtom)
    const picker = await read($, pickerAtom)
    if (picker) {
      const cwd = await $.session.cwd()
      const label = (f: string | null) =>
        f === null ? 'Untitled draft  · unsaved' : relative(f, cwd) + (picker.files.indexOf(f) < picker.recent ? '  · recent' : '')
      const entries = [...(picker.hasDraft ? [null] : []), ...picker.files]
      const matches = entries.filter(f => fuzzy(picker.filter, label(f))).slice(0, 15)
      return (
        <Box flexDirection="column">
          <Input
            key="pick-filter"
            label="Open"
            value={picker.filter}
            placeholder="type to filter, or a path"
            submitLabel="open"
            autoFocus
            onInput={v => void update($, pickerAtom, p => p && { ...p, filter: v })}
            onSubmit={v => void (matches.length ? openPicked($, matches[0] ?? null) : newFile($, v))}
          />
          <Button
            key="pick-new"
            label={picker.filter.trim() ? `+ New file ${markdownName(picker.filter)}` : '+ New file'}
            plain
            onPress={() => void newFile($, picker.filter)}
          />
          {matches.map((f, i) => (
            <Button
              key={'pick-' + i}
              label={label(f)}
              plain
              onPress={() => void openPicked($, f)}
            />
          ))}
          {matches.length === 0 && <Text dimColor>No markdown files match. Enter creates {markdownName(picker.filter)}.</Text>}
          <Button
            key="pick-cancel"
            label="cancel"
            plain
            dimColor
            onPress={() => void (async () => {
              await update($, pickerAtom, () => null)
              if (!(await read($, docAtom))) await $.ui.close({ id: PANE })
            })()}
          />
        </Box>
      )
    }
    if (!doc) return <Text dimColor>No file open. Run /md to pick one.</Text>

    const comments = await read($, commentsAtom)
    const cursor = await read($, cursorAtom)
    const col = await read($, colAtom)
    const mark = await read($, markAtom)
    const mode = await read($, modeAtom)
    const draft = await read($, draftAtom)
    const writing = await read($, writingAtom)
    const reader = await read($, readerAtom)
    const changed = new Set(await read($, changedAtom))
    const cwd = await $.session.cwd()
    const total = doc.lines.length
    const sel = ordered(mark, { line: cursor, col })
    const excerpt = sel ? textBetween(doc.lines, sel[0], sel[1]) : null
    const short = (t: string, n: number) => (t.length > n ? t.slice(0, n - 1).replace(/\s+/g, ' ') + '…' : t.replace(/\s+/g, ' '))
    const open = comments.filter(c => c.status !== 'resolved')
    const here = comments.filter(c => c.status !== 'resolved' && c.start <= cursor && cursor <= c.end)
    const suggested = (await read($, suggestionsAtom)).flatMap(s => {
      const span = locate(doc.lines, s)
      return span ? [{ s, span }] : []
    })
    const suggestedHere = suggested.filter(({ span }) => span[0].line <= cursor && cursor <= span[1].line)
    const focus = await read($, focusAtom)
    const pixels = await pixelsAvailable($)
    const words = countWords(doc.lines.join('\n'))
    const bodyRows = e.props.scroll.bodyRows || 20
    const page = Math.max(5, bodyRows - 8)

    const move = (to: number) => placeCaret($, { line: Math.max(1, Math.min(total, to)), col: 0 }, false)
    // The toolbar's prompts type into the pane's Input, never a draft
    const setMode = async (m: Mode) => {
      await update($, draftAtom, () => null)
      await update($, modeAtom, () => m)
    }
    const nextComment = () => {
      const after = open.map(c => c.start).filter(s => s > cursor).sort((a, b) => a - b)
      const first = open.map(c => c.start).sort((a, b) => a - b)
      return move(after[0] ?? first[0] ?? cursor)
    }

    const key = (k: string, label: string, onPress: () => unknown) => (
      <Button key={'k-' + k} hotkey={k} label={label} plain dimColor onPress={() => void onPress()} />
    )

    const header = (
      <Box flexDirection="row" columnGap={2}>
        <Text bold wrap="truncate-start">{doc.path ? relative(doc.path, cwd) : docName(null)}</Text>
        <Text dimColor>
          {excerpt ? `“${short(excerpt, 24)}” · ${countWords(excerpt)} of ${words} words` : `${cursor}:${col + 1} · ${words} words`} ·{' '}
          {open.length} open
          {changed.size > 0 ? ` · ${changed.size} changed` : ''}
          {suggested.length > 0 ? ` · ${suggested.length} suggested` : ''}
          {doc.path === null ? (writing ? ' · ✎ Claude is writing…' : ' · unsaved, /md save <path>') : ''}
        </Text>
      </Box>
    )

    const toolbar = (
      <Box flexDirection="column">
        <Box flexDirection="row" columnGap={2}>
          {key('j', '↓', () => move(cursor + 1))}
          {key('k', '↑', () => move(cursor - 1))}
          {key('f', 'pg↓', () => move(cursor + page))}
          {key('b', 'pg↑', () => move(cursor - page))}
          {key('v', mark ? 'clear' : 'select', () => update($, markAtom, m => (m ? null : { line: cursor, col })))}
          {key('o', 'copy', () => copyOut($))}
          {key('i', 'image', () => pasteImage($))}
          {key('z', focus ? 'unfocus' : 'focus', async () => {
            await update($, focusAtom, v => !v)
            await keepVisible($)
          })}
          {key('n', 'next', nextComment)}
          {key('r', 'read', async () => {
            const blocks = blocksOf(doc.lines)
            await update($, readTopAtom, () => blocks[blockAt(blocks, cursor)]?.start ?? 1)
            await update($, readerAtom, () => true)
          })}
        </Box>
        <Box flexDirection="row" columnGap={2}>
          {key('c', 'comment', () => setMode('comment'))}
          {key('a', 'ask', () => setMode('ask'))}
          {key('x', 'send all', async () => {
            if (open.length === 0) return $.ui.toast('No open comments to send.')
            void $.prompt.submit({ text: reviewPrompt(doc.path, doc.lines, open), asUser: true })
            $.ui.toast(`Sent ${open.length} comment(s) to Claude.`)
          })}
          {key('s', 'resolve', () =>
            saveComments($, comments.map(c => (here.some(h => h.id === c.id) ? { ...c, status: 'resolved' } : c))),
          )}
          {key('u', 'undo', () => undo($))}
          {key('q', 'close', () => $.ui.close({ id: PANE }))}
        </Box>
      </Box>
    )

    const prompts = {
      comment: { label: excerpt ? `Note on “${short(excerpt, 22)}”` : `Comment on line ${cursor}`, submit: 'save' },
      ask: { label: excerpt ? `Ask about “${short(excerpt, 22)}”` : `Ask Claude about line ${cursor}`, submit: 'send' },
    }
    const active = mode === 'review' ? null : prompts[mode]
    const input =
      active &&
      (draft !== null ? (
        <Text key={'draft-' + mode} wrap="truncate-start">
          <Text bold>{active.label}: </Text>
          {draft}
hooks/register.tsx lines 675–683 · Pane
function drawPreview(E: PaneElements, key: string, p: Preview, alt: string) {
  const { Image, Raster } = E as unknown as {
    Image: (props: Record<string, unknown>) => ReturnType<PaneElements['Text']>
    Raster: (props: Record<string, unknown>) => ReturnType<PaneElements['Text']>
  }
  return p.kind === 'pixels'
    ? <Image key={key} source={{ file: p.file, format: 'png', generation: p.generation }} columns={p.columns} rows={p.rows} alt={alt || 'image'} />
    : <Raster key={key} columns={p.columns} rows={p.rows} cells={p.cells} />
}
Licence text (MIT)
MIT License

Copyright (c) 2026 Dave Kiss

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 programswrites filesenv varsdrives Claudetool callsremembers

What its code shows

Read from the source at commit 5173add8dbe7 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 readEvery module hooks/hooks.json names was read.hooks/register.tsx
ParsesEvery file parses as TypeScript or JavaScript.5 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.its repository's .claude-plugin/marketplace.json does not list it: no marketplace line to give; the page shows how to try the commit read
Programs on WindowsWhether every program it starts through $.process exists on Windows (tail, date, open, osascript, /usr/… do not).hooks/register.tsx:448 mkdir (not on Windows); hooks/register.tsx:651 sips (not on Windows); hooks/register.tsx:661 sips (not on Windows); hooks/register.tsx:667 sips (not on Windows)
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:442 osascript (a shell or interpreter); hooks/register.tsx:449 osascript (a shell or interpreter)
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 environment variables, files, 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.prompt.submit (as the person), adds tool view, adds tool reply, adds tool open, adds tool comment, adds tool edit, adds tool suggest, adds tool draft, adds tool save, adds tool close, adds command md
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 (md), tool.call (mcp__md__view, mcp__md__reply, mcp__md__open (+5)) · shapes: turn.step · reads: ui.message · also: session.start, ui.scroll, ui.render (Pane) · timers: clock.every
Reads, by nameThe environment variables and files it names, and whether it reads the transcript, settings.json, the prompt box or the mouse selection.env: HOME, TERM_PROGRAM, TERM; files: a path computed at run time
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.files: a path computed at run time; the clipboard

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

Install it

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

Its repository's .claude-plugin/marketplace.json does not list it, so there is no marketplace line to give.

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/davekiss/md
git -C md checkout 5173add8dbe74392a85e7fb0fa8ffa02cffa8ee9
claude plugin validate md
claude --plugin-dir md

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 "davekiss-md" with its code and make me one like it

Search them from Claude: the MCP connector

Similar mods

More by Dave Kiss

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/davekiss-md.svg)](https://modscode.com/claude-mods/mods/davekiss-md/)