View or open Markdown files: surface full content over remote control, or open locally in the macOS default app

Install

/plugin install markdown-tools@powdream-plugins

Run it inside Claude Code after adding the marketplace with /plugin marketplace add powdream/claude-plugins.

Contents

Discovered from source

Skills 2

md-open-local

Open a Markdown file in the local Mac's default app so the user can read it on the machine in front of them.

When to use vs md-view-remote

  • md-open-local (this): user is at the Mac → open the file in its default viewer.
  • md-view-remote: user is on remote control (phone/web) → surface the full file text into the conversation.

If unsure which, default to this one only when the user explicitly says "local / 로컬"; otherwise ask which.

Procedure

  1. Resolve the target file:
    • Explicit argument if given.
    • Else the Markdown file most recently produced/referenced this session (e.g. a spec you just wrote).
  2. Open it:
    open "<file.md>"
    
  3. Confirm with the path opened. Do not also dump the contents (that's md-view-remote's job).

Notes

  • open uses whatever app is registered for .md on this Mac. Pass -a "<App>" only if the user names a specific app.

md-view-remote

Send a Markdown file to the user with SendUserFile so they can read its full content over remote control, where opening a local app is not possible.

Rule

Send the file itself. The user receives the whole file as written — do not summarize, excerpt, or paraphrase. Delivering the verbatim file is the deliverable; a summary is a failure of this skill. A request like "xx 읽어줘 / 전문 띄워줘" means the user gets the whole file.

Do not Read the file or paste it into the chat. The file content never enters your context, so the cost does not grow with file size.

Procedure

  1. Resolve the target file as an absolute path:

    • Explicit argument if given.
    • Else the Markdown file most recently produced/referenced this session.
  2. Confirm it exists: ls <absolute path>.

  3. Call SendUserFile. If its schema is not loaded yet (deferred tool), run ToolSearch with select:SendUserFile first. Several files go in one call.

    SendUserFile({
      files: ["/abs/path/to/doc.md"],
      display: "attach",
      status: "normal"
    })
    

    Use display: "attach" (a file card); sending .md with render has not been tried, so inline rendering is unverified.

  4. Add at most a one-line pointer to the path.

Fallback

If SendUserFile is not found by ToolSearch, or the call returns NOT be delivered, Read the file in full (across multiple calls if it is large) and output its full content verbatim in the chat. State the fallback and the error text in one line.

Delivery depends on the session. A session started from the iOS app fails with this session is not on a project thread; a session started from the CLI with remote control enabled delivers.

When to use vs md-open-local

  • md-view-remote (this): remote control → the file is sent to the user.
  • md-open-local: at the Mac → open in the default app.

Sponsors

Details

Marketplace
powdream/claude-plugins
Source
plugins/markdown-tools
Category
Community

More from powdream/claude-plugins

All 8