Agent skill

Preview Md

by 312362115 in 312362115/claude

MD 文件浏览器预览:GitHub 风格渲染 + 左侧自动目录. An agent skill from 312362115/claude.

MITAuto-check passed

Install Preview Md

skills CLI
$ npx skills add 312362115/claude --skill preview-md -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install 312362115/claude preview-md --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/312362115/claude.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/preview-md .claude/skills/preview-md && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
preview-md
GitHub stars
107
Token cost
~636 tokens
SKILL.md length
178 words
Files
6 (incl. scripts)
Skills in repo
20
Repo updated
First seen
Licence
MIT

At a glance

MD 文件浏览器预览:GitHub 风格渲染 + 左侧自动目录. An agent skill from 312362115/claude.

  • Works in 3 steps: 询问用户 → 用户确认后打开预览 → 等待反馈
  • SKILL.md covers 触发条件, 执行流程, 注意事项 and 扩展语法:terminal / flow 代码块
  • Runs Shell, Python and JavaScript scripts from its folder; calls node

What it does

Preview Md is an agent skill from 312362115/claude. MD 文件浏览器预览:GitHub 风格渲染 + 左侧自动目录。 在完成方案设计(specs)或开发计划(plans)的 MD 文件后触发。 询问用户是否要在浏览器中打开预览,确认后执行。 触发词:方案写完、计划写完、review MD、预览文档。 工作流位置:task-start 方案产出后 / 任意 MD 文档完成后

Its SKILL.md is about 640 tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files, including scripts (for example `CHANGELOG.md`, `scripts/md-notify.sh` and `scripts/md-preview.py`).

It works with GitHub. The licence is MIT.

Example prompts

  • “/preview-md”

Requirements

  • Python 3
  • Node.js
  • A Bash shell

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. 询问用户
  2. 用户确认后打开预览
  3. 等待反馈

What it can do on your machine

Read from SKILL.md and the folder at commit 2d4fa49. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 3 files in scripts/ (Shell, Python and JavaScript), which the agent can run.

    Shell commands in SKILL.md call:

    • node

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Preview Md loads about 636 tokens when it runs. Until then it costs about 43 tokens; SKILL.md has 178 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~43
When it runs · the whole SKILL.md, loaded when a task matches
~636

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from 312362115/claude at commit 2d4fa49, republished under its MIT licence (© 312362115). 178 words, ~636 tokens.

Download SKILL.mdSave it as .claude/skills/preview-md/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.
name
preview-md
description
MD 文件浏览器预览:GitHub 风格渲染 + 左侧自动目录。 在完成方案设计(specs)或开发计划(plans)的 MD 文件后触发。 询问用户是否要在浏览器中打开预览,确认后执行。 触发词:方案写完、计划写完、review MD、预览文档。 工作流位置:task-start 方案产出后 / 任意 MD 文档完成后
version
1.1.0
last_updated
2026-03-30
repository
https://github.com/312362115/claude
changelog
skills/preview-md/CHANGELOG.md

MD 文件浏览器预览

写完方案/计划等需要 review 的 MD 文件后,用浏览器打开 GitHub 风格预览。


触发条件

当你(Claude)完成以下类型的 MD 文件创建或大幅修改时,必须触发此 skill:

  1. 方案设计文档(docs/specs/**/*.md)
  2. 开发计划文档(docs/plans/**/*.md)
  3. 用户明确要求预览的任何 MD 文件

不可跳过原则:满足上述触发条件时,必须执行 Step 1 询问用户是否预览。Claude 不得以任何理由(如"纯后端文档"、"内容简单"、"不涉及 UI"等)自行判断跳过。是否预览由用户决定,不由 Claude 决定。

不触发 的场景:

  • 非 .md 文件:HTML、JSON、YAML 等其他格式文件不走此 skill(HTML 原型直接用 open 命令打开)
  • memory 文件、CLAUDE.md、README.md 等非 review 类文件
  • 对 MD 文件的小幅修改(如修错别字、更新状态标记)

执行流程

Step 1: 询问用户

MD 文件写完后,向用户提问:

文件已创建:<文件路径>
要在浏览器中打开预览吗?
Step 2: 用户确认后打开预览

用户确认后,执行:

bash
node ~/.claude/skills/preview-md/scripts/preview-md.mjs <md-file-absolute-path>
Step 3: 等待反馈

预览打开后,等待用户 review 反馈,根据反馈修改文档内容。


