Claw Markdown Preview
"预览这个 markdown 文件" / "打开 markdown 预览" or "preview this markdown file", "open markdown preview", Skill: Claw Markdown Preview Owner: webkixi Summary: "预览这个 markdown 文件" / "打开 markdown 预览" or "preview this markdown file", "open markdown preview", Tags: latest:1.4.15 Version history: v1.4.15 | 2026-07-17T03:20:29.074Z | user - Removed documentation files: README.md and skill-card.md. - No changes to core functionality. v1.4.14 | 2026-07-15T15:10:52.073Z | user - 分离式进程管理现已在 preview_server.py 内部实现,保障跨平台一致性,不再依赖 shel
Rank
62
Safety
84
Downloads
2.1k
Updated
Oct 9, 2026
Version
1.4.15
Source
CLAWHUB
About
What it does, and when to use it.
Capability contract not published. No trust telemetry is available yet. 2.1K downloads reported by the source. Last updated 10/9/2026.
Avoid when
- Contract metadata is missing or unavailable for deterministic execution.
Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing
Public facts
Every fact links back to the source it came from.
- Vendor
- Clawhubvendor · observed Oct 9, 2026
- Protocol compatibility
- OpenClawcompatibility · observed Oct 9, 2026
- Adoption signal
- 2.1K downloadsadoption · observed Oct 9, 2026
- Latest release
- 1.4.15release · observed Jul 17, 2026
- Handshake status
- UNKNOWNsecurity
Install and run
Setup complexity: low.
clawhub skill install s171neyed37y95yer64vfgs0j9880zss:claw-markdown-preview- Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.
- Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.
Contract: missing
curl -s "https://www.xpersona.co/api/v1/agents/clawhub-webkixi-claw-markdown-preview/snapshot"
Documentation
CLAWHUB
105,782 characters of source documentation, loaded on request.
Extracted files
3 files captured from the source.
SKILL.md
---
name: claw-markdown-preview
description: Local Markdown preview skill. Trigger when the user explicitly asks to preview a markdown file — e.g. "preview this markdown file", "open markdown preview", "markdown preview", or the Chinese "预览这个 markdown 文件" / "打开 markdown 预览" / "markdown 预览一下".
version: 1.4.15
metadata:
openclaw:
emoji: "📄"
os: ["darwin", "linux", "win32"]
requires:
bins: ["python3"]
install: []
permissions:
- filesystem:read
- filesystem:write
- network:localhost
- process:spawn
---
# Markdown 编辑、多风格预览 / Markdown Editing & Multi-style Preview
通过浏览器编辑、预览AI生成的 Markdown 内容、用户本地 MarkDown 文件。支持多主题风格切换、实时编辑、富文本复制(可粘贴到公众号/知乎)、图片粘贴
Edit & preview AI-generated or local Markdown in the browser. Multi-theme switching, live editing, rich-text copy (for WeChat/Zhihu), and image paste.
## 触发方式 / Trigger
当用户明确请求预览 Markdown 文件时触发,例如:"预览这个 markdown 文件" / "打开 markdown 预览" / "markdown 预览一下"。非 Markdown 预览请求(如普通文本渲染、图片查看)不触发。
Triggers when the user explicitly asks to preview a Markdown file, e.g. "预览这个 markdown 文件" / "打开 markdown 预览" / "markdown 预览一下". Not for generic text rendering or image viewing.
## 执行入口
**前提检查:**
- 确认目标文件路径存在且为 `.md` 文件
- 确认 `scripts/preview_server.py` 存在且可用(路径相对于技能目录)
**执行(两步,替换 `<MD_FILE_PATH>` 后运行):**
**第 1 步 —— 以独立进程方式启动服务(关键:必须脱离 WorkBuddy 托管后台任务树,否则对话闲置约 20 分钟服务会被回收而"断开"。脱离由 python 内部跨平台实现,不依赖 shell `setsid`):**
```bash
# 单实例清理:只终止上一次本技能启动的预览实例(PID 文件精确定位),不误伤其他进程。整条命令以 python3 常驻结尾。(脱离托管由 python 内部实现跨平台双 fork/detach,不依赖 shell setsid,多行 if 块部分环境识别不到 python3)。
[ -f /tmp/claw-markdown-preview.pid ] && OLD_PID=$(cat /tmp/claw-markdown-preview.pid 2>/dev/null) && [ -n "$OLD_PID" ] && kill -0 "$OLD_PID" 2>/dev/null && kill "$OLD_PID" 2>/dev/null; rm -f /tmp/claw-markdown-preview.pid; python3 scripts/preview_server.py --file "<MD_FILE_PATH>" --no-open --heartbeat-timeout 7200 > /tmp/claw-md-preview.log 2>&1
```
> 关键:脱离托管由 `preview_server.py` **内部自行实现**(macOS/Linux 用 `os.fork() + os.setsid()` 双 fork 成为独立 session leader,Windows 用 `subprocess.Popen` + `DETACHED_PROCESS` 启动独立实例),脚本自动判断、不依赖 shell 命令。效果与 shell `setsid` 一致:服务脱离 WorkBuddy 托管后台任务树,不被"对话闲置回收"机制杀掉(实测托管任务约 20 分钟闲置即回收子进程)。服务因此常驻,离开多久 / 切窗口 / 睡眠都不受影响。跨平台通用,无需 `setsid` / `start /B` 等 shell 命令。
**第 2 步 —— 探测端口并打开浏览器(普通命令即可):**
```bash
# 就绪轮询:服务绑定端口后即可响应,不必固定等待 2 秒(跨平台通用,不依赖任何运行时专属能力)
PORT=8765
for i in $(seq 1 20); do
if curl -s -o /dev/null -w '%{http_code}' --max-time 1 "http://127.0.0.1:$PORT/" | grep -q 200; then
break
fi
sleep 0.1
done
# 若默认端口仍未就绪(如端口冲突),从日志提取实际端口
if ! curl -s -o /dev/null -w '%{http_code}' --max-time 1 "http://127.0.0.1:$PORT/" | grep -q 200; then
PORT=$(grep -oE '127\.0\.0\.1:[0-9]+' /tmp/claw-md-preview.log | head -1 | sed 's/.*://')
fi
# 记录本次实例 PID,供下次重启时精准终止(替代 pkill 全杀)
lsof -iTCP:$PORT -sTCP:LISTEN -t | head -1 > /tmp/claw-markdown-preview.pid
open "http://127.0.0.1:$PORT"
```
**说明:**
- 第 1 步把服务跑成托管后台任务(常驻、脱离启动命令的进程树),第 2 步再探测端口并打开浏览器。两步拆分是为了让服务不被启动命令的进程树回收而误杀。
- 服务启动_meta.json
{
"ownerId": "kn71ktazf25p4qq9q4m4ekwghx880qkj",
"slug": "claw-markdown-preview",
"version": "1.4.15",
"publishedAt": 1784258429074
}skill-card.md
## Description: Opens a local browser-based Markdown editor and previewer for explicitly requested Markdown files, with theme switching, rich-text copy, image paste, and live preview. This skill is ready for commercial/non-commercial use. ## Publisher: [webkixi](https://clawhub.ai/user/webkixi) ### License/Terms of Use: MIT-0 ## Use Case: Developers, writers, and agents use this skill to open a local Markdown preview/editor for .md files, inspect rendered output, switch styles, copy themed rich text, and optionally paste images into the Markdown file's images folder. ### Deployment Geography for Use: Global ## Known Risks and Mitigations: Risk: The local editor can autosave over the original Markdown file. Mitigation: Open only intended files and keep a backup or version-control checkpoint before editing. Risk: Unauthenticated localhost APIs can save Markdown content and write pasted images to disk. Mitigation: Run the preview server only in trusted local sessions, keep it bound to 127.0.0.1, and stop it when previewing is complete. Risk: Rendered Markdown can include active HTML. Mitigation: Avoid opening untrusted Markdown until authentication, origin checks, and HTML sanitization are reviewed. ## Reference(s): - [Claw Markdown Preview on ClawHub](https://clawhub.ai/webkixi/skills/claw-markdown-preview) ## Skill Output: **Output Type(s):** [text, markdown, shell commands, configuration, guidance] **Output Format:** [Markdown-facing guidance with shell commands and a local browser preview UI] **Output Parameters:** [1D] **Other Properties Related to Output:** [Starts a localhost preview server that reads the selected Markdown file and can save edits or pasted images back to local disk.] ## Skill Version(s): 1.4.15 (source: frontmatter and server release metadata) ## Ethical Considerations: Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.
AionUi
Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!
activepieces
AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
cherry-studio
AI productivity studio with smart chat, autonomous agents, and 300+ assistants.
CopilotKit
The Frontend for Agents & Generative UI. React + Angular
Machine-readable data
The same record, as JSON, for agents and crawlers.
{
"facts": [
{
"factKey": "vendor",
"category": "vendor",
"label": "Vendor",
"value": "Clawhub",
"href": "https://clawhub.ai/webkixi/skills/claw-markdown-preview",
"sourceUrl": "https://clawhub.ai/webkixi/skills/claw-markdown-preview",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-09T19:25:01.855Z",
"isPublic": true
},
{
"factKey": "protocols",
"category": "compatibility",
"label": "Protocol compatibility",
"value": "OpenClaw",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-webkixi-claw-markdown-preview/contract",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-webkixi-claw-markdown-preview/contract",
"sourceType": "contract",
"confidence": "medium",
"observedAt": "2026-10-09T19:25:01.855Z",
"isPublic": true
},
{
"factKey": "traction",
"category": "adoption",
"label": "Adoption signal",
"value": "2.1K downloads",
"href": "https://clawhub.ai/webkixi/claw-markdown-preview",
"sourceUrl": "https://clawhub.ai/webkixi/claw-markdown-preview",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-09T19:25:01.855Z",
"isPublic": true
},
{
"factKey": "latest_release",
"category": "release",
"label": "Latest release",
"value": "1.4.15",
"href": "https://clawhub.ai/webkixi/claw-markdown-preview",
"sourceUrl": "https://clawhub.ai/webkixi/claw-markdown-preview",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-07-17T03:20:29.074Z",
"isPublic": true
},
{
"factKey": "handshake_status",
"category": "security",
"label": "Handshake status",
"value": "UNKNOWN",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-webkixi-claw-markdown-preview/trust",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-webkixi-claw-markdown-preview/trust",
"sourceType": "trust",
"confidence": "medium",
"observedAt": null,
"isPublic": true
}
],
"events": [
{
"eventType": "release",
"title": "Release 1.4.15",
"description": "- Removed documentation files: README.md and skill-card.md. - No changes to core functionality.",
"href": "https://clawhub.ai/webkixi/claw-markdown-preview",
"sourceUrl": "https://clawhub.ai/webkixi/claw-markdown-preview",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-07-17T03:20:29.074Z",
"isPublic": true
}
]
}Record generated Oct 10, 2026.
