<!-- source: https://github.com/teajuw/md-reader/tree/bc7dbf5f331f0eefcf3ba555ecbd474f6e9e3313 | last updated: 2026-11-01 | page: https://trevorju.dev/md-reader/ -->

# md-reader

Double-click a Markdown file. Read it in Claude Desktop. No tokens.

## How it works

Finder hands the file to a tiny app. The app notes the file's path and brings up the `md-reader` session, a session that does nothing but show files. That session links the file into its own folder and opens it in the Files pane. No model is involved, so opening a file costs nothing and takes about a second.

Every file you open stays in that folder as a link, so the session's file tree is your reading history. A link is the same file under a second name, not a copy: nothing is ever written to your files. If the file you're reading changes on disk, the page updates within a second.

The session can see only its own folder. The one way a file gets in is you opening it. The session is for reading, so keep in mind that anything you say in it can see the files you've opened.

## Use it

- Double-click a `.md` file in Finder.
- Leave a file open while an agent edits it. The page follows the changes.
- Click any file in the session's tree to read it again.

## Install

```text
/plugin install md-reader --marketplace teajuw/md-reader
```

Then, in any Code session:

```text
/md-reader:start
```

Choose **Auto** (or **Manual** to approve each step). Setup is one short Haiku turn, and it ends by telling you how to make `md-reader` the default for `.md` files.

## Remove

```text
/md-reader:uninstall
```

## Good to know

- Setup compiles a small AppleScript app, `md-reader.app`, into `~/Applications`, signs it ad hoc with `codesign`, and registers it with Launch Services so Finder lists it under Open With. Its only job is handing paths to Claude Desktop; the source is in `handler/`.
- Everything md-reader writes lives in `~/Applications/md-reader.app` and `~/.claude/md-reader`. Nothing is sent anywhere: no network, no telemetry.
- The plugin's hooks module runs only in the `md-reader` session, and only acts on its own folder. Once a second it looks there for the note the app leaves, `_opening <file>`, which holds the file's path. When it finds one it asks Claude Desktop whether the session is on screen (`get_layout`), links the file in with `/bin/ln -f`, removes the note with `/bin/rm`, and opens the link with `show_pane`. While a file is open it compares the original's size and date each second and links it again when they change. Those are the only commands and tools it uses, and none of them send anything out.
- If the `md-reader` session is in split view, files open beside your work. Otherwise they take over the main pane. Right-click the session in the sidebar → Open in → Split view to set up the split once.
- If Claude Desktop is closed, the first file takes a while, because the app has to start.
- If a file doesn't open, run `/md-reader:start`. If nothing happens at all, check that `md-reader` is still the Finder default for `.md` files.
- Problems or questions: [GitHub Issues](https://github.com/teajuw/md-reader/issues).
- macOS only, and it relies on app behavior that isn't a public API, so an update could break it.

---

## Notes

### What it is
A Claude Code plugin for macOS that makes Claude Desktop the viewer for Markdown files: double-click a `.md` file in Finder and it opens in the Files pane of a dedicated session, with no model call. Version 0.2.1, MIT.

### Where things are
- `handler/` — the Finder side. `handler.applescript` is the default app for `.md` files: it writes the file's path into a note named `_opening <file>` in `~/.claude/md-reader` and brings the session forward with a `claude://` link. `build.sh` compiles it into `~/Applications/md-reader.app`, sets its document types and icon, signs it ad hoc and registers it with Launch Services.
- `hooks/` — the Claude side. `register.ts` runs only in the session whose folder is `~/.claude/md-reader`. Once a second it looks for the note, checks the session is on screen (`get_layout`), hard-links the file into the folder, deletes the note and opens the link with `show_pane`. While a file is showing it re-links it when the original's size or date changes.
- `skills/` — `start` creates the dedicated session (Haiku, low effort) and hands it the install prompt; `install` builds the app and pins the session; `uninstall` removes both.
- `.claude-plugin/` — `plugin.json` and `marketplace.json`: the listing, version, icon and links.

### How to run it
- Install: `/plugin install md-reader --marketplace teajuw/md-reader`, then `/md-reader:start` in any Code session.
- Rebuild the Finder app by hand: `sh handler/build.sh`.
- Remove: `/md-reader:uninstall`.
- There are no tests. Checking it means double-clicking a Markdown file with Claude Desktop open.

### Tried and dropped
From the commit history, all on 2026-11-01:
- A `/read` command for opening files from inside a session. Removed; Finder is the only way in.
- Several reader sessions. Limited to one.
- History kept in `~/md-reader`. Moved to `~/.claude/md-reader`.
- A tracker, a suffix on linked file names, and copying files that live on another disk. All dropped; a file on another disk cannot be hard-linked.
- A setup page shown by the session, and the step in the start prompt that opened it.

### Parked
Nothing recorded in the repo.