注意事项

  • 脚本位置在 ~/.claude/skills/preview-md/scripts/preview-md.mjs
  • 脚本会生成临时 HTML 文件并用默认浏览器打开
  • 渲染特性:GitHub Markdown CSS + 左侧固定目录(h1-h4)+ 滚动高亮 + 平滑跳转

扩展语法:terminal / flow 代码块

preview-md 在标准 Markdown 之上提供两种轻量图示代码块,专为"不想调 diagram skill 但又想比纯文字更有画面感"的场景设计。生产端(writing / deep-research 等)应按本节约定输出。

```terminal — 终端窗口

展示命令行操作、CLI 输出、安装/启动步骤时使用。渲染为 macOS 风格的终端窗口(红黄绿圆点 + 标题栏)。

何时用:

  • 展示一段命令执行(单条或多条)
  • 展示命令的输出示例
  • 开发指南/快速开始中的 setup 步骤

何时别用:

  • 单条命令且没有特殊格式 → 用普通 ```bash 即可
  • 纯代码片段(非 shell 语境)→ 用对应语言的代码块

语法:首行可选 $ title 作为窗口标题,其余为内容。

markdown
```terminal
$ 快速开始
npm install
npm run dev
# 服务启动在 http://localhost:3000
```
```flow — 轻量流程图

展示流程、决策树、步骤串联时使用。比调 diagram skill 更快、更贴近正文,适合简单到中等复杂度的线性/分叉流程。

何时用:

  • 方案中的"执行步骤"示意
  • 决策树(含 ?/? 的节点自动高亮为决策样式)
  • 工作流阶段串联

何时别用:

  • 复杂的多分叉合流、有向图 → 调 diagram skill 画真正的流程图
  • 时序交互(多角色)→ 调 diagram skill 画时序图

语法:

形态写法渲染
竖向主干每行一个节点,↓ 单独一行作为连接符主干 pill 居中列,↓ 对齐主干
横向流一行内用 → 分隔多个节点平铺横向 pill 链
横竖混合主干竖向,某一行内嵌 → 分支主干走中间列,分支向右延伸
决策节点节点文本含 ? 或 ?黄底带边框 pill
注释节点后追加 (xxx)灰色注释文字挂在节点右侧

示例:

markdown
```flow
task-manager
↓
task-start(对焦 + 方案)
↓
task-execute → 编码 → 调试
↓
需求完成?→ task-finish → 标 done
```

设计原则:

  • flow 块中不要写长句,每个节点控制在 10 字内,超长的信息放正文说明
  • → 扩展只用于挂 1-3 个分支节点;再多就该拆成多行或改调 diagram
  • 一个 flow 块表达一个完整小流程,别把多个无关流程塞进同一个块

© 312362115, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 5 other files (scripts) in skills/preview-md of 312362115/claude.

  • SKILL.md
  • CHANGELOG.md
  • VERSION
  • scripts/md-notify.sh
  • scripts/md-preview.py
  • scripts/preview-md.mjs

Open the folder on GitHubat commit 2d4fa49

Compare with similar skills

Preview Md next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Preview Md compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Preview Md this skill312362115/claude107—~636Automated safety check: PassMIT
PR Babysitteropeninterpreter/openinterpreter69k3 repos~4.2kAutomated safety check: PassApache-2.0
Diagnosing Superpowers Sessionsobra/superpowers297k3 repos~1.7kAutomated safety check: PassMIT
Greplooponyx-dot-app/onyx32k4 repos~3.3kAutomated safety check: PassMIT
GitHub Deep Researchbytedance/deer-flow84k4 repos~1.3kAutomated safety check: PassMIT
Update V8 Versionopeninterpreter/openinterpreter69k2 repos~845Automated safety check: PassApache-2.0

Similar skills

  • PR Babysitter

    openinterpreter/openinterpreter

    Watches an open GitHub pull request until it merges, handling review comments, diagnosing CI failures and retrying flaky checks along the way.

    69k GitHub starsUsed in 3 repos~4.2k tokens
    DevelopmentAuto-check passed
  • Investigates a session where Superpowers went wrong, reads the transcripts on disk and produces an evidence-cited report, optionally prepared as a bug report for the maintainers.

    297k GitHub starsUsed in 3 repos~1.7k tokens
    Agent WorkflowsAuto-check passed
  • Greploop

    onyx-dot-app/onyx

    Iteratively improves a PR (GitHub), MR (GitLab), or shelved changelist (Perforce) until Greptile gives it a 5/5 confidence score with zero unresolved comments.

    32k GitHub starsUsed in 4 repos~3.3k tokens
    DevelopmentAuto-check passed
  • GitHub Deep Research

    bytedance/deer-flow

    Researches a GitHub repository over four rounds using the GitHub API and web search, then writes a structured markdown report with timeline, metrics and Mermaid diagrams.

    84k GitHub starsUsed in 4 repos~1.3k tokens
    Research & ScienceAuto-check passed
  • Update V8 Version

    openinterpreter/openinterpreter

    Bumps the pinned v8 and rusty_v8 versions in Codex, validates the release-candidate path with the v8-canary check, and traces failures to upstream build changes.

    69k GitHub starsUsed in 2 repos~845 tokens
    DevOps & CloudAuto-check passed
  • Last30days

    mvanhorn/last30days-skill

    Research what people actually say about any topic in the last 30 days.

    64k GitHub stars~7.9k tokensUpdated today
    Research & ScienceAuto-check: notes

More from 312362115/claude

All 20 skills in this repo
  • Diagram

    312362115/claude

    专业图表生成技能:根据需求自动选择合适的图表类型,生成符合设计规范的 PNG 图表. An agent skill from 312362115/claude.

    107 GitHub stars~2.7k tokensUpdated 4 mo ago
    Auto-check passed
  • Deep Research

    312362115/claude

    深度调研技能:对任意命题进行系统性调研并输出专业研究报告. An agent skill from 312362115/claude.

    107 GitHub stars~6.6k tokensUpdated 4 mo ago
    Auto-check passed
  • Writing

    312362115/claude

    通用写作技能:以"内容→组件→组合"的方式产出技术文档、产品文档、汇报材料. An agent skill from 312362115/claude.

    107 GitHub stars~1.6k tokensUpdated 4 mo ago
    Auto-check passed
  • Code Walkthrough

    312362115/claude

    代码导读技能:帮助快速理解不熟悉的项目或模块,建立心智模型. An agent skill from 312362115/claude.

    107 GitHub stars~1k tokensUpdated 4 mo ago
    Auto-check: notes
  • DB Review

    312362115/claude

    数据库代码审查 + Migration 安全检查. An agent skill from 312362115/claude.

    107 GitHub stars~1.8k tokensUpdated 4 mo ago
    Auto-check passed
  • Dependency Map

    312362115/claude

    依赖关系分析技能:回答"改这里会影响哪里". An agent skill from 312362115/claude.

    107 GitHub stars~888 tokensUpdated 4 mo ago
    Auto-check passed

Works with

Questions about Preview Md

What does Preview Md do?

MD 文件浏览器预览:GitHub 风格渲染 + 左侧自动目录. An agent skill from 312362115/claude. Preview Md is an agent skill from 312362115/claude.

How do I install Preview Md in Claude Code?

Run `npx skills add 312362115/claude --skill preview-md -a claude-code`. Or copy the skill folder (skills/preview-md in 312362115/claude) into .claude/skills/preview-md in your project. Claude Code loads it when a task matches its description.

How do I install Preview Md in Codex?

Run `npx skills add 312362115/claude --skill preview-md -a codex`. Or copy the skill folder (skills/preview-md in 312362115/claude) into .agents/skills/preview-md in your project. Codex loads it when a task matches its description.

Can I use Preview Md in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add 312362115/claude --skill preview-md -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/preview-md, .gemini/skills/preview-md, .github/skills/preview-md and .opencode/skills/preview-md in your project.

What does Preview Md need to run?

Going by SKILL.md and its folder, Preview Md needs a shell, Python and JavaScript for the scripts in its folder and the command-line tools its instructions call (node). Our summary lists: Python 3; Node.js; A Bash shell.

Does Preview Md access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Preview Md safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Preview Md use?

Preview Md is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Preview Md use?

About 636 tokens (SKILL.md is roughly 2.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Preview Md?

Skills that share tags, products or a category with Preview Md: PR Babysitter (openinterpreter/openinterpreter, 69k stars), Diagnosing Superpowers Sessions (obra/superpowers, 297k stars), Greploop (onyx-dot-app/onyx, 32k stars) and GitHub Deep Research (bytedance/deer-flow, 84k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Preview Md?

312362115 (a GitHub user) maintains it in 312362115/claude, which has 107 GitHub stars. The repository holds 20 skills in this directory. The repository was last updated on May 14, 2026.

Source: 312362115/claude on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.