cmux-keyboard-shortcuts
它能做什么
这项技能帮助你自定义 cmux 应用中的键盘快捷键。它把你的工作习惯转化为快捷键设置,并保存到你的 cmux 配置文件中。
适用场景
- ✓当你想重新绑定、删除或重置某个 cmux 键盘快捷键的时候。
- ✓当你想要一套与 tmux、Vim、iTerm 或其他熟悉工具相匹配的快捷键布局的时候。
- ✓当你想让智能体在更改前先检查你当前的 cmux 快捷键的时候。
技能链接
https://github.com/manaflow-ai/cmux/blob/main/skills/cmux-keyboard-shortcuts/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“你能把我的 cmux 快捷键改成像 tmux 一样的操作方式吗?我已经习惯了那样。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会读取你当前的快捷键设置,提出一套紧凑的布局,应用你选择的更改,并检查配置文件仍然可以正确读取。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
cmux-keyboard-shortcuts
Turn a user's workflow preferences into cmux shortcut bindings in ~/.config/cmux/cmux.json: guide, propose compact templates, apply the selected changes, and confirm the config parses with recognized keys.
Contributor rule: adding a new shortcut
Every new cmux-owned keyboard shortcut must be added to Sources/KeyboardShortcutSettings.swift, visible and editable in Settings > Keyboard Shortcuts, supported as shortcuts.bindings.<actionId> in ~/.config/cmux/cmux.json, and documented in web/app/[locale]/(landing)/docs/keyboard-shortcuts/page.tsx and the configuration docs. All four, not a subset.
Prerequisites
- Work from a cmux checkout or worktree root when possible.
- Use
skills/cmux-settings/scripts/cmux-settingsfor every read/write. It reads JSONC, writes atomically, and validates JSON plus recognized settings keys. - Action IDs:
skills/cmux-settings/references/shortcut-actions.md. Current defaults:web/data/cmux-shortcuts.tsorSources/KeyboardShortcutSettings.swift.
if [[ -z "${CMUX_SETTINGS:-}" ]]; then
root="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
for candidate in \
"$root/skills/cmux-settings/scripts/cmux-settings" \
"${CODEX_HOME:-$HOME/.codex}/skills/cmux-settings/scripts/cmux-settings" \
"$HOME/.agents/skills/cmux-settings/scripts/cmux-settings"; do
[[ -x "$candidate" ]] && CMUX_SETTINGS="$candidate" && break
done
[[ -n "${CMUX_SETTINGS:-}" ]] || {
echo "cmux-settings helper not found; run from a cmux checkout or install cmux-settings" >&2
exit 1
}
fi
Shortcut model
- Setting path:
shortcuts.bindings.<actionId>. - Single stroke:
"cmd+b". - Chord:
["ctrl+b","c"]. The first stroke needs a modifier unless the key is Space. The second stroke can be bare. - Unbind: prefer
nullfor explicit unbinds."","none","clear","unbound", and"disabled"are accepted aliases, butnullis the clearest JSON value and matches the templates below. selectSurfaceByNumber,selectWorkspaceByNumberandfocusPaneByNumbermust use a digit from 1 to 9.cmd+1means the fullcmd+1throughcmd+9family.showHideAllWindowsis the only system-wide shortcut. It cannot be a chord, requires modifiers, and may be rejected by macOS if reserved.globalSearchis application-scoped and only fires while cmux is active.showHideAllWindowsalso requires Settings > Global Hotkey > Enable System-Wide Hotkey. The binding can validate incmux.jsonwhile the feature is disabled, so warn the user to enable that setting before reporting the shortcut as usable.unsetdeletes acmux.jsonoverride. It does not clear shortcut changes saved through the Settings UI/UserDefaults. If the user asks for true built-in defaults, tell them to use Settings > Keyboard Shortcuts > Reset Default Shortcuts after clearing file-managed overrides, then verify in the app. ForshowHideAllWindows, use Settings > Global Hotkey to restore the shortcut toctrl+opt+cmd+.because Keyboard Shortcuts > Reset Default Shortcuts intentionally skips the global hotkey.- Saving
cmux.jsonlive reloads. Never tell the user to restart cmux.
Workflow
Classify the request:
- One-off rebind/unbind: map the phrase to an action ID, apply, validate, report previous and new binding.
- Audit: inspect bindings, validate, summarize overrides and unbound shortcuts without writing.
- Reset: clarify file-managed overrides vs true built-in defaults (see the
unsetrule above). - Broad customization: propose 3-5 templates below and ask the user to choose.
- Named style (tmux, Vim, iTerm, browser, agent triage): pick the closest template, show the changed actions and likely collisions, and ask before a bulk apply unless the user already named that template.
Inspect existing config:
"$CMUX_SETTINGS" path "$CMUX_SETTINGS" get shortcuts.bindings 2>/dev/null || printf '{}\n' "$CMUX_SETTINGS" validateSnapshot prior values for every action you will change. A path that was absent reverts with
unset; a path with an existing custom value reverts withset <same-json-value>."$CMUX_SETTINGS" get shortcuts.bindings.focusLeft 2>/dev/null || printf '<absent>\n'Apply only the chosen action paths, then
"$CMUX_SETTINGS" validate."$CMUX_SETTINGS" set shortcuts.bindings.newSurface '["ctrl+b","c"]' "$CMUX_SETTINGS" set short
常见问题
我的其他 cmux 设置会受影响吗?
这项技能只更改快捷键设置,然后检查配置文件是否仍然有效。
我可以恢复默认快捷键吗?
可以,这项技能可以把快捷键重置为默认值。
有哪些布局可以选择?
这项技能提供 tmux 风格、Vim 风格、以终端为先、偏重浏览器、类似 iTerm 和智能体分拣等模板。
详情
作者的原始描述
Guide and apply cmux keyboard shortcut customization. Use when the user asks to customize, rebind, unbind, reset, audit, or create shortcut templates for cmux, including tmux-style, Vim-style, terminal-first, browser-heavy, iTerm/Terminal-like, or agent-triage layouts.
repo: manaflow-ai/cmux
热度
- GitHub 星标
- 29k
- 排名
- #9800
- 许可证
- —
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
cmux-browser
29k让你的智能体在 cmux 中打开网站,并在浏览器面板中阅读、点击和提取信息,同时不会抢走你当前工作的焦点。
cmux-capture
29k让你的智能体为 cmux 窗口截取屏幕截图或短视频,以便你用真实的证据展示视觉变化或错误。
cmux-cloud-vm
29k让你的智能体在你的 cmux Cloud 机器上运行命令、启动编码智能体并展示工作区,面板关闭后工作仍会继续。
cmux-cua
29k让你的智能体通过 cmux Computer Use 引擎操作真实的 macOS 应用,读取辅助功能树,并代你点击、输入和滚动。