🚀 快速安装

复制以下命令并运行,立即安装此 Skill:

npx skills add https://skills.sh/manaflow-ai/cmux/cmux-markdown

💡 提示:需要 Node.js 和 NPM

使用 cmux 的 Markdown 查看器 (Markdown Viewer with cmux)

使用此技能在专用面板中显示 markdown 文件,具有丰富的格式和实时文件监视功能。

核心工作流 (Core Workflow)

  1. 将您的计划或笔记写入一个 .md 文件。
  2. 在 markdown 面板中打开它。
  3. 当磁盘上的文件发生变化时,面板会自动更新。
# 在当前终端旁边以拆分面板的形式打开一个 markdown 文件 (Open a markdown file as a split panel next to the current terminal)
cmux markdown open plan.md

# 绝对路径 (Absolute path)
cmux markdown open /path/to/PLAN.md

# 指定目标工作区 (Target a specific workspace)
cmux markdown open design.md --workspace workspace:2

何时使用 (When to Use)

  • 在终端旁显示智能体计划或任务列表 (Displaying an agent plan or task list alongside the terminal)
  • 在工作时显示文档、更新日志或自述文件 (Showing documentation, changelogs, or READMEs while working)
  • 查看实时更新的笔记(例如,正在被另一个进程写入的计划文件)(Reviewing notes that update in real-time – e.g., a plan file being written by another process)

实时文件监视 (Live File Watching)

当磁盘上的文件发生变化时,面板会自动重新渲染。这适用于:

  • 直接写入 (Direct writes – echo "..." >> plan.md)
  • 编辑器保存(vim、nano、VS Code)(Editor saves – vim, nano, VS Code)
  • 原子文件替换(写入临时文件,重命名覆盖原文件)(Atomic file replacement – write to temp, rename over original)
  • 智能体生成的逐步更新的计划文件 (Agent-generated plan files that are updated progressively)

如果文件被删除,面板会显示“文件不可用”状态。在原子替换期间,面板会在其短暂的重试窗口内尝试自动重新连接。如果文件稍后返回,请关闭并重新打开面板。

智能体集成 (Agent Integration)

打开计划文件 (Opening a plan file)

将您的计划写入文件,然后打开它:

cat > plan.md << 'EOF'
# 任务计划 (Task Plan)

## 步骤 (Steps)
1. 分析代码库 (Analyze the codebase)
2. 实现功能 (Implement the feature)
3. 编写测试 (Write tests)
4. 验证构建 (Verify the build)
EOF

cmux markdown open plan.md

实时更新计划 (Updating a plan in real-time)

面板会实时重载,因此只需随着工作进展覆盖文件即可:

# 当文件更改时,markdown 面板会自动更新 (The markdown panel updates automatically when the file changes)
echo "## 步骤 1:完成 (Step 1: Complete)" >> plan.md

推荐的 AGENTS.md 指令 (Recommended AGENTS.md instruction)

将此内容添加到项目的 AGENTS.md 中,以指示编码智能体使用 markdown 查看器:

## 计划显示 (Plan Display)

创建计划或任务列表时,将其写入 `.md` 文件,并在 cmux 中打开:
(When creating a plan or task list, write it to a `.md` file and open it in cmux:)

    cmux markdown open plan.md

该面板会渲染 markdown,具有丰富的格式,并在文件更改时自动更新。
(The panel renders markdown with rich formatting and auto-updates when the file changes.)

路由 (Routing)

# 在调用者的工作区中打开(默认 — 使用 CMUX_WORKSPACE_ID)(Open in the caller's workspace - default -- uses CMUX_WORKSPACE_ID)
cmux markdown open plan.md

# 在特定工作区中打开 (Open in a specific workspace)
cmux markdown open plan.md --workspace workspace:2

# 从特定界面拆分打开 (Open splitting from a specific surface)
cmux markdown open plan.md --surface surface:5

# 在特定窗口中打开 (Open in a specific window)
cmux markdown open plan.md --window window:1

深入参考 (Deep-Dive References)

参考 (Reference) 使用场景 (When to Use)
references/commands.md 完整的命令语法和选项 (Full command syntax and options)
references/live-reload.md 文件监视行为、原子写入、边缘情况 (File watching behavior, atomic writes, edge cases)

渲染支持 (Rendering Support)

markdown 面板渲染:

  • 标题(h1-h6),h1/h2 带有分隔线 (Headings – h1-h6 – with dividers on h1/h2)
  • 带等宽字体的围栏代码块 (Fenced code blocks with monospaced font)
  • 带高亮背景的内联代码 (Inline code with highlighted background)
  • 带交替行颜色的表格 (Tables with alternating row colors)
  • 有序和无序列表(嵌套)(Ordered and unordered lists – nested)
  • 带左边框的引用块 (Blockquotes with left border)
  • 粗体、斜体、删除线 (Bold, italic, strikethrough)
  • 链接(可点击)(Links – clickable)
  • 水平分割线 (Horizontal rules)
  • 图像(内联)(Images – inline)

支持浅色和深色模式 (Supports both light and dark mode)。

📄 原始文档

完整文档(英文):

https://skills.sh/manaflow-ai/cmux/cmux-markdown

💡 提示:点击上方链接查看 skills.sh 原始英文文档,方便对照翻译。

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。