Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/konglong87/superpm/pm-previewnpx skills add konglong87/superPM --skill pm-previewgit clone --depth 1 https://github.com/konglong87/superPMWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/konglong87/superpm/pm-preview)<a href="https://agentmods.dev/skills/konglong87/superpm/pm-preview"><img src="https://agentmods.dev/badge/skills/konglong87/superpm/pm-preview.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00077 | $0.01205 |
| Opus 5 | $0.00039 | $0.00602 |
| Sonnet 5 | $0.00015 | $0.00241 |
| Haiku 4.5 | $0.00008 | $0.00120 |
Grade A, and why
pm-preview scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 135 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Preamble (run first)
# 检查 docs/ 目录和文档数量
echo "📊 文档预览状态:"
echo ""
if [ ! -d docs ]; then
echo " ❌ docs/ 目录不存在"
echo " 💡 请先执行产品流程(/pm-brainstorm → /pm-demand → ... → /pm-docs)生成文档"
exit 0
fi
total=0
for prefix in "01-需求调研" "02-方案设计" "03-增长迭代" "04-风控管理" "05-产品战略"; do
count=$(ls docs/$prefix/*.md 2>/dev/null | wc -l | tr -d ' ')
if [ "$count" -gt 0 ]; then
echo " $prefix: $count 个文档"
total=$((total + count))
fi
done
# 递归统计所有 .md 文件
all=$(find docs -name "*.md" 2>/dev/null | wc -l | tr -d ' ')
echo ""
echo " 📄 总计: $all 个 MD 文档"
echo ""
if [ "$all" -eq 0 ]; then
echo " ❌ 没有找到任何文档"
echo " 💡 请先执行产品流程生成文档"
fi
执行流程
步骤 1: 启动预览服务器
使用 Bash 工具启动预览服务器:
bash skills/pm-preview/scripts/start-preview.sh --project-dir .
说明:
- 服务器在随机高端口启动(49152-65535)
- 使用
--project-dir .将 session 持久化到.superpm/preview/,服务器停止后文件保留 - 后台运行,不阻塞终端
输出示例:
{"type":"server-started","port":52341,"url":"http://localhost:52341","docs_dir":"/path/to/docs","state_dir":"/path/to/.superpm/preview/..."}
步骤 2: 告知用户打开预览
从输出中提取 url 字段,告知用户:
📄 文档预览已启动!
🌐 预览地址: {url}
在浏览器中打开上述地址,即可查看所有产品文档。
- 左侧边栏:文档目录树
- 右侧内容区:Markdown 渲染结果
- 📝 文档更新时浏览器会自动刷新
步骤 3: 监控状态(可选)
如果用户需要持续预览,可以提醒:
💡 提示:
- 预览服务器 30 分钟无活动后自动停止
- 如需手动停止,执行:
bash skills/pm-preview/scripts/stop-preview.sh .superpm/preview/{session_id}- 执行其他 skill(如
/pm-docs)生成新文档后,浏览器会自动刷新
停止预览
用户可通过以下方式停止:
# 查找 session 目录
ls -d .superpm/preview/*/
# 停止服务器
bash skills/pm-preview/scripts/stop-preview.sh .superpm/preview/{session_id}
功能特性
| 特性 | 说明 |
|---|---|
| 实时刷新 | 文档更新时通过 WebSocket 自动推送刷新 |
| 侧边栏导航 | 按目录分组展示所有文档,支持折叠/展开 |
| Markdown 渲染 | 浏览器端渲染,支持表格、代码块、流程图 |
| 亮/暗主题 | 跟随操作系统主题自动切换 |
| 零依赖 | 仅使用 Node.js 内置模块,无需 npm install |
| 自动清理 | 30 分钟无活动自动停止,/tmp 下临时文件自动删除 |
注意事项
- 首次使用:确保
docs/目录下有至少一个 .md 文件 - 浏览器兼容:需要支持 WebSocket 的现代浏览器(Chrome/Firefox/Safari/Edge)
- 网络要求:Markdown 渲染使用 marked.js CDN,首次加载需要联网
- 端口冲突:如果随机端口被占用,服务器会自动使用其他端口
- 多会话:每次启动创建独立 session,可同时运行多个预览实例
What ships with it
5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 5d ago First seen · 135 lines · 77 tokens per session scan A 81376b8c8eae
pm-preview is a skill published in the GitHub repository konglong87/superPM (61 stars, last pushed yesterday), licensed MIT. It adds 77 tokens to every session and 1,205 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
baoyu-url-to-markdown
Fetch any URL and convert to markdown using baoyu-fetch CLI (Chrome CDP with site-specific adapters). Built-in adapters for X/Twitter, YouTube transcripts, Hacker News threads, and generic pages via Defuddle. Handles login/CAPTCHA via interaction wait modes. Use when user wants to save a webpage as markdown.
agent-browser
使用 agent-browser CLI 控制無頭瀏覽器進行網頁自動化,支援導航、點擊、截圖、存取性快照、表單填寫、PDF 輸出及 JavaScript 執行。適合需要與動態網頁互動或擷取視覺資訊時使用。.
multi-search
智能多引擎搜索,自动检测网络环境并按优先级切换:DuckDuckGo -> Tavily -> Bing API -> Bing爬虫。支持自动配额管理和网络缓存。Invoke when user needs web search with automatic engine selection and network adaptation.
add-tavily-tool
Add Tavily Search and Extract as keyless remote MCP tools for selected NanoClaw agent groups. Use when installing Tavily web search or URL extraction without an API key.
agent-browser
Browse the web for any task — research topics, read articles, interact with web apps, fill forms, take screenshots, extract data, and test web pages. Use whenever a browser would be useful, not just when the user explicitly asks.
convert-documents-to-markdown
Convert an attached Word document, presentation, spreadsheet, OpenDocument file, RTF, EPUB, CSV, or text-based PDF into local Markdown. Use when a message supplies a local attachment path that must be read without uploading it to an external parser.