Zum Inhalt springen
Skillpedia
Websites & UI (Frontend)29k · #9797

cmux-custom-sidebar

Was er macht

Dieser Skill schreibt eine Seitenleisten-Datei für cmux aus deiner Beschreibung, aktiviert die Beta-Einstellung, prüft sie und zeigt sie mit Hot Reload an. Er ist für cmux-Nutzer, die ein eigenes Seitenleisten-Layout ohne Build-Schritt wollen.

Wann du ihn nutzt

  • ✓Wenn du eine eigene cmux-Seitenleiste willst, die deine Arbeitsbereiche, Tabs oder Pull Requests zeigt.
  • ✓Wenn du eine bestehende eigene Seitenleiste änderst und das Ergebnis sofort sehen willst.
  • ✓Wenn du in deinem cmux-Einstellungsordner eine im Vibe-Coding-Stil entstandene Seitenleiste willst.

Link zum Skill

https://github.com/manaflow-ai/cmux/blob/main/skills/cmux-custom-sidebar/SKILL.md

Kopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.

So nutzt du ihn

Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.

Fertige Nachricht zum Einfügen

Nutze diesen Skill, um mir zu helfen: https://github.com/manaflow-ai/cmux/blob/main/skills/cmux-custom-sidebar/SKILL.md Lies die SKILL.md unter diesem Link und folge ihren Anweisungen für meine Aufgabe.
Soll deine KI Skills wie diesen selbst finden?Installiere den kostenlosen Skillpedia-MCP: eine Zeile, und sie durchsucht vor jeder Aufgabe 15.000+ Skills.In 1 Minute installieren →

Beispielanfrage an deine KI

“Bau mir eine cmux-Seitenleiste, die meine Arbeitsbereiche zeigt und mit einem Tipp zwischen ihnen wechseln lässt.”

5 neue Skills pro Woche. 1 Minute Lesezeit.

So funktioniert es

Der Agent schreibt eine SwiftUI-artige Seitenleisten-Datei in deinen cmux-Konfigurationsordner, prüft sie gegen echte Daten und wählt sie aus. Die Datei lädt sich bei jedem Speichern neu, sodass du Änderungen sofort siehst.

Technischer Inhalt (originale SKILL.md)

Originaltext des Autors, auf Englisch, direkt von 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

  1. 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.
  2. 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 (no struct, no var body, no imports). A .json variant exists for static layouts; prefer .swift for anything dynamic.
  3. Validate and select:
    cmux sidebar validate <name>   # parse/interpret check with real data shapes
    cmux sidebar select <name>
    
    The user can also right-click the sidebar toggle button to pick it.
  4. Iterate. Saving hot-reloads in place (cmux sidebar reload forces it). Verify rows show real data and taps do the right thing before declaring it done.

Authoring rules

  • Bind to the workspaces context 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 Reorderable for 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 also 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; plus directory, branch + dirty, ports when 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), `

Häufige Fragen

Brauche ich Xcode dafür?

Nein. Die Seitenleiste läuft zur Laufzeit ohne Build-Schritt, Xcode oder Signierung.

Wo wird die Seitenleisten-Datei gespeichert?

In deinem cmux-Konfigurationsordner unter sidebars, mit einem Namen deiner Wahl.

Was ist, wenn meine Seitenleiste nicht erscheint?

Der Skill sagt, du sollst zuerst prüfen, ob die Beta-Einstellung für eigene Seitenleisten aktiviert ist.

Details

Originalbeschreibung des Autors

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

Beliebtheit

GitHub-Sterne
29k
Platz im Ranking
#9797
Lizenz
—
Aktualisiert
2.11.2026

Ist dieser Skill nützlich?

0

Anmelden um abzustimmen.

Kommentare

  • …

Weitere Skills aus diesem Repository

Ähnliche Skills