Skip to content
Back to skills

Preview

ASecurity

Preview a Markdown file in the cmux built-in browser (supports partial filename matching)

  • 6 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added May 26, 2026
toolsshellbash

Security analysis

A100/100

Scanned May 27, 2026

npx -y skills add monzou/mo-cmux --skill preview --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Preview?

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

Security grade badge for Preview
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/monzou-preview/badge)](https://www.skillsdirectory.com/skills/monzou-preview)

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: mo
description: Preview a Markdown file in the cmux built-in browser (supports partial filename matching)
argument-hint: "[file-path]"
allowed-tools:
  - Bash
  - Write
  - Read
---

# Markdown Preview

Preview the most recently generated Markdown content or a specified file in the cmux built-in browser.

## Markdown files in the current directory

!`ls -1 *.md 2>/dev/null | head -20`

## Steps

### When an argument is provided

1. If `$ARGUMENTS` is an existing file path, open it directly.
2. Otherwise, treat `$ARGUMENTS` as a **partial match pattern** and search for `.md` files whose name contains the argument (case-insensitive). Use the Markdown file list above.
   - **Exactly one match** — open that file.
   - **Multiple matches** — show the matches and ask the user which one to open.
   - **No matches** — tell the user no matching `.md` file was found.

Run the following with the Bash tool. **You must set `run_in_background: true`. Do not append `&` to the command.**

```bash
${CLAUDE_PLUGIN_ROOT}/scripts/mo-cmux <resolved-file-path>
```

### When no argument is provided

Check the preceding conversation for Markdown context:

- **If an existing `.md` file was being discussed or edited**, open that file directly so that live-reload works on the original file:

```bash
${CLAUDE_PLUGIN_ROOT}/scripts/mo-cmux <path-to-the-file>
```

- **If the Markdown was generated inline** (not saved to a file), write it to `/tmp/claude-preview.md` (using the Write tool) and then open it:

```bash
${CLAUDE_PLUGIN_ROOT}/scripts/mo-cmux /tmp/claude-preview.md
```

Run with the Bash tool. **You must set `run_in_background: true`. Do not append `&` to the command.**

## Important

- **Run with `run_in_background: true`. Do not append `&` to the command.** Appending `&` causes the shell to exit immediately, which also terminates mo-cmux.
- mo automatically detects file changes and reloads, so updating the file will refresh the browser automatically.
- If the user continues the conversation and the Markdown is updated after previewing, simply overwrite the same file to trigger an automatic reload.

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.

Comments

Loading comments…

Newsletter

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