/cmux-cli:auto-rename [tab | workspace | both | all] [optional target hints]from cmux-cli
Renames cmux tabs and workspaces to meaningful names based on what's actually running. Handles single targets, focused surfaces, and batch renaming within a workspace.
Ships in cmux-cli. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Summarize what a cmux tab (surface) or workspace is actually doing, generate a concise helpful name, and apply it with cmux rename-tab / cmux rename-workspace.
REQUIRED BACKGROUND: the companion using-cmux-cli skill covers handle formats, identify, tree, read-screen, and its gotchas (especially the Claude Code ghost-autosuggest trap). This skill assumes that vocabulary.
cmux identify --json --id-format both 2>/dev/null || echo '{"error":"cmux identify failed — outside cmux or socket unreachable"}'
--id-format both gives each entry its stable UUID (*_id) alongside its positional *_ref. Target by the UUID.
caller.* — where this agent runs. Default target for "rename this tab/workspace".focused.* — where the user is looking. Target this when they say "the tab I'm looking at".| User says | Target |
|---|---|
| "rename this tab" / "auto-name my tab" | caller.tab_id (UUID) |
| "rename this workspace" | caller.workspace_id (UUID) |
| "rename both" / bare "auto-rename" | caller tab and caller workspace |
| "the tab/workspace I'm looking at" | focused.* |
| "the tab running the build" / a named workspace | find it: cmux tree --all --json + jq, or the using-cmux-cli find-surface.sh helper |
| "rename everything here" / "all tabs in this workspace" / "fix all the tab names" / bare "all" | scoped batch — every tab under caller.workspace_id, plus the workspace itself (see Batch mode) |
Scope is always the current workspace, never all of them. There is deliberately no "rename every workspace" mode — a mass rename across many workspaces is disruptive and unwanted. "all" means "everything in this workspace."
Gotcha (verified): cmux tree --workspace <ref> --json ignores the workspace filter and returns the whole tree — grabbing the first surface from it targets the wrong workspace and rename-tab fails with not_found: Tab not found. Either use the plain-text cmux tree --workspace <ref> (which is scoped) or filter the JSON yourself by UUID: cmux tree --all --json --id-format both | jq --arg w "<ws-uuid>" '.. | objects | select(.id==$w)'.
If the target is this agent's own tab/workspace, name it from what you're actually working on — skip read-screen. Your live conversation is the best evidence there is.
For any other surface, read it and distill the name yourself, on the main model — do not delegate to a subagent. Naming well is a judgment task (recognize what a surface is, ignore transient noise, dedupe similar ones); a small distiller model reliably gets this wrong — it pattern-matches the most prominent text on screen instead of understanding purpose (e.g. it named a lazygit TUI showing a fetch error git fetch temp instead of lazygit). Reading a few hundred lines to produce a label is cheap enough to do inline, and the quality and speed are both better than fanning out subagents.
Read shallow first, go deeper only if inconclusive:
cmux read-screen --workspace <ws-id> --surface <surface-id> --scrollback --lines 60
Supplement for workspaces (cwd, git branch, ports, status pills tell you the project even when screens are quiet):
cmux sidebar-state --workspace <ws-id>
cmux tree --workspace <ws-id> # existing tab titles are evidence too
Name the surface's purpose, not the most prominent text on screen. A TUI showing a transient error is still what it is (a git TUI showing a failed fetch is lazygit, not git fetch temp). A command that just scrolled past isn't the surface's job if a long-running process owns it. Understand the surface, then label it.
If the scrollback shows an agent REPL, name it after the task the session is doing, not the tool. Read the most recent user prompt and assistant activity in the scrollback and distill the task.
Ghost-autosuggest warning: agent REPLs render a grayed next-prompt suggestion inside the input box that looks like real user input in read-screen output. Text sitting alone in the prompt with no output below it is a suggestion, not the task. Base the name on prompts that have responses under them.
Evidence, in order of usefulness: the running foreground command (dev server, tail, ssh host, tests), recent commands + output in scrollback, then cwd/branch from sidebar-state. A browser surface names itself after the page/site. A dedicated TUI (lazygit, htop, k9s, …) is named for what it is — the tool name here is the activity.
Rules:
dev server :3000, ssh prod-web1, tail nginx logs, tests (watch).lindris frontend, gws gmail-read skill.claude-plugins), or leave it and say so rather than inventing something.cmux rename-tab --workspace <ws-id> --tab <tab-id> "name here"
cmux rename-workspace --workspace <ws-id> "name here"
Pass explicit handles you resolved this run from cmux identify --json --id-format both — even when renaming your own tab. Use caller.workspace_id + caller.tab_id (UUIDs). A freshly-resolved UUID is verified to work here (rename-tab --workspace <ws-id> --tab <tab-id> applies correctly). The failure mode to avoid is the stale env-var default: a bare cmux rename-tab "name" (no explicit handle) run from inside the tab being renamed has returned Error: not_found: Tab not found in practice — because $CMUX_TAB_ID/$CMUX_SURFACE_ID were captured at spawn and can go stale, not because UUIDs don't work. Resolve fresh, pass the UUID.
To clear a tab name back to automatic: cmux tab-action --action clear-name --tab <tab-id>.
cmux tree --workspace <ws-id>
Confirm the new title actually appears. Then tell the user what each thing was named and (briefly) why.
Triggered by "all", "rename everything here", "fix all the tab names". Scope is the current workspace only (caller.workspace_id) — its tabs and itself. Never fan out across other workspaces.
cmux tree --all --json --id-format both, filter to caller.workspace_id, and collect the .id (UUID) of every surface under its panes — each surface is one tab. Skip tabs already well-named unless asked to redo everything.--lines 60), distill by purpose. Your own tab (caller.surface_id) is named from live context. This is fast (no spawn overhead) and gives better names than a distiller model, which is the whole reason batch naming is done inline.cmux sidebar-state --workspace <ws-id>) plus the tab purposes you just gathered tell you the project/mission.rename-tab per tab, rename-workspace once), then one cmux tree --workspace <ws-id> to confirm. Per Step 3's no-duplicate rule: the workspace name carries the project, the tab names carry each activity.For a workspace with an unusually large number of tabs, read shallow and name in a single pass rather than exhaustively — a good-enough name beats a slow perfect one.
| Mistake | Fix |
|---|---|
| Naming after the tool ("claude", "zsh") | Name the task/subject the tool is working on |
| Trusting the ghost autosuggest as the session's task | Only use prompts that have output beneath them |
Omitting --workspace/--tab and hitting not_found: Tab not found | The stale env-var default is the culprit, not the UUID format; resolve a fresh caller.workspace_id/caller.tab_id from identify --id-format both and pass those |
| Long sentence names | 2–5 words; tab bars truncate |
| Inventing a name for an idle shell | Fall back to cwd/branch, or say there's nothing to name it from |
What SKILL.md sets; muted values are Claude Code's defaults
Also triggers on 'name this workspace something useful', 'rename all tabs in this workspace', or when the user wants renames without dictating the exact names.
Other plugins' skills for the same job
npx claudepluginhub jtsternberg/claude-plugins --plugin cmux-cli3 skills in this plugin
/send-atWait until a target time within THIS live cmux-resident agent session, then deliver a prompt into one exact cmux surface (by UUID) and do a basic read-screen check. For 'send this at 3pm', 'in 30 minutes send X to surface <uuid>', 'schedule a prompt into that cmux surface', deferred/timed keystroke or prompt delivery into a specific cmux tab. Same-session best-effort timer, not a durable cron — it fires only while this session and the Mac stay alive./using-cmux-cliDrives cmux (macOS terminal multiplexer) via the `cmux` CLI — windows, workspaces, panes, tabs, sending keystrokes and reading terminal output, the cmux event stream for waiting on and verifying work, embedded browser, notifications, sidebar progress, layouts.