cmux-custom-sidebar
できること
説明文からcmux用のサイドバーのファイルを書き、ベータ版の設定を有効にし、検証してから、ホットリロードつきで表示します。ビルド工程なしで、自分だけのサイドバーのレイアウトがほしいcmuxの利用者向けです。
使う場面
- ✓ワークスペース、タブ、プルリクエストを表示するカスタムのcmuxサイドバーがほしいとき。
- ✓既存のカスタムサイドバーを変更し、結果をすぐに確認したいとき。
- ✓cmuxの設定フォルダにバイブコーディングのサイドバーを作ってほしいとき。
スキルのリンク
https://github.com/manaflow-ai/cmux/blob/main/skills/cmux-custom-sidebar/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“ワークスペースを表示し、ひと押しでそれらの間を移動できるcmuxのサイドバーを作ってください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは、cmuxの設定フォルダのsidebarsの下に、SwiftUI風のサイドバーのファイルを書きます。実際のデータに対して検証し、それを選択します。ファイルは保存のたびにホットリロードされるので、変更がすぐに反映されます。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
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 runs real cmux commands on tap.
The person asking is describing a result ("a sidebar that shows my workspaces and lets me jump between them"), not an implementation. Make the engineering decisions for them; do not ask them about SwiftUI, files, or syntax.
This skill is the workflow summary. Read the complete authoring contract (every supported view, modifier, language feature, and data field) 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): Settings > Beta features > Custom sidebars (
customSidebars.beta.enabled). If a written sidebar does not appear in the picker, check this first. - Write a named file at
~/.config/cmux/sidebars/<name>.swift. The name becomes the menu label; use short kebab-case. The file is a single SwiftUI-style view expression (nostruct, novar body, no imports). A.jsonvariant exists for static layouts; prefer.swiftfor anything dynamic. - Validate and select:
The user can also right-click the sidebar toggle button to pick it.cmux sidebar validate <name> # parse/interpret check with real data shapes cmux sidebar select <name> - Iterate. Saving hot-reloads in place (
cmux sidebar reloadforces it). Verify rows show real data and taps do the right thing before declaring it done.
Authoring rules
- Bind to the
workspacescontext instead of hard-coding text, so the sidebar stays correct on its own. - Rows that represent something openable run the matching
cmux(...)action on tap. A list that only displays text is rarely what they wanted. - Use
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. - Stay inside the supported subset. Unsupported syntax is skipped gracefully rather than crashing, but choose the closest supported approach instead of 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:id,title,selected,pinned,index,directory,ports+portCount,unread,status(todo/working/needs-attention/review/done),tabs+tabCount; when present alsodescription,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 CLI. Common methods: workspace.select (workspace_id), surface.focus (surface_id), workspace.reorder (workspace_id + index). openURL("https://...") opens links. Full command surface: cmux docs api.
Supported subset
Containers: stacks (including lazy), Group, List, Section, grids, ViewThatFits, ScrollView, HSplitView (two resizable columns). Content: Text, Label, Image(systemName:), Button (title and label form), `
よくある質問
使うのにXcodeは必要ですか?
いいえ。サイドバーはビルド工程、Xcode、署名なしで実行時に動きます。
サイドバーのファイルはどこに保存されますか?
cmuxの設定フォルダのsidebarsの中に、選んだ名前で保存されます。
サイドバーが表示されない場合は?
まず、カスタムサイドバーのベータ設定が有効になっているか確認するよう、スキルに書かれています。
詳細
作者による元の説明
Build a custom cmux sidebar from a plain-language request. Use when the user asks for a custom sidebar, a sidebar that shows their workspaces/tabs/PRs/clock, a vibe-coded sidebar, or anything involving files in ~/.config/cmux/sidebars/. Covers authoring the interpreted SwiftUI-style file, enabling the beta flag, selecting it, and iterating with hot reload.
repo: manaflow-ai/cmux
人気
- GitHubのスター
- 29k
- ランキング
- #9797
- ライセンス
- —
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
cmux-browser
29kエージェントが、cmuxでWebサイトを開き、作業のフォーカスを奪わずに、ブラウザのペインを読み取り、クリックし、情報を取り出せるよう支援します。
cmux-capture
29kエージェントが、cmuxのウィンドウのスクリーンショットや短い録画を撮れるようにし、視覚的な変化やバグを実際の証拠として示せるよう支援します。
cmux-cloud-vm
29kエージェントが、cmux Cloudのマシン上でコマンドを実行し、コーディングエージェントを起動し、ワークスペースを表示できるよう支援します。ペインを閉じても作業は続きます。
cmux-cua
29kエージェントが、cmux Computer Useエンジンを通じて、実際のmacOSアプリを操作できるよう支援します。アクセシビリティツリーを読み取り、あなたの代わりにクリック、入力、スクロールを行います。
似ているスキル
angular-developer
280kエージェントがAngularのコードを作成し、プロジェクト構成についてアドバイスできるようにします。新しいプロジェクトの開始、コード部品の作成、パフォーマンスやアクセシビリティの改善に役立ちます。
frontend-a11y
280kエージェントが Web インターフェースを誰にとっても使いやすくするよう支援します。スクリーンリーダーやキーボード操作に対応し、サイトやアプリが適切に動作するようにします。
frontend-patterns
280kエージェントがフロントエンド開発の最新パターンを適用できるようにします。React と Next.js において、パフォーマンスの最適化、状態管理、ベストプラクティスの遵守を行います。