Установка
SKILL.md
cmux Custom Sidebar
cmux renders custom sidebars from a small SwiftUI-style file at runtime: no Xcode, no build step, no signing. The file hot-reloads on save, binds to live cmux state (workspaces, tabs, git, PRs, clock), and can run real cmux commands on tap.
The person asking is usually describing a result ("a sidebar that shows my workspaces and lets me jump between them"), not an implementation. Turn that into a clean, native-looking sidebar and make the engineering decisions for them. Do not ask them about SwiftUI, files, or syntax.
Full reference
This skill is the workflow summary. The complete authoring contract (every supported view, modifier, language feature, and data field) is one command away; read it before writing a non-trivial sidebar:
cmux docs sidebars
curl -fsSL https://raw.githubusercontent.com/manaflow-ai/cmux/main/docs/custom-sidebars.md
Workflow
- Enable the beta (once). Custom sidebars are behind Settings → Beta features → Custom sidebars (
customSidebars.beta.enabled). If a written sidebar does not appear in the picker, this flag is the first thing to check. - Write a named file. The name becomes the menu label; use short kebab-case:<!-- -->
<!-- -->The file is a single SwiftUI-style view expression (no~/.config/cmux/sidebars/<name>.swiftstruct, novar body, no imports). A.jsonvariant exists for static layouts; prefer.swiftfor anything dynamic. - Validate and select it:
<!-- -->The user can also pick it manually: right-click the sidebar toggle button.cmux sidebar validate <name> # parse/interpret check with real data shapes cmux sidebar select <name> # switch the sidebar to it - Iterate. Saving the file hot-reloads the sidebar in place (
cmux sidebar reloadforces it). Look at the result, fix what looks off, and verify rows show real data and taps do the right thing before declaring it done.
Authoring rules
- Default to live data. Bind to the
workspacescontext instead of hard-coding text so the sidebar stays correct on its own. - Make it interactive by default. Rows that represent something openable should run the matching
cmux(...)action on tap. A list that just displays text is rarely what they wanted. - Prefer
Reorderablefor workspace-like lists. It gives persisted drag-and-drop reordering for free. - Keep it native and uncluttered: a title, a divider, then the content.
- Cap long lists (
.prefix(20), filter/sort before rendering). The sidebar re-evaluates about once a second; do not render hundreds of rows. - Stay inside the supported subset. Unsupported syntax is skipped gracefully (never crashes), but choose the closest supported approach rather than shipping a half-blank sidebar.
Quick start
cat > ~/.config/cmux/sidebars/mine.swift <<'SWIFT'
VStack(alignment: .leading, spacing: 8) {
Text("My sidebar").font(.title3).bold()
Text(clock.time).font(.caption).foregroundColor(.secondary)
Divider()
Reorderable(workspaces, move: "workspace.reorder") { w in
Button(action: { cmux("workspace.select", workspace_id: w.id) }) {
HStack {
Text(w.selected ? "●" : "○").foregroundColor(w.selected ? "#FF8800" : .secondary)
Text(w.title)
Spacer()
}.padding(4)
}
}
}
SWIFT
cmux sidebar validate mine && cmux sidebar select mine
Live data context (read-only, refreshes ~1s)
workspaces: array withid,title,selected,pinned,index,directory,ports+portCount,unread,tabs+tabCount; plus, when present:description,color,branch+dirty,pr/prs({number, label, url, status, stale, branch}),progress({value, label}),latestMessage,latestPrompt,latestAt,remote({target, state, connected}).workspaces[i].tabs:id,title,focused,pinned; plusdirectory,branch+dirty,portswhen available.clock:{time, hour, minute, second, weekday, epoch}.- Scalars:
workspaceCount,selectedTitle,selectedId,unreadTotal.
Optional fields are omitted when absent; guard with if let b = w.branch { ... } or w.pr != nil ? ... : ....
Actions
A button or .onTapGesture body calls cmux("<method>", param: value), dispatched through the same surface as the cmux CLI. Common methods: workspace.select (workspace_id), surface.focus (surface_id), workspace.reorder (workspace_id + index). openURL("https://...") opens links. Discover the full command surface with cmux docs api.
Supported subset at a glance
Containers: stacks (incl. lazy), Group, List, Section, grids, ViewThatFits, ScrollView, HSplitView (two resizable columns). Content: Text, Label, Image(systemName:), Button (title and label form), Menu, ProgressView, Gauge, Spacer, Divider, shapes, gradients via .background. Modifiers: full typography set, colors as hex strings or tokens, .padding/.frame/layout, .background/.overlay/.mask/.contextMenu with arbitrary nested views, shadows/borders/opacity/effects, .onTapGesture, .help, .disabled. Language: let, user func helpers, for/ForEach, if/else, ternary, string interpolation, arithmetic, array methods (filter/map/sorted/prefix/...), string and number formatting.
Not yet supported (write the natural Swift anyway; it degrades gracefully): @State and input controls (TextField, Toggle, Slider, Picker), custom struct/View definitions, navigation (sheet/popover), AsyncImage. Two-way editing does not work yet; taps that run cmux(...) do.
Troubleshooting
- Sidebar missing from the right-click picker: the beta flag is off, or the file is not directly under
~/.config/cmux/sidebars/. - Blank or partial render: run
cmux sidebar validate <name>; errors show inline in the sidebar with the failing location. A broken save keeps the last working render on screen, so re-save after fixing. - Rows not tappable: wrap the row in
Button(action: { cmux(...) }) { ... }or add.onTapGesture { cmux(...) }. - Reorder not persisting: use
Reorderable(data, move: "workspace.reorder"), notList/.onMove/.draggable.
Вставить в README
Ссылка на карточку для вашего README — без картинок и счётчиков.
[DarkPlay: cmux-custom-sidebar](https://darkplay.ru/ai/skills/manaflow-ai-cmux-cmux-custom-sidebar)
Из того же репозитория
Похожие скиллы и другие разделы каталога
Самые востребованные скиллов раздела по установкам и звёздам.
find-skillsvercel-labs · Помогает находить и устанавливать навыки агентов по запросам вроде «как сделать X»…
grill-memattpocock · Настойчивое интервью для доработки плана или дизайна.
hyperframesheygen-com · Обязательная точка входа для любых задач по видео, анимации и motion-графике в…
hyperframes-cliheygen-com · Цикл разработки HyperFrames CLI: init, add, render, preview, publish и другие команды.
agent-browservercel-labs · CLI для автоматизации браузера для ИИ-агентов: навигация по страницам, заполнение форм…
media-useheygen-com · Agent Media OS: единый навык для медиа в HyperFrames — BGM, SFX, изображения, голос, LUT.
hyperframes-registryheygen-com · Установка и подключение блоков реестра в композиции HyperFrames через add и catalog.
grill-with-docsmattpocock · Настойчивое интервью для доработки плана или дизайна, попутно создающее документацию (ADR…
improve-codebase-architecturemattpocock · Поиск в кодовой базе возможностей для углубления, визуальный HTML-отчёт о них и детальный…
tddmattpocock · Разработка через тестирование (TDD): red-green-refactor и интеграционные тесты.Соседние разделы каталога: возможно, нужный инструмент живёт там.
hookifyanthropics · Позволяет легко создавать пользовательские хуки для предотвращения нежелательного…
marketing-skillscoreyhaines31 · 47 навыков маркетинга для технических маркетологов и основателей: CRO, копирайтинг…
bmad-party-modebmad-code-org · Многоперспективные круглые столы — столкновение точек зрения агентов или пользовательских…
airtableanthropics · Airtable — слой базы данных и операций для ваших агентов в продукте, маркетинге…
fiftyoneanthropics · Создание качественных датасетов и моделей компьютерного зрения. Визуализация датасетов…
fullstoryanthropics · Подключение Claude к Fullstory для запросов к поведенческой аналитике, записям сессий и…
hookifyanthropics · Позволяет легко создавать кастомные хуки для предотвращения нежелательного поведения на…
intercomanthropics · Интеграция Intercom для Claude Code. Поиск по диалогам, анализ обращений в поддержку…
oracle-ai-data-platform-workbench-spark-connectorsanthropics · Коннекторы Spark для Oracle AI Data Platform Workbench в Claude Code. 18…
pigmentanthropics · Анализ бизнес-данных и создание пользовательских моделей, метрик и досок Pigment на…Лучшие ИИ-инструменты для программирования
Подборка нейросетей и ИИ-ассистентов для разработки и автоматизации кода. Сервисы, которые ускоряют написание, ревью и отладку, экономят часы рутины и снижают порог входа в сложные
GenAPIGenapi
Notepad++ AINotepad-plus-plus
Creatium MaxCremax
Emacs AIGnu
KiteKite
Amazon Q DeveloperAmazonЛучшие ИИ-инструменты для генерации видео
Подборка нейросетей для генерации и монтажа видео. Инструменты, которые превращают текст в готовые ролики, экономят часы на съемках и постпродакшне. Подходит для SMM-специалистов,
VEED.IOVeed
MootionMootion
Sora (OpenAI)OpenAI
viralpulse.appViralpulse
Viral Maker AIViral-makerЛучшие ИИ-инструменты для генерации текста и копирайтинга
Подборка нейросетей для генерации текстов и копирайтинга. Сервисы, которые помогают создавать статьи, посты и рекламные объявления с нуля или по черновику, экономя часы рутинной ра
NeuroscribeNeuroscribe
GoGPTGogpt
НейроТекстерNeuro-texter
ChatGPTOpenAI
Cosmo ScribeCosmoscribe
Memo HelperCopilot33
LibraChatLibrachat