मुख्य सामग्री पर जाएँ
Skillpedia
वेबसाइट और UI (frontend)29k · #9797

cmux-custom-sidebar

यह क्या करती है

यह आपके विवरण से cmux के लिए sidebar फ़ाइल लिखती है, beta सेटिंग चालू करती है, उसकी पुष्टि करती है और hot reload के साथ दिखाती है। यह उन cmux उपयोगकर्ताओं के लिए है जिन्हें बिना build चरण के अपना sidebar लेआउट चाहिए।

कब इस्तेमाल करें

  • ✓जब आप cmux का custom sidebar चाहें जो आपके workspaces, tabs या pull requests दिखाए।
  • ✓जब आप मौजूदा custom sidebar बदलना चाहें और नतीजा तुरंत देखना चाहें।
  • ✓जब आप अपने cmux settings फ़ोल्डर में vibe-coded sidebar माँगें।

Skill का लिंक

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

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/manaflow-ai/cmux/blob/main/skills/cmux-custom-sidebar/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“मेरे लिए एक cmux sidebar बनाइए, जो मेरे workspaces दिखाए और मुझे एक टैप से उनके बीच जाने दे।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

एजेंट आपके cmux config फ़ोल्डर में SwiftUI-शैली की sidebar फ़ाइल लिखता है, उसे असली डेटा के विरुद्ध जाँचता है, और उसे चुनता है। हर सेव पर फ़ाइल hot-reload होती है, इसलिए बदलाव तुरंत दिखते हैं।

तकनीकी सामग्री (मूल 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

  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), `

अक्सर पूछे जाने वाले सवाल

क्या इसे इस्तेमाल करने के लिए Xcode चाहिए?

नहीं। sidebar बिना build चरण, Xcode या signing के runtime पर चलता है।

sidebar फ़ाइल कहाँ सेव होती है?

आपके cmux config फ़ोल्डर में sidebars के नीचे, आपके चुने हुए नाम से।

अगर मेरा sidebar न दिखे तो?

स्किल कहती है कि पहले जाँचें कि custom sidebars beta सेटिंग चालू है या नहीं।

जानकारी

लेखक का मूल विवरण

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
लाइसेंस
—
अपडेट की गई
2/11/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

मिलती-जुलती skills