cmux-markdown
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseMarkdown Viewer with cmux
基于cmux的Markdown查看器
Use this skill to display markdown files in a dedicated panel with rich formatting and live file watching.
使用该技能可在专用面板中显示Markdown文件,支持富格式渲染和文件实时监控。
Core Workflow
核心工作流程
- Write your plan or notes to a file.
.md - Open it in a markdown panel.
- The panel auto-updates when the file changes on disk.
bash
undefined- 将你的计划或笔记写入文件。
.md - 在Markdown面板中打开该文件。
- 当磁盘上的文件发生变化时,面板会自动更新。
bash
undefinedOpen a markdown file as a split panel next to the current terminal
在当前终端旁以拆分面板形式打开Markdown文件
cmux markdown open plan.md
cmux markdown open plan.md
Absolute path
绝对路径
cmux markdown open /path/to/PLAN.md
cmux markdown open /path/to/PLAN.md
Target a specific workspace
定位到特定工作区
cmux markdown open design.md --workspace workspace:2
undefinedcmux markdown open design.md --workspace workspace:2
undefinedWhen 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)
- 在终端旁展示Agent计划或任务列表
- 工作时查看文档、更新日志或README文件
- 查看实时更新的笔记(例如由其他进程写入的计划文件)
Live File Watching
文件实时监控
The panel automatically re-renders when the file changes on disk. This works with:
- Direct writes ()
echo "..." >> plan.md - Editor saves (vim, nano, VS Code)
- Atomic file replacement (write to temp, rename over original)
- Agent-generated plan files that are updated progressively
If the file is deleted, the panel shows a "file unavailable" state. During atomic replace, the panel attempts automatic reconnection within its short retry window. If the file returns later, close and reopen the panel.
当磁盘上的文件发生变化时,面板会自动重新渲染。该功能支持:
- 直接写入操作()
echo "..." >> plan.md - 编辑器保存(vim、nano、VS Code)
- 原子文件替换(写入临时文件后重命名覆盖原文件)
- 逐步更新的Agent生成计划文件
如果文件被删除,面板会显示“文件不可用”状态。在原子替换过程中,面板会在短重试窗口内尝试自动重新连接。如果文件后续恢复,关闭并重新打开面板即可。
Agent Integration
Agent集成
Opening a plan file
打开计划文件
Write your plan to a file, then open it:
bash
cat > plan.md << 'EOF'将计划写入文件后打开:
bash
cat > plan.md << 'EOF'Task Plan
任务计划
Steps
步骤
- Analyze the codebase
- Implement the feature
- Write tests
- Verify the build EOF
cmux markdown open plan.md
undefined- 分析代码库
- 实现功能
- 编写测试
- 验证构建 EOF
cmux markdown open plan.md
undefinedUpdating a plan in real-time
实时更新计划
The panel live-reloads, so simply overwrite the file as work progresses:
bash
undefined面板支持实时重载,因此在工作推进时直接覆盖文件即可:
bash
undefinedThe markdown panel updates automatically when the file changes
当文件变化时,Markdown面板会自动更新
echo "## Step 1: Complete" >> plan.md
undefinedecho "## 步骤1:已完成" >> plan.md
undefinedRecommended AGENTS.md instruction
推荐的AGENTS.md指令
Add this to your project's to instruct coding agents to use the markdown viewer:
AGENTS.mdmarkdown
undefined将以下内容添加到项目的中,指导编码Agent使用Markdown查看器:
AGENTS.mdmarkdown
undefinedPlan Display
计划展示
When creating a plan or task list, write it to a file and open it in cmux:
.mdcmux markdown open plan.mdThe panel renders markdown with rich formatting and auto-updates when the file changes.
undefined创建计划或任务列表时,将其写入文件并通过cmux打开:
.mdcmux markdown open plan.md面板会以富格式渲染Markdown,并在文件变化时自动更新。
undefinedRouting
路由配置
bash
undefinedbash
undefinedOpen in the caller's workspace (default -- uses CMUX_WORKSPACE_ID)
在调用者的工作区打开(默认设置 -- 使用CMUX_WORKSPACE_ID)
cmux markdown open plan.md
cmux markdown open plan.md
Open in a specific workspace
在特定工作区打开
cmux markdown open plan.md --workspace workspace:2
cmux markdown open plan.md --workspace workspace:2
Open splitting from a specific surface
从特定界面拆分打开
cmux markdown open plan.md --surface surface:5
cmux markdown open plan.md --surface surface:5
Open in a specific window
在特定窗口打开
cmux markdown open plan.md --window window:1
undefinedcmux markdown open plan.md --window window:1
undefinedDeep-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 |
| 参考文档 | 使用场景 |
|---|---|
| references/commands.md | 完整命令语法及选项 |
| references/live-reload.md | 文件监控行为、原子写入、边缘情况 |
Rendering Support
渲染支持
The markdown panel renders:
- 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.
Markdown面板支持渲染以下内容:
- 标题(h1-h6),h1/h2标题带分隔线
- 带等宽字体的围栏代码块
- 带高亮背景的行内代码
- 带交替行颜色的表格
- 有序和无序列表(支持嵌套)
- 带左侧边框的块引用
- 粗体、斜体、删除线
- 可点击链接
- 水平分隔线
- 行内图片
同时支持亮色和暗色模式。