cmux-customization
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesecmux Customization
cmux 定制
Use this skill for user-facing cmux customization. Keep the user's config intact, prefer schema-backed edits, and validate before reporting completion.
本技能用于面向用户的cmux定制。需保留用户现有配置,优先使用基于schema的编辑方式,并在完成后进行验证。
Choose the Right Surface
选择合适的配置层面
- cmux app preferences: use for
cmux-settingssettings such as appearance, sidebar, notifications, browser behavior, automation, and shortcuts.~/.config/cmux/cmux.json - Custom actions, workspace layouts, toolbar buttons, plus-button behavior, and Command Palette entries: edit globally or
~/.config/cmux/cmux.jsonin the project..cmux/cmux.json - Terminal rendering and terminal keybindings: use Ghostty config, usually . This includes fonts, cursor style, copy-on-select, shell integration, themes, and terminal keybindings.
~/.config/ghostty/config - Project-specific behavior: prefer in the project so the customization travels with the repo.
.cmux/cmux.json
If a request can be handled by Ghostty config, say that and use Ghostty config instead of inventing cmux UI settings.
- cmux应用偏好设置:使用配置
cmux-settings中的设置,例如外观、侧边栏、通知、浏览器行为、自动化和快捷键。~/.config/cmux/cmux.json - 自定义操作、工作区布局、工具栏按钮、加号按钮行为以及命令面板条目:全局编辑或项目中的
~/.config/cmux/cmux.json。.cmux/cmux.json - 终端渲染与终端快捷键:使用Ghostty配置,通常为。包括字体、光标样式、选中即复制、Shell集成、主题和终端快捷键。
~/.config/ghostty/config - 项目特定行为:优先使用项目中的,以便定制设置随代码库同步。
.cmux/cmux.json
如果请求可通过Ghostty配置实现,请告知用户并使用Ghostty配置,而非自行创建cmux UI设置。
Workflow
工作流程
-
Inspect existing config before editing.bash
test -f ~/.config/cmux/cmux.json && sed -n '1,220p' ~/.config/cmux/cmux.json test -f .cmux/cmux.json && sed -n '1,220p' .cmux/cmux.json -
Pick global or project-local scope. Ask only when the choice changes behavior meaningfully. Default to project-local for repo-specific commands and global for app preferences.
-
For app settings and cmux-owned shortcuts, use the settings helper from the installed skill or checkout:bash
~/.agents/skills/cmux-settings/scripts/cmux-settings list-supported ~/.agents/skills/cmux-settings/scripts/cmux-settings set browser.openTerminalLinksInCmuxBrowser true ~/.agents/skills/cmux-settings/scripts/cmux-settings validateIf the user installed with, useskills.shinstead.~/.codex/skills/cmux-settings/scripts/cmux-settings -
For actions and workspace layouts, edit JSONC carefully. Preserve unrelated sections such as,
vault,rightSidebar,commands,actions, andui.notifications -
Reload config after successful edits:bash
cmux reload-config -
Verify the configured entrypoint exists. For shortcuts, read back the binding. For custom actions, confirm the action ID and where it should appear.
-
编辑前检查现有配置。bash
test -f ~/.config/cmux/cmux.json && sed -n '1,220p' ~/.config/cmux/cmux.json test -f .cmux/cmux.json && sed -n '1,220p' .cmux/cmux.json -
选择全局或项目本地作用域。仅当选择会显著改变行为时询问用户。针对仓库特定命令默认使用项目本地作用域,针对应用偏好设置默认使用全局作用域。
-
针对应用设置和cmux专属快捷键,使用已安装技能或检出版本中的设置助手:bash
~/.agents/skills/cmux-settings/scripts/cmux-settings list-supported ~/.agents/skills/cmux-settings/scripts/cmux-settings set browser.openTerminalLinksInCmuxBrowser true ~/.agents/skills/cmux-settings/scripts/cmux-settings validate如果用户通过安装,请改用skills.sh。~/.codex/skills/cmux-settings/scripts/cmux-settings -
针对操作和工作区布局,谨慎编辑JSONC。保留无关部分,例如、
vault、rightSidebar、commands、actions和ui。notifications -
编辑成功后重新加载配置:bash
cmux reload-config -
验证配置的入口点是否存在。对于快捷键,读取绑定信息;对于自定义操作,确认操作ID及其应显示的位置。
Common Patterns
常见模式
Add a Command Palette action that opens Codex in a new tab:
json
{
"actions": {
"codex-new-tab": {
"type": "agent",
"agent": "codex",
"title": "Codex",
"subtitle": "Start Codex in this workspace",
"target": "newTabInCurrentPane",
"palette": true
}
}
}Add a project workspace layout:
json
{
"commands": [
{
"name": "dev",
"type": "workspace",
"cwd": ".",
"layout": {
"type": "split",
"direction": "horizontal",
"children": [
{ "type": "pane", "surfaces": [{ "type": "terminal", "command": "bun dev" }] },
{ "type": "pane", "surfaces": [{ "type": "browser", "url": "http://localhost:3000" }] }
]
}
}
]
}Add surface toolbar buttons:
json
{
"ui": {
"surfaceTabBar": {
"buttons": [
"cmux.newTerminal",
"cmux.newBrowser",
{
"action": "codex-new-tab",
"title": "Codex",
"icon": { "type": "symbol", "name": "terminal" }
}
]
}
}
}添加一个在新标签页打开Codex的命令面板操作:
json
{
"actions": {
"codex-new-tab": {
"type": "agent",
"agent": "codex",
"title": "Codex",
"subtitle": "Start Codex in this workspace",
"target": "newTabInCurrentPane",
"palette": true
}
}
}添加项目工作区布局:
json
{
"commands": [
{
"name": "dev",
"type": "workspace",
"cwd": ".",
"layout": {
"type": "split",
"direction": "horizontal",
"children": [
{ "type": "pane", "surfaces": [{ "type": "terminal", "command": "bun dev" }] },
{ "type": "pane", "surfaces": [{ "type": "browser", "url": "http://localhost:3000" }] }
]
}
}
]
}添加界面工具栏按钮:
json
{
"ui": {
"surfaceTabBar": {
"buttons": [
"cmux.newTerminal",
"cmux.newBrowser",
{
"action": "codex-new-tab",
"title": "Codex",
"icon": { "type": "symbol", "name": "terminal" }
}
]
}
}
}Validation
验证
- App settings: run .
cmux-settings validate - JSONC shape: keep valid JSONC and avoid duplicate keys.
- Runtime reload: run when the CLI is available.
cmux reload-config - User-facing action: confirm the action title, shortcut, or toolbar placement the user asked for.
- 应用设置:运行。
cmux-settings validate - JSONC格式:保持有效的JSONC,避免重复键。
- 运行时重新加载:当CLI可用时,运行。
cmux reload-config - 用户可见操作:确认用户要求的操作标题、快捷键或工具栏位置。
Rules
规则
- Do not overwrite whole top-level config sections unless you own the full section.
- Do not store secrets directly in actions, commands, or prompts. Use environment variables or the user's secret manager.
- Do not use app/runtime sleeps or timing workarounds in generated commands.
- Do not add a cmux setting for behavior Ghostty already owns.
- Keep labels short enough for menus, buttons, and the Command Palette.
- 除非你负责整个顶级配置部分,否则不要覆盖整个部分。
- 不要在操作、命令或提示中直接存储密钥。使用环境变量或用户的密钥管理器。
- 不要在生成的命令中使用应用/运行时休眠或定时变通方法。
- 不要为Ghostty已支持的行为添加cmux设置。
- 标签要足够简短,以适配菜单、按钮和命令面板。