Skip to content
Back to skills

Markdown Reader

ASecurity

Serves markdown as a local book reader. NOT for mk:preview.

  • 17 stars
  • 0 votes
  • 3 copies
  • 10 views
  • Added September 6, 2026
ai-agentsrustgobashnode

Works with

  • cli

Security analysis

A96/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 20 files and shows the line behind each finding

Scanned November 26, 2026

npx -y skills add ngocsangyem/MeowKit --skill markdown-reader --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Markdown Reader?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Markdown Reader
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ngocsangyem-markdown-reader/badge)](https://www.skillsdirectory.com/skills/ngocsangyem-markdown-reader)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: mk:markdown-reader
description: "Serves markdown as a local book reader. NOT for mk:preview."
user-invocable: true
version: 1.0.0
source: port
keywords:
  - markdown
  - viewer
  - reading
  - long-form
  - server
  - browser
  - plan-navigation
  - mermaid
  - local-server
  - book-reader
when_to_use: "Read an RFC or design doc."
argument-hint: <file-or-directory> [--stop]
owner: utility
criticality: medium
status: active
runtime: claude-code
---

# mk:markdown-reader

Local HTTP server rendering markdown files with a calm, book-like reading experience.

Use it to read a long document (an RFC, a plan, a design doc) in the browser. A self-contained HTML file from `mk:brainstorming --html` opens directly and does not need this server.

## Installation (Required Before First Use)

This skill requires npm dependencies. Install once from the project root:

```bash
cd ${CLAUDE_SKILL_DIR}
npm install
```

**Dependencies:** `marked`, `highlight.js`, `gray-matter`

Without installation you will get **Error 500: Error rendering markdown**.

## Usage

```bash
# View a markdown file (opens the browser; with no display it prints the URL)
node ${CLAUDE_SKILL_DIR}/scripts/server.cjs \
  --file ./tasks/plans/my-plan/plan.md

# Browse a directory
node ${CLAUDE_SKILL_DIR}/scripts/server.cjs \
  --dir ./tasks/plans

# Keep the process attached (for hosts that run it as a foreground task)
node ${CLAUDE_SKILL_DIR}/scripts/server.cjs \
  --file ./README.md \
  --foreground

# Stop all running instances
node ${CLAUDE_SKILL_DIR}/scripts/server.cjs --stop
```

The server binds to `127.0.0.1` (localhost) only. Served files are not reachable from
other devices on the network — this is intentional.

## Lifecycle

Start with `--file` or `--dir`; use `--foreground` when the host needs to keep the process attached. The default port is 3456 and increments through 3500 if busy. Tell the user the URL and port. If no browser can open (headless, SSH), print the URL instead.

The reader exists so a person can read in the browser, so keep it running while they do. Stop it with `--stop` when the user says they are finished or asks, and do not leave it running past the end of the session.

| Need | Route |
|---|---|
| CLI flags, routes, persistent state | [references/reader-operations.md](references/reader-operations.md) (options and routes section) |
| Reader features, plan navigation, shortcuts, Mermaid | [references/reader-experience.md](references/reader-experience.md) |
| Architecture and troubleshooting | [references/reader-operations.md](references/reader-operations.md) (state and recovery section) |

The server binds only to `127.0.0.1` and answers only requests whose Host is `127.0.0.1:<port>` or `localhost:<port>`. It resolves symlinks before checking a path against its allowed directories and never serves dotfiles or credential-like names; any of these returns 403. Markdown is untrusted: raw HTML in it is shown as text, `---js` front-matter is not run, and pages allow only the reader's own scripts. Referenced images must be relative to the source markdown file.

## Gotchas

- **Error 500 on render**: dependencies are missing; run `npm install` in the skill directory.
- **All ports 3456-3500 busy**: stop stale instances with `--stop`.
- **A PID survives `--stop`**: remove the stale PID file named in `references/reader-operations.md`.

Files in this skill

  • SKILL.md3.2 KB
  • assets/directory-browser.css2.9 KB
  • assets/favicon.ico15 KB
  • assets/novel-theme.css612 B
  • assets/reader.js25.5 KB
  • assets/styles/novel-theme-base.css1013 B
  • assets/styles/novel-theme-components.css3.8 KB
  • assets/styles/novel-theme-content.css2.9 KB
  • assets/styles/novel-theme-header.css3.9 KB
  • assets/styles/novel-theme-mermaid.css3.1 KB
  • assets/styles/novel-theme-overlays.css3.6 KB
  • assets/styles/novel-theme-responsive.css4.5 KB
  • assets/styles/novel-theme-sidebar.css6.2 KB
  • assets/styles/novel-theme-variables.css1.4 KB
  • assets/template.html6 KB
  • package.json368 B
  • references/reader-experience.md625 B
  • references/reader-operations.md1.1 KB
  • scripts/lib/http-server.cjs11.4 KB
  • scripts/lib/markdown-renderer.cjs9.7 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.