跳到正文
Skillpedia
网站与界面(前端)48k · #5160

markdown-rendering

它能做什么

这个工具可以帮你在 cmux 的指定区域显示格式化的文本文件(称为 Markdown)。即使程序平时存在问题,它也能确保文本正确显示。

适用场景

  • ✓当 Markdown 文件在 cmux 中显示为空白或格式错误时。
  • ✓当你需要在 cmux 的固定区域中显示 Markdown 文件时。
  • ✓当打开 Markdown 文件时出现错误或显示不正确时。

技能链接

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/markdown-rendering/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/markdown-rendering/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“在 cmux 的右侧窗格中打开 “document.md” 文件,并确保格式显示正确。”

每周 5 个新技能,1 分钟读完。

工作原理

这个工具可以绕过一个常见错误:移动 Markdown 查看区域时,查看区域会变成空白。它的做法是直接在正确的区域中打开文件,或者先关闭冲突的区域,再重新打开文件。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Markdown Rendering in cmux

When to Use

  • Use when opening Markdown in cmux shows a blank pane or wrong layout.
  • Use when you need to display a Markdown file in a stable cmux right pane.

The Problem

cmux markdown open defaults to spawning a brand-new pane every time, even with --direction right. The common "fix" — moving the new markdown surface into the existing right pane with move-surface — bugs out: the moved viewer renders BLANK. The surface keeps type=markdown and looks healthy, but shows nothing.

So you get stuck: either a stray extra pane, or a blank viewer after moving it.

The Rule

The contributor observed two workarounds for a particular cmux version. Verify the installed command/version; the blank-render issue may have changed. Prefer reopening an owned viewer without altering unrelated panes.

Option A — Open it right on the first try

If there is no usable right pane yet, just let cmux create one and leave it where it lands:

cmux markdown open /abs/path/file.md --direction right --focus false

Do NOT then move it. If it spawned where you want it, you're done.

Option B — Close existing right pane(s), then open fresh

If there are other right panes in the way (and they're unused or irrelevant), close them first, then open the markdown fresh as a new right pane:

# 1. find panes in THIS workspace
cmux list-panes --workspace "$CMUX_WORKSPACE_ID"

# 2. close the unused/irrelevant right pane(s) by closing their surfaces
cmux list-pane-surfaces --pane pane:NN
cmux close-surface --surface surface:XX     # repeat per surface in that pane

# 3. THEN open the markdown fresh — it creates its own clean right pane
cmux markdown open /abs/path/file.md --direction right --focus false

Hard Rules

  • Never move-surface a markdown viewer. It renders blank afterward. This is the core bug this skill exists for.
  • Open it correctly the first time (Option A), OR close the conflicting right pane(s) and open a fresh right pane from scratch (Option B).
  • Close only surfaces created for this task or explicitly authorized for closure; apparent irrelevance does not prove they contain no unsaved work.
  • Always anchor to $CMUX_WORKSPACE_ID; never assume the visually focused workspace.
  • Pass --focus false so you don't steal the user's focus.
  • Use any supported readback/rendered inspection available on the actual host. If it cannot inspect the viewer, report that limit instead of claiming success.

Limitations

  • Adapted from davidondrej/skills; verify local paths, tools, credentials, and agent features before acting.
  • For commands, remote access, scheduling, browser automation, or file-changing workflows, get explicit user approval and confirm the target environment first.
常见问题

为什么我的 Markdown 文件在 cmux 中显示为空白?

这通常是因为程序尝试为文件新建一个窗格,而窗格被移动后,查看器就会失效并变成空白。这个工具就是为了绕过这个问题而设计的。

什么是 cmux?

cmux 是一个程序,可以让你在电脑上组织和管理多个窗口或工作区,类似于面板。

什么是 Markdown?

Markdown 是一种简单的文本写法,可以很方便地转换为网页或其他格式化文档。比如用星号包裹文字就能表示加粗。

详情

作者的原始描述

Open Markdown reliably in cmux panes and recover from blank rendered surfaces.

repo: sickn33/agentic-awesome-skills

热度

GitHub 星标
48k
排名
#5160
许可证
MIT
更新时间
2026/10/15

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能