preview-md
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "preview-md" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-f21440be0e892cef7be6b736d2118f6176b4844b4c35ad8be310da89a30086d4. Verify the upstream source and version against https://github.com/312362115/claude before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
github.com
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
MD file browser preview: renders in GitHub style with an automatic left-side table of contents. Triggered after finishing specs or development plan MD files. Asks the user whether to open the preview in the browser and proceeds after confirmation. Common triggers: "specs done", "plans done", "review MD", "preview document". Workflow position: task-start (after specs produced) or after any MD file is completed.
Introduction source: third_party · 312362115 · 1.1.0 Reference
SkillPi interpretation
- Tasks
- Translation pending; see source documentation.
- Audience
- Not specified in the source documentation.
- Inputs and outputs
- Not specified in the source documentation.
- Software, accounts and paid services
- Not specified in the source documentation.
- Limits and differences
- Translation pending; see source documentation.
- Testing
- Not tested
Browse files
Frontmatter
name: preview-md
version: 1.1.0
last_updated: 2026-03-30
repository: https://github.com/312362115/claude
changelog: skills/preview-md/CHANGELOG.md
description: >
MD 文件浏览器预览:GitHub 风格渲染 + 左侧自动目录。
在完成方案设计(specs)或开发计划(plans)的 MD 文件后触发。
询问用户是否要在浏览器中打开预览,确认后执行。
触发词:方案写完、计划写完、review MD、预览文档。
工作流位置:task-start 方案产出后 / 任意 MD 文档完成后MD 文件浏览器预览
写完方案/计划等需要 review 的 MD 文件后,用浏览器打开 GitHub 风格预览。
触发条件
当你(Claude)完成以下类型的 MD 文件创建或大幅修改时,必须触发此 skill:
- 方案设计文档(
docs/specs/**/*.md) - 开发计划文档(
docs/plans/**/*.md) - 用户明确要求预览的任何 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: 用户确认后打开预览
用户确认后,执行:
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 作为窗口标题,其余为内容。
```terminal
$ 快速开始
npm install
npm run dev
# 服务启动在 http://localhost:3000
```
```flow — 轻量流程图
展示流程、决策树、步骤串联时使用。比调 diagram skill 更快、更贴近正文,适合简单到中等复杂度的线性/分叉流程。
何时用:
- 方案中的"执行步骤"示意
- 决策树(含
?/?的节点自动高亮为决策样式) - 工作流阶段串联
何时别用:
- 复杂的多分叉合流、有向图 → 调 diagram skill 画真正的流程图
- 时序交互(多角色)→ 调 diagram skill 画时序图
语法:
| 形态 | 写法 | 渲染 |
|---|---|---|
| 竖向主干 | 每行一个节点,↓ 单独一行作为连接符 |
主干 pill 居中列,↓ 对齐主干 |
| 横向流 | 一行内用 → 分隔多个节点 |
平铺横向 pill 链 |
| 横竖混合 | 主干竖向,某一行内嵌 → 分支 |
主干走中间列,分支向右延伸 |
| 决策节点 | 节点文本含 ? 或 ? |
黄底带边框 pill |
| 注释 | 节点后追加 (xxx) |
灰色注释文字挂在节点右侧 |
示例:
```flow
task-manager
↓
task-start(对焦 + 方案)
↓
task-execute → 编码 → 调试
↓
需求完成?→ task-finish → 标 done
```
设计原则:
- flow 块中不要写长句,每个节点控制在 10 字内,超长的信息放正文说明
→扩展只用于挂 1-3 个分支节点;再多就该拆成多行或改调 diagram- 一个 flow 块表达一个完整小流程,别把多个无关流程塞进同一个块
Version history
-
v2026.04.02
GitHub ↗
Original release notes
## Highlights - **流程图多方向布局**:DAG 模式支持 DOWN/RIGHT/UP/LEFT,AI 自动选择合适流向 - **Diagram 能力补齐**:三批交付,图表类型从 25 → 29 种(Treemap/Combo/Kanban/Git Graph/状态图并发等) - **Deep-Research 清理 Graphviz**:删除 graphviz 依赖,图表生成统一对齐 Diagram skill,结构图列表从 4 → 23 种 - **截图规范统一**:禁止手动 Playwright,收口到 capture.py/bridge.py - **图表链路验证**:42/42 全量通过(10 统计图 + 29 结构图 + 3 PNG 抽样) - **Preview-MD**:Mermaid 全覆盖 + 共享 CSS 体系 + VS Code 插件 - **项目基建**:重命名为 Claude Code Skills + README + MIT 许可证 + 分支发布规范 ## All Changes - feat(diagram): 流程图 DAG 模式支持多方向布局 — AI 自动选择合适流向 - feat(diagram): 第一/二/三批能力补齐 — 29 种图表全覆盖 - feat(diagram): 流程图增加 DAG 模式 + DSL 输出模式 - feat(preview-md): Mermaid 全覆盖 + 样式统一 + 导出自包含 HTML - feat(extensions): preview-md-launcher VS Code 插件 - refactor(deep-research): 清理 Graphviz 依赖 — 统一对齐 Diagram skill - test(deep-research): 图表生成链路全量验证 — 42/42 通过 - test(diagram): 全量回归测试 — 29 种 × L1-L4 共 116 用例 - docs(diagram): SKILL.md review — 截图收口 + 描述补齐 - docs(deep-research): SKILL.md review — 禁止手动截图 + 术语规范 - docs: README + MIT 许可证 + 分支发布规范
Current listing version
1.1.0
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 提供 MD 文件浏览器预览功能,解决方案设计、开发计划等文档 review 的实际需求
- 支持 GitHub 风格渲染 + 左侧自动目录,提升文档阅读体验
Areas to improve
-
触发词不全 Reported severity: Major
触发词覆盖合理但缺少对文件路径匹配规则的更详细说明
Recommendation: 建议在触发条件中补充更具体的文件路径匹配规则说明,减少歧义
Highlights
- 触发词(方案写完、计划写完、review MD、预览文档)覆盖合理,边界清晰
Areas to improve
-
缺少 When to Use 章节 Reported severity: Minor
文档结构完整但缺少独立的 When to Use 使用场景说明章节
Recommendation: 建议增加 When to Use 章节,更清晰地说明适用场景
-
文档过长 Reported severity: Minor
文档内容较丰富,包含扩展语法说明,整体篇幅偏长
Recommendation: 可考虑将扩展语法部分拆分为独立文档或链接到外部资源
Highlights
- Phase/步骤清晰(Step 1-3),有出口条件,含端到端示例
- frontmatter 完整,单文件未超 500 行
Highlights
- 工具来源明确(node 脚本路径),参数正确(md-file-absolute-path)
- 覆盖主要异常(询问用户确认),不可逆操作有确认机制
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
-
Install or fetch external dependencies
Use official sources and pin versions. Check install scripts in an isolated environment. This document check does not cover code downloaded later.
Mentioned in main document · lines 93
Domains or addresses referenced in the document
These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.
- github.com
- localhost
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Not specified in the source documentation.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.