agentleFS
vedant-aggarwalvedant-aggarwal/preview-hub/skills/preview/SKILL.md

preview

Skill0 starsChanged 14 days agoMITView on GitHub

Share anything running or stored on this computer as a permanent public link (<public-url>/<id>/) using the `preview` CLI from preview-hub. Use instead of `cloudflared tunnel --url`, trycloudflare or quick ngrok links whenever the user (or anyone off this machine) needs to open a local dev server, HTML page, video, image, PDF or folder - "send me a link", "preview this", "share this video", "host this folder", "I'm away, show me". Also for stopping, restarting, extending or listing those previews, and for MCP tokens for bots.

  • Reads credentials

23 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use ml-training-recipe, replication and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • getcompanion-aiSkill

    ml-training-recipe

    Find implementable ML training recipes from papers, datasets, docs, and code. Use when the user wants to fine-tune, train, reproduce, or choose a practical ML method, dataset, hyperparameter setup, or benchmark recipe.

    Also in 3 projects that use this

  • getcompanion-aiSkill

    replication

    Plan a replication of a paper, claim, or benchmark, and execute only after an explicit environment choice. Use when the user asks to replicate results, reproduce an experiment, verify a claim empirically, or build a replication package.

    Also in 3 projects that use this

  • brainbytes-devSkill

    alpha-research

    Also in 3 projects that use this

  • JaimeParkerSkill

    paper-code-audit

    Perform three-way cross-validation of a research paper by comparing the original paper text (via Zotero), official code implementation (via Git), and personal Obsidian notes. Use this skill whenever the user wants to "audit a paper", "verify paper claims against code", "cross-check notes with implementation", "triangulate paper + code + notes", "find discrepancies between paper and code", or mentions wanting a deep, structured comparison of a paper's claims against its implementation and their own notes. Also trigger when the user asks to "analyze this paper thoroughly" with code available, or when they want to systematically reconcile what the paper says, what the code does, and what their notes claim.

    Also in 3 projects that use this

  • JimLiuSkill

    pdf-explore

    Use this skill when the user has attached a PDF, paper, report, or other document and the answer needs content from more than one place in it: summarize the methods or any other section, compare sections, find where a topic is discussed, read a value or label off a figure or chart, or find/list/extract every instance of something across the whole document (datasets, benchmarks, citations, figures, table rows, accession numbers — including appendices). Skip it only for a single lookup of 1–4 pages quoted in your very next response — `read_file(pages=[...])` attaches pages as images that are dropped from context after one turn, so multi-section answers end up re-reading the same ranges repeatedly. Parses the PDF once in the Python kernel: `pdf_pages` (pages as persistent text), `pdf_outline` (TOC), `pdf_scan` (rank pages by relevance), `pdf_map`/`pdf_extract` (per-page summary / structured fields via parallel haiku calls). For PDF creation/manipulation, use reportlab/pypdf directly.

    Also in 3 projects that use this

  • KISHOR403Skill

    session-search

    This skill should be used when searching Claude Code session transcripts with semantic understanding. Triggers on queries like "find sessions about X", "when did I work on Y", "search previous conversations". Supports natural language queries with synonym matching.

    Also in 3 projects that use this

  • +1 more from getcompanion-ai

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 0 are distinctive, and 5 are very specific to this project.

  • 0

    Common

    Most of the 13 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run preview first: it prints the hub status and the dashboard URL.

    line 10
  2. Very specific:

    Use this before reaching for a quick tunnel.

    line 64
  3. Very specific:

    Check the server answers before you send a link to one you attached (status: live).

    line 65
  4. Very specific:

    Don't publish secret folders, .env files, or the whole home directory.

    line 67
  5. Very specific:

    When you finish, stop servers you no longer need (preview stop <id>), or leave the TTL to do it.

    line 68

“Common” is measured: kept by at least 6 in 10 of the 13 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

preview: permanent preview links

preview publishes a local server, file or folder at <public-url>/<id>/. Links survive restarts and do not expire after two hours like a quick tunnel. The user sees every preview on the dashboard at the public URL with no path (live ones on top, stopped ones below with their last snapshot and a Start button).

Run preview first: it prints the hub status and the dashboard URL. If the command is missing or says public: not set, the hub is not set up yet; offer to follow ONBOARDING.md in the preview-hub repo.

Publish

Server already running (you started it in this session):

preview add 5173 --name "Landing page" --cmd "npm run dev" --cwd /path/to/project --by claude

The hub attaches to the running port. --cmd and --cwd are saved so the user can press Start on the dashboard after your server dies.

Let the hub start and own the server (preferred when you don't need it in your own terminal; the hub kills it at expiry):

preview add --start --cmd "npm run dev" --cwd /path/to/project --name "App" --ttl 4h --by claude

The port is read from the server's output. Pass a port first (preview add 3000 --start --cmd ...) when the command does not print its URL.

Files and folders (videos stream with seeking, images, PDFs, audio and text get a viewer, a folder with index.html is served as a site, and other folders get a media grid):

preview add "/path/to/Launch Film.mp4" --by claude
preview add /path/to/dist --name "Landing build" --ttl 2d --by claude

The result prints url. Send that URL to the user. Adding the same target again returns the same link (already: true) and restarts it if it was stopped, so re-running is safe.

Flags worth choosing

  • --ttl: 30m, 4h (server default), 2d, 7d (file default), never. Pick the shortest that covers the need. Expiry stops the preview and kills hub-started servers.
  • --by <agent>: always set it (claude, codex, ...). The dashboard shows it.
  • --private: viewers must log in with the hub passcode. Default links are open to anyone who has them.
  • --entry /dashboard: open the link at a sub-path.

Manage

preview                    # running previews + hub/tunnel status
preview list --all         # include stopped
preview show <id>          # details + last log lines
preview stop <id>          # unpublish. Kills the server only if the hub started it. Snapshot stays
preview start <id>         # bring back (runs the saved --cmd if the port is down)
preview restart <id>
preview edit <id> --ttl 4h # also --name --target --cmd --cwd --private true|false
preview logs <id>
preview rm <id>            # delete preview + snapshot
preview login-link         # one-time URL that logs the owner's browser into the dashboard for a year

MCP for bots

  • Cloud bots (Grok, claude.ai, ChatGPT connectors): preview mcp token <bot-name> prints a connector URL <public-url>/_hub/mcp/<token> once, and the user pastes it as a custom connector. Add --qr for the phone app: it prints a QR in the terminal and saves a PNG to scan. preview mcp revoke <bot-name> cuts access. These bots get remote-safe tools.
  • Local agents that only speak MCP: node <repo>/bin/preview-mcp.js (stdio, full access).
  • Agents with a shell should use the CLI.

Rules

  • Use this before reaching for a quick tunnel. Fall back to one only when preview hub status says the hub cannot run.
  • Check the server answers before you send a link to one you attached (status: live). down means the hub reached nothing: start the server or use --start.
  • Dev servers work through the link, including hot reload. Apps that hard-code http://localhost:<port> in API calls break off this machine. Point them at relative paths.
  • Don't publish secret folders, .env files, or the whole home directory. A folder link exposes every file under it.
  • When you finish, stop servers you no longer need (preview stop <id>), or leave the TTL to do it.

How it works (for debugging)

  • Data: ~/.preview-hub (state.json, cache/ snapshots, shots/, logs/hub.log). preview hub logs shows the hub log.
  • Port 7420 is the public side behind the tunnel (dashboard needs the passcode), and 7421 is loopback-only and trusted (CLI, screenshots).
  • Absolute asset paths (/assets/x.js) resolve through the Referer or a pvh_ctx cookie, so most apps work without a base path.
  • A stopped or unreachable preview serves the last cached responses with a "Start server" banner.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.