ModsCode / Claude Code Mods / Ranking / mdview
mdview
Click a .md path in the Claude Code conversation to read it rendered as markdown beside the session, pictures included, and point at any block to have Claude edit it.
What it does
- Draws a pane, toasts
- Adds /md
- Watches mcp__mdview__show calls and can refuse them
- Hooks classic.CwdChanged, session.start, turn.complete, turn.start and 1 more
- Starts processes
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 mdview by Anji Xu (pane, toast), as ModsCode read it from the mod's code:
// https://modscode.com/claude-mods/mods/xuanji86-mdview/
// 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: "mdview" })
on('ui.render', { component: 'Pane', requestId: 'my-pane' }, async ($, e) => {
const { Box, Text, Input, Button, Markdown } = $.ui.resolve(e)
const basename = '…'
const tilde = '…'
const meta = '…'
const query = '…'
const at = '…'
const hits = '…'
const value = '…'
const text = '…'
const note = '…'
const line = '…'
const end = '…'
return (
<Box flexDirection="column">
<Box flexDirection="row">
<Text>
{"⏺ "}
</Text>
<Text bold>
{basename}
</Text>
<Text dimColor wrap="truncate-start">
{` ${tilde}${meta}`}
</Text>
</Box>
<Box flexDirection="row" flexWrap="wrap" columnGap={1} marginBottom={1}>
<Text dimColor>
·
</Text>
0
<Text dimColor>
·
</Text>
0
<Text dimColor>
·
</Text>
0
</Box>
<Box flexDirection="row" gap={1} marginBottom={1}>
<Box flexGrow={1}>
<Input label="search:" placeholder="text in this file" value={`${query}`} submitLabel="next" autoFocus />
</Box>
<Text dimColor>
{`${at}1/${hits}`}
</Text>
</Box>
<Box flexDirection="column" marginBottom={1}>
<Box flexDirection="row">
<Text color="suggestion">
{"› "}
</Text>
<Button plain label={`${value}`} />
</Box>
<Box flexDirection="row">
<Text color="suggestion">
{"› "}
</Text>
<Button plain label={`${value}`} />
</Box>
<Box flexDirection="row">
<Text color="suggestion">
{"› "}
</Text>
<Button plain label={`${value}`} />
</Box>
</Box>
<Text dimColor wrap="truncate-end">
{`── ${text} ────────`}
</Text>
<Box flexDirection="row">
<Text dimColor>
{"⎿ "}
</Text>
<Markdown text={`${note}`} />
</Box>
<Box flexDirection="column" marginTop={0}>
<Box flexDirection="column" marginTop={1}>
<Box flexDirection="column" marginBottom={1}>
<Box borderStyle="round" borderColor="promptBorder" paddingX={1}>
<Input label={">"} placeholder={`what to change in lines ${line}-${end}`} submitLabel="send" autoFocus />
</Box>
<Box flexDirection="row" columnGap={1} paddingLeft={2}>
<Text dimColor>
enter to send to Claude ·
</Text>
<Button plain dimColor label="cancel" />
</Box>
</Box>
<Box flexDirection="column" alignItems="flex-start">
<Button plain dimColor label="⎿ open the original" />
</Box>
<Box flexDirection="column" alignItems="flex-start">
<Button plain dimColor label="⎿ open the original" />
</Box>
<Box flexDirection="column" alignItems="flex-start">
<Button plain dimColor label="⎿ open the original" />
</Box>
<Box position="absolute" top={0} right={0} display="none">
<Button plain dimColor label="✎" />
</Box>
</Box>
<Box flexDirection="column" marginTop={1}>
<Box flexDirection="column" marginBottom={1}>
<Box borderStyle="round" borderColor="promptBorder" paddingX={1}>
<Input label={">"} placeholder={`what to change in lines ${line}-${end}`} submitLabel="send" autoFocus />
</Box>
<Box flexDirection="row" columnGap={1} paddingLeft={2}>
<Text dimColor>
enter to send to Claude ·
</Text>
<Button plain dimColor label="cancel" />
</Box>
</Box>
<Box flexDirection="column" alignItems="flex-start">
<Button plain dimColor label="⎿ open the original" />
</Box>
<Box flexDirection="column" alignItems="flex-start">
<Button plain dimColor label="⎿ open the original" />
</Box>
<Box flexDirection="column" alignItems="flex-start">
<Button plain dimColor label="⎿ open the original" />
</Box>
<Box position="absolute" top={0} right={0} display="none">
<Button plain dimColor label="✎" />
</Box>
</Box>
<Box flexDirection="column" marginTop={1}>
<Box flexDirection="column" marginBottom={1}>
<Box borderStyle="round" borderColor="promptBorder" paddingX={1}>
<Input label={">"} placeholder={`what to change in lines ${line}-${end}`} submitLabel="send" autoFocus />
</Box>
<Box flexDirection="row" columnGap={1} paddingLeft={2}>
<Text dimColor>
enter to send to Claude ·
</Text>
<Button plain dimColor label="cancel" />
</Box>
</Box>
<Box flexDirection="column" alignItems="flex-start">
<Button plain dimColor label="⎿ open the original" />
</Box>
<Box flexDirection="column" alignItems="flex-start">
<Button plain dimColor label="⎿ open the original" />
</Box>
<Box flexDirection="column" alignItems="flex-start">
<Button plain dimColor label="⎿ open the original" />
</Box>
<Box position="absolute" top={0} right={0} display="none">
<Button plain dimColor label="✎" />
</Box>
</Box>
</Box>
<Box flexDirection="column" marginTop={0}>
<Box flexDirection="column" marginTop={1}>
<Box flexDirection="column" marginBottom={1}>
<Box borderStyle="round" borderColor="promptBorder" paddingX={1}>
<Input label={">"} placeholder={`what to change in lines ${line}-${end}`} submitLabel="send" autoFocus />
</Box>
<Box flexDirection="row" columnGap={1} paddingLeft={2}>
<Text dimColor>
enter to send to Claude ·
</Text>
<Button plain dimColor label="cancel" />
</Box>
</Box>
<Box flexDirection="column" alignItems="flex-start">
<Button plain dimColor label="⎿ open the original" />
</Box>
<Box flexDirection="column" alignItems="flex-start">
<Button plain dimColor label="⎿ open the original" />
</Box>
<Box flexDirection="column" alignItems="flex-start">
<Button plain dimColor label="⎿ open the original" />
</Box>
<Box position="absolute" top={0} right={0} display="none">
<Button plain dimColor label="✎" />
</Box>
</Box>
<Box flexDirection="column" marginTop={1}>
<Box flexDirection="column" marginBottom={1}>
<Box borderStyle="round" borderColor="promptBorder" paddingX={1}>
<Input label={">"} placeholder={`what to change in lines ${line}-${end}`} submitLabel="send" autoFocus />
</Box>
<Box flexDirection="row" columnGap={1} paddingLeft={2}>
<Text dimColor>
enter to send to Claude ·
</Text>
<Button plain dimColor label="cancel" />
</Box>
</Box>
<Box flexDirection="column" alignItems="flex-start">
<Button plain dimColor label="⎿ open the original" />
</Box>
<Box flexDirection="column" alignItems="flex-start">
<Button plain dimColor label="⎿ open the original" />
</Box>
<Box flexDirection="column" alignItems="flex-start">
<Button plain dimColor label="⎿ open the original" />
</Box>
<Box position="absolute" top={0} right={0} display="none">
<Button plain dimColor label="✎" />
</Box>
</Box>
<Box flexDirection="column" marginTop={1}>
<Box flexDirection="column" marginBottom={1}>
<Box borderStyle="round" borderColor="promptBorder" paddingX={1}>
<Input label={">"} placeholder={`what to change in lines ${line}-${end}`} submitLabel="send" autoFocus />
</Box>
<Box flexDirection="row" columnGap={1} paddingLeft={2}>
<Text dimColor>
enter to send to Claude ·
</Text>
<Button plain dimColor label="cancel" />
</Box>
</Box>
<Box flexDirection="column" alignItems="flex-start">
<Button plain dimColor label="⎿ open the original" />
</Box>
<Box flexDirection="column" alignItems="flex-start">
<Button plain dimColor label="⎿ open the original" />
</Box>
<Box flexDirection="column" alignItems="flex-start">
<Button plain dimColor label="⎿ open the original" />
</Box>
<Box position="absolute" top={0} right={0} display="none">
<Button plain dimColor label="✎" />
</Box>
</Box>
</Box>
<Box flexDirection="column" marginTop={0}>
<Box flexDirection="column" marginTop={1}>
<Box flexDirection="column" marginBottom={1}>
<Box borderStyle="round" borderColor="promptBorder" paddingX={1}>
<Input label={">"} placeholder={`what to change in lines ${line}-${end}`} submitLabel="send" autoFocus />
</Box>
<Box flexDirection="row" columnGap={1} paddingLeft={2}>
<Text dimColor>
enter to send to Claude ·
</Text>
<Button plain dimColor label="cancel" />
</Box>
</Box>
<Box flexDirection="column" alignItems="flex-start">
<Button plain dimColor label="⎿ open the original" />
</Box>
<Box flexDirection="column" alignItems="flex-start">
<Button plain dimColor label="⎿ open the original" />
</Box>
<Box flexDirection="column" alignItems="flex-start">
<Button plain dimColor label="⎿ open the original" />
</Box>
<Box position="absolute" top={0} right={0} display="none">
<Button plain dimColor label="✎" />
</Box>
</Box>
<Box flexDirection="column" marginTop={1}>
<Box flexDirection="column" marginBottom={1}>
<Box borderStyle="round" borderColor="promptBorder" paddingX={1}>
<Input label={">"} placeholder={`what to change in lines ${line}-${end}`} submitLabel="send" autoFocus />
</Box>
<Box flexDirection="row" columnGap={1} paddingLeft={2}>
<Text dimColor>
enter to send to Claude ·
</Text>
<Button plain dimColor label="cancel" />
</Box>
</Box>
<Box flexDirection="column" alignItems="flex-start">
<Button plain dimColor label="⎿ open the original" />
</Box>
<Box flexDirection="column" alignItems="flex-start">
<Button plain dimColor label="⎿ open the original" />
</Box>
<Box flexDirection="column" alignItems="flex-start">
<Button plain dimColor label="⎿ open the original" />
</Box>
<Box position="absolute" top={0} right={0} display="none">
<Button plain dimColor label="✎" />
</Box>
</Box>
<Box flexDirection="column" marginTop={1}>
<Box flexDirection="column" marginBottom={1}>
<Box borderStyle="round" borderColor="promptBorder" paddingX={1}>
<Input label={">"} placeholder={`what to change in lines ${line}-${end}`} submitLabel="send" autoFocus />
</Box>
<Box flexDirection="row" columnGap={1} paddingLeft={2}>
<Text dimColor>
enter to send to Claude ·
</Text>
<Button plain dimColor label="cancel" />
</Box>
</Box>
<Box flexDirection="column" alignItems="flex-start">
<Button plain dimColor label="⎿ open the original" />
</Box>
<Box flexDirection="column" alignItems="flex-start">
<Button plain dimColor label="⎿ open the original" />
</Box>
<Box flexDirection="column" alignItems="flex-start">
<Button plain dimColor label="⎿ open the original" />
</Box>
<Box position="absolute" top={0} right={0} display="none">
<Button plain dimColor label="✎" />
</Box>
</Box>
</Box>
<Box flexDirection="row" columnGap={1} marginTop={1}>
<Text dimColor>
·
</Text>
0
<Text dimColor>
·
</Text>
0
<Text dimColor>
·
</Text>
0
<Text dimColor>
──
</Text>
</Box>
</Box>
)
})
on('session.start', async ($, e, next) => {
const where = '…'
const stderr = '…'
await $.ui.toast(`mdview: ${where}`)
await $.ui.toast(`mdview: could not open it (${stderr})`)
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 637–796 · Pane
on('ui.render', { component: 'Pane', requestId: PANE }, async ($, e) => {
isOpen = true
paneColumns = e.props.bodyColumns || paneColumns
const { Box, Button, Code, Markdown, Text } = $.ui.resolve(e)
const Input = e.surface === 'mobile' ? null : $.ui.resolve(e).Input
const Image = e.surface === 'terminal' ? $.ui.resolve(e).Image : null
const Raster = e.surface === 'terminal' ? $.ui.resolve(e).Raster : null
const d = await read($, doc)
await read($, rev) // subscribes: a change on disk redraws
const isTocOpen = await read($, toc)
const f = await read($, find)
const ed = await read($, edit)
const sent = await read($, pending)
// a ⎿ line, as Claude Code hangs a result under its row
const hang = (body: RenderNode, key: string) => (
<Box key={key} flexDirection="row">
<Text dimColor>{'⎿ '}</Text>
{body}
</Box>
)
if (!d) return hang(<Text dimColor>{'Click a .md path in the conversation, or run /md <path>'}</Text>, 'empty')
const v = await load($, d.path)
const units = 'note' in v ? [] : v.units
const pages = 'note' in v ? [0] : v.pages
const pageCount = (pages.at(-1) ?? 0) + 1
const page = Math.min(d.page, pageCount - 1)
const heads = units.flatMap((u, i) => (u.level > 0 ? [{ u, i }] : []))
const follow = (link: { href: string }) => press($, refOf(link.href))
// the section in view: the one last jumped to, else the first on this page
const inView = Number(/^u(\d+)/.exec(d.target ?? '')?.[1] ?? pages.indexOf(page))
// The block the edit bar is on, and the one an edit was sent from: the block with the same text, nearest where it
// was, since the file may have changed above it; a block whose text is gone has no bar (it closes rather than move).
// lazy: two blocks of identical text are told apart by the nearer line only; harmless, as either holds that text
const locate = (where: { path: string; line: number; hash: string } | null, nearest = false) => {
let at: { i: number; k: number } | null = null
let gap = Infinity
if (where?.path !== d.path) return at
for (const [i, u] of units.entries())
for (const [k, b] of u.blocks.entries()) {
if ((!nearest && b.hash !== where.hash) || Math.abs(b.line - where.line) >= gap) continue
gap = Math.abs(b.line - where.line)
at = { i, k }
}
return at
}
const editAt = locate(ed)
// Each edit sent from ✎, as a line under its block: found by its text until Claude wrote the file, then the block
// now at its lines.
const progress = sent.flatMap(p => {
const at = p.changed ? locate(p, true) : (locate(p) ?? locate(p, true))
if (!at) return []
const body =
p.done === null ? (
<Text color="claude">{p.turn ? '✶ Claude is editing…' : '✶ Waiting for Claude…'}</Text>
) : p.changed ? (
<Text color="success">Updated</Text>
) : (
<Text dimColor>No changes made</Text>
)
return [{ ...at, line: hang(body, `progress-${p.id}`) }]
})
// The keys, as Claude Code's own panels list theirs: one dim row, each a click away.
const keys = [
d.back.length > 0 && <Button key="back" plain dimColor hotkey="b" label="back" onPress={() => back($)} />,
heads.length > 1 && <Button key="toc" plain dimColor hotkey="t" label="contents" onPress={() => update($, toc, x => !x)} />,
Input && units.length > 0 && <Button key="find-toggle" plain dimColor hotkey="f" label="find" onPress={() => update($, find, x => (x ? null : { query: '', at: 0, hits: 0 }))} />,
page > 0 && <Button key="prev" plain dimColor hotkey="p" label="previous part" onPress={() => moveTo($, page - 1, null)} />,
page < pageCount - 1 && <Button key="next" plain dimColor hotkey="n" label="next part" onPress={() => moveTo($, page + 1, null)} />,
isWarp && <Button key="warp" plain dimColor hotkey="w" label="Warp" onPress={() => openWith($, [warpUrl({ abs: d.path, frag: '' })])} />,
<Button key="close" plain dimColor role="dismiss" hotkey="q" label="close" onPress={() => $.ui.close({ id: PANE })} />,
].filter(Boolean)
// items in a dim row, a dot between each
const dotted = <T,>(items: readonly T[], key: string) => items.flatMap((k, i) => (i ? [<Text key={`${key}${i}`} dimColor>·</Text>, k] : [k]))
const dir = dirname(d.path)
const meta =
'note' in v
? ''
: `${v.lines ? ` · ${v.lines} line${v.lines === 1 ? '' : 's'}` : ''}${heads.length ? ` · ${heads.length} section${heads.length === 1 ? '' : 's'}` : ''}`
const draw = (p: Part, key: string) => {
if (p.kind === 'code') return <Code key={key} source={p.source} path={p.path} startLine={p.startLine} wrap="wrap" />
if (p.kind === 'raster')
return Raster ? (
<Box key={`${key}-box`} flexDirection="column" alignItems="flex-start">
<Raster key={key} cells={p.cells} columns={p.columns} rows={p.rows} />
<Button key={`${key}-original`} plain dimColor label="⎿ open the original" onPress={() => openWith($, [p.file])} />
</Box>
) : (
<Text key={key} dimColor>{`[picture: ${p.alt}]`}</Text>
)
if (p.kind === 'img')
return Image ? (
<Image key={key} source={{ file: p.file, format: 'png' }} columns={p.columns} rows={p.rows} alt={p.alt} />
) : (
<Text key={key} dimColor>{`[picture: ${p.alt}]`}</Text>
)
return p.hrefs.length ? (
<Markdown key={key} text={p.text} pressableLinks={p.hrefs} onLinkPress={follow} />
) : (
<Markdown key={key} text={p.text} />
)
}
// a part boundary, as a dim rule
const rule = (text: string, key: string) => (
<Text key={key} dimColor wrap="truncate-end">
{`── ${text} ${'─'.repeat(Math.max(0, paneColumns - text.length - 4))}`}
</Text>
)
return (
<Box flexDirection="column">
{/* the file, as Claude Code names one in its rows: ⏺ name, then where and how big, dim */}
<Box flexDirection="row">
<Text>{'⏺ '}</Text>
<Text bold>{basename(d.path)}</Text>
<Text dimColor wrap="truncate-start">{` ${tilde(dir)}${meta}`}</Text>
</Box>
<Box flexDirection="row" flexWrap="wrap" columnGap={1} marginBottom={1}>
{dotted(keys, 'dot')}
</Box>
{f && Input && (
// the find row, as Claude Code's history search reads: search: <text> 2/5
<Box flexDirection="row" gap={1} marginBottom={1}>
<Box flexGrow={1}>
<Input key="find" label="search:" placeholder="text in this file" value={f.query} submitLabel="next" autoFocus onSubmit={q => findNext($, q)} />
</Box>
{f.query !== '' && <Text dimColor>{f.hits ? `${f.at + 1}/${f.hits}` : 'no match'}</Text>}
</Box>
)}
{isTocOpen && (
// the contents, as Claude Code's own menus list: the section in view marked, a row lights while hovered
<Box flexDirection="column" marginBottom={1}>
{heads.slice(0, 200).map(({ u, i }) => (
<Box key={`tocrow-${i}`} flexDirection="row">
<Text color="suggestion">{i === inView ? '› ' : ' '}</Text>
<Button
key={`toc-${i}`}
plain
hover={{ color: 'suggestion' }}
label={`${' '.repeat(u.level - 1)}${u.title}`.slice(0, Math.max(10, paneColumns - 4))}
onPress={() => goUnit($, i)}
/>
</Box>
))}
</Box>
)}
{pageCount > 1 && page > 0 && rule(`part ${page + 1} of ${pageCount}`, 'rule-top')}
{'note' in v && hang(<Markdown key="note" text={v.note} />, 'note')}
{units.flatMap((u, i) => {
if (pages[i] !== page) return []
const firstPart = u.blocks.map((_, k) => u.blocks.slice(0, k).reduce((n, b) => n + b.parts.length, 0))
return [
// a blank line between sections and between blocks, as the file itself reads
<Box key={`sec${i}`} flexDirection="column" marginTop={pages.indexOf(page) === i ? 0 : 1}>
{u.blocks.map((b, k) => (
// each block a hover scope: while the pointer is over it, it takes the background Claude Code gives
// your own prompts, and shows its ✎Licence text (MIT)
MIT License Copyright (c) 2026 Anji Xu 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 varsdrives Claudetool calls
What its code shows
Read from the source at commit da6465567145 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.hooks/register.tsx |
| Parses | Every file parses as TypeScript or JavaScript.3 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).hooks/register.tsx:134 sips (not on Windows); hooks/register.tsx:176 rm (not on Windows); hooks/register.tsx:381 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, rm, 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.prompt.submit (as the person), adds command md, adds tool show |
| 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: tool.call (mcp__mdview__show), command.run (md) · reads: classic.CwdChanged · also: session.start, ui.close, ui.render (AssistantMessage, ToolUse, UserMessage (+1)), turn.start (+1) · timers: clock.every |
| 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: HOME, CLAUDE_CODE_FORCE_TERMINAL_IM…, TERM, TERM_PROGRAM, KITTY_WINDOW_ID (+1); files: a path computed at run time, …/mdview-….bmp |
| 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.settings (config.set) |
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 xuanji86/claude-mdview/plugin install mdview@claude-mdview/reload-pluginsThis installs the marketplace's latest commit, which may not be the one read here (da6465567145). 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/xuanji86/claude-mdviewgit -C claude-mdview checkout da646556714507acf5d41610605b9911eb9aa42aclaude plugin validate claude-mdviewclaude --plugin-dir claude-mdviewThe 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 "xuanji86-mdview" with its code and make me one like itSearch them from Claude: the MCP connector
Similar mods
- desktop-markdown-readerYash Thakker★ 3
- human-tasksAndrew Stephenson★ 2
- pr-commentsaguiddir★ 2
- sc-workspaceSimpleCORE★ 2
- file-explorerIT-BAER★ 1
- prdeckVishal K Setti★ 1
More by Anji Xu
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/xuanji86-mdview/)