Skip to content
Back to skills

Mac Preview

ASecurity

Open a running local website from a devbox session in the browser on the mac. Use when the user says "show it on the mac", "open it in the browser on the mac", "preview on the mac", "show/open the web on my mac" — typically after starting a dev server (npm run dev, Vite, Next…).

  • 4 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 6, 2026
developmentdocker

Security analysis

A100/100

Scanned November 6, 2026

npx -y skills add bohous04/devbox --skill mac-preview --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Mac Preview?

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

Security grade badge for Mac Preview
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/bohous04-mac-preview/badge)](https://www.skillsdirectory.com/skills/bohous04-mac-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: mac-preview
description: Open a running local website from a devbox session in the browser on the mac. Use when the user says "show it on the mac", "open it in the browser on the mac", "preview on the mac", "show/open the web on my mac" — typically after starting a dev server (npm run dev, Vite, Next…).
---

# mac-preview

Opens a website running in the devbox container in the browser on the user's mac.

## When to use

The user wants to see a running local website (dev server) on their mac — e.g. after
`npm run dev`. Phrases: "show it on the mac", "open it in the browser on the mac",
"preview on the mac", "show it on my mac".

## How

Run in the container session:

```
preview [port] [/path]
```

- `preview` without a port → autodetects the running server (exactly one → opens it;
  several → prints a list and wants a port; none → help).
- `preview 3000` → a specific port. `preview 3000 /admin` → with a path too.

It prints `▸ preview: http://…` and opens it in the browser on the mac.

## Mental model (why it works)

- The session publishes container ports **3000–3009** to the tailnet; the mac is in the same
  tailnet, so it opens the URL directly.
- `preview` handles two footguns automatically via a **relay**: when the server listens only
  on `127.0.0.1` (Docker does not let that out) or runs on a port outside 3000–3009
  (e.g. Vite 5173), `preview` starts a lightweight relay on a free published port. There is no
  need to configure anything or to start the server with `--host`.

## Limitations

- Works only **inside a devbox session** (the `DEVD_SESSION_ID` variable). On the mac itself,
  `preview` does not exist — do not run it there.
- Several running servers → specify the port explicitly.
- When the mac is offline / outside the tailnet, `preview` prints the URL to open manually.

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 development →

Comments

Loading comments…

Newsletter

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