К основному содержанию
плагин

using-cmux — плагин для Claude Code: субагенты в терминале cmux

Учит агента запускать субагентов в панелях cmux и следить за их работой в реальном времени, а не гадать, что происходит внутри встроенного Agent.

Установить в Claude Code · Через маркетплейс плагинов Все способы и платформы ↓
/plugin marketplace add anthropics/claude-plugins-community
/plugin install using-cmux@claude-community
Открыть на GitHub

Что делает using-cmux

Встроенный Agent в Claude удобен, но его внутренности не видно: ни вывода субагента, ни шанса вмешаться посреди задачи. Плагин переносит запуск в cmux, терминальный мультиплексор, и даёт агенту шаблоны работы с ним.

Внутри — скилл с правилами базовых операций (разделение панелей, воркспейсы, отправка команд, чтение экрана), отдельный разбор того, когда в send нужен \n, а когда send-key return, и полный цикл субагента: запуск, распознавание запроса доверия, подача промпта, ожидание завершения и сбор результата. Плюс обёртки cmux-send, cmux-read, cmux-send-key, cmux-grid, cfork, команда /cmux со справкой и хуки.

Нужен установленный cmux с запущенным в его сессии Claude; иначе работать нечему. Обёртки — POSIX-скрипты и используют jq, поэтому Windows не поддерживается, только macOS и Linux. И да, агент, умеющий вызывать cmux-send, может отправить в вашу панель любую команду — это ровно то, для чего cmux нужен.

Какие задачи решает

  • запустить субагента в отдельной панели cmux и видеть его вывод
  • вмешаться в задачу субагента, пока она не закончилась
  • понять, когда слать \n, а когда send-key return
  • собрать результат субагента после завершения
  • починить пустой или устаревший вывод read-screen

Примеры запросов агенту

  • Запусти субагента в новой панели cmux и покажи мне, что он отвечает
  • Отправь в панель surface:2 команду через cmux-send и прочитай экран
  • Покажи справку /cmux

Как установить using-cmux

Через маркетплейс плагинов

/plugin marketplace add anthropics/claude-plugins-community
/plugin install using-cmux@claude-community

По шагам, с командами для каждой платформы: Плагины Claude Code: маркетплейсы, установка и как собрать свой

Вопросы о using-cmux

Как установить using-cmux в Claude Code?

Через маркетплейс: сначала /plugin marketplace add anthropics/claude-plugins-community, затем /plugin install using-cmux@claude-community. Скиллы, команды и хуки встанут вместе.

Что делает using-cmux?

Даёт агенту правила работы с cmux: разделение панелей, отправку команд, чтение экрана и полный цикл субагента от запуска до сбора результата. Сверху идут обёртки вроде cmux-read и команда /cmux.

Что нужно, чтобы плагин заработал?

Установленный cmux, Claude внутри его сессии и macOS или Linux: обёртки в bin/ — POSIX-скрипты, которым нужен jq. В Windows они не поедут.

Исходный текст

SKILL.md · MIT
**[日本語](README.ja.md)** | English

![using-cmux](banner.jpeg)

# using-cmux

A Claude Code skill package for AI-driven cmux terminal operations.

## Motivation

Claude Code's built-in `Agent` tool is convenient, but what happens inside is opaque. It's difficult to inspect sub-agent output or intervene mid-task, making debugging and quality control challenging.

**With cmux, everything is visible.** By launching sub-agents on cmux — a terminal multiplexer — you can monitor each agent's I/O in real time and intervene at any point.

The existing [hashangit/cmux-skill](https://github.com/hashangit/cmux-skill) dedicates roughly 50% of its content to browser automation, burying the most critical use case: sub-agent operations. This package restructures that content, **putting sub-agent operation patterns front and center**.

## What's Included

| Category | Description |
|----------|-------------|
| **Basic operations** | Pane splitting, workspace management, command sending, screen reading |
| **Newline rules for `send`** | The most important rule — when to use `\n` vs. `send-key return` |
| **Sub-agent launch pattern** | Full lifecycle: launch → trust detection → prompt → completion detection → result collection |
| **`read-screen` troubleshooting** | Fixes for empty/stale output, `refresh-surfaces`, etc. |
| **Notifications** | `cmux notify` (in-app) vs. `osascript` (macOS Notification Center) |
| **Status & progress** | Sidebar status and progress bar control |

## Relationship with cmux-team

![Architecture](architecture.jpeg)

- **using-cmux**: General-purpose cmux CLI operations. Covers the full lifecycle of a single sub-agent
- **cmux-team**: Multi-agent orchestration. Handles team composition, task distribution, and synchronization. Built on top of using-cmux

## Prerequisites

- [Claude Code](https://docs.anthropic.com/en/docs/claude-code) installed
- [cmux](https://cmux.dev) installed, with Claude Code running inside a cmux session
- macOS or Linux. Windows is not supported (the `bin/` wrappers are POSIX shell scripts and rely on `jq`, `cmux` CLI behavior tested only on macOS/Linux).

## Installation

### Option 1: Plugin (recommended)

```
/plugin marketplace add hummer98/using-cmux
/plugin install using-cmux
```

Skills, commands, and hooks are installed together.

**To update:**

```
/plugin update using-cmux
/reload-plugins
```

> Note: To pick up changes in the `bin/` wrapper scripts (`cmux-read` etc.), you must restart the cmux session. The plugin's `bin/` path is baked into PATH at session start.

### Option 2: Agent Skills (skills only)

```bash
npx skills add hummer98/using-cmux
```

> Note: Commands (`/cmux`) and wrapper scripts (`cmux-read` etc.) are not included in Agent Skills distribution. Use Option 1 for full functionality.

## Usage

### Auto-trigger

When Claude Code starts inside a cmux session, it detects the `CMUX_SOCKET_PATH` environment variable and automatically loads the skill. No manual setup required.

When Claude Code receives cmux-related instructions, it follows the patterns in SKILL.md to perform pane splitting, command sending, sub-agent launching, and more.

### `/cmux` Command

Display the quick reference:

```
/cmux
```

Useful for quickly checking available commands and basic usage.

## Security

The `bin/` wrapper scripts (`cmux-send`, `cmux-send-key`, `cmux-read`) are thin wrappers around the `cmux` CLI. They:

- Take a `--surface` reference, look up the matching workspace via `cmux tree --json`, and forward the call to `cmux send` / `cmux read` / `cmux send-key`
- Do **not** evaluate, interpolate, or modify the user-supplied payload — strings are passed verbatim to `cmux`
- Run with the user's own permissions; they do not elevate privileges or write outside `cmux`
- Have no network access of their own

Because these wrappers send keystrokes to a chosen cmux surface, an agent that can call `cmux-send` can in principle execute arbitrary commands inside the target surface (this is by design — that is what cmux is for). Treat installation of this plugin as granting the agent the same capability as a user typing into your terminal panes.

## License

[MIT](LICENSE)

© hummer98 · MIT · hummer98/using-cmux

Похожие плагины

Все плагины по теме «Настройка агента: память, контекст, субагенты» →
ponytail DietrichGebert Плагин настраивает агента на короткие решения без лишних абстракций. Сгодится, когда нужно использовать возможности уже имеющегося кода и не усложнять задачу. ★ 176 443звёзд репо impeccable pbakaus Даёт агенту словарь дизайнера: 24 команды вроде polish, audit и bolder, чтобы правки интерфейса не сводились к «сделай красиво». ★ 88 212звёзд репо last-30-days-skill mvanhorn Собирает свежие посты, комментарии и транскрипты по любой теме за последний месяц и укладывает их в один отчёт. ★ 65 508звёзд репо claude-hud jarrodwatts Показывает под строкой ввода, сколько контекста занято, какие инструменты работают и как идут задачи. Пригодится, когда сессия длинная и надо видеть расход. ★ 28 841звёзд репо understand-anything Egonex-AI Плагин сканирует проект и строит интерактивный граф файлов, классов и зависимостей с веб-дашбордом. Пригодится при знакомстве с чужим или крупным кодом. ★ 88 314звёзд репо mem0 mem0ai Подключает долговременную память к Claude Code, сохраняя контекст проектов и привычки между сессиями. ★ 67 829звёзд репо

Спонсоры проекта

Компании, которые помогают держать аналитику открытой