manaflow-ai avatar

Cmux Socket Policy

If you're working on cmux socket or CLI commands, this enforces two critical rules: don't block the main thread with telemetry spam, and don't steal focus from the user. It's specific about which commands get main-thread access (AppKit/Ghostty UI manipulation) versus what should run off-main (telemetry parsing, deduplication). The focus policy is strict: only explicit focus-intent commands like window.focus or workspace.select can touch focus state. Everything else must preserve user context. It's opinionated architecture guidance that prevents the two most common ways socket commands turn into laggy, disruptive experiences.

skills.sh installs
4.9K
GitHub stars
28.7K
last updated
Aug 21, 2026

Install

$ npx -y skills add manaflow-ai/cmux --skill cmux-socket-policy --agent claude-code

Installs into .claude/skills of the current project.

Files

cmux Socket Policy

Threading policy

  • Do not use DispatchQueue.main.sync for high-frequency socket telemetry commands such as report_*, ports_kick, status/progress updates, or log metadata updates.
  • For telemetry hot paths, parse and validate arguments off-main.
  • Dedupe and coalesce off-main first.
  • Schedule minimal UI/model mutation with DispatchQueue.main.async only when needed.
  • Commands that directly manipulate AppKit/Ghostty UI state are allowed to run on the main actor.
  • If adding a new socket command, default to off-main handling and require an explicit reason in code comments when main-thread execution is necessary.

Focus policy

Sponsors

Details

Repository
github.com/manaflow-ai/cmux
Categories
Automation & Workflows, Sales & Marketing, CLI & Terminal
First seen
Jul 14, 2026

More from manaflow-ai/cmux

All 21
1manaflow-ai avatarcmux-ghosttymanaflow-ai/cmuxGhostty submodule and GhosttyKit workflow rules for cmux. Use when modifying the ghostty submodule, rebuilding GhosttyKit.xcframework, updating the parent submo4.9Kskills.sh installs
2amelnagdy avatarclean-code-guardamelnagdy/guard-skillsReview generated or changed production code before it ships, using Clean Code, SOLID, DRY, KISS, YAGNI, and LLM-specific failure-mode checks in any programming 4.8Kskills.sh installs
3forcedotcom avataromnistudio-datapacks-deployforcedotcom/sf-skillsSalesforce Industries DataPack deployment automation using Vlocity Build. TRIGGER when: user deploys or validates OmniStudio/Vlocity DataPacks with vlocity comm4.8Kskills.sh installs
4forcedotcom avatarexperience-content-media-searchforcedotcom/sf-skillsSearches for and retrieves existing visual media (images, logos, icons, photos, graphics, banners, thumbnails, hero images, backgrounds) from sources such as Sa4.8Kskills.sh installs
5iii-hq avatariii-error-handlingiii-hq/iiiHandle iii engine and SDK errors across Node, Python, Rust, and browser workers. Use when interpreting error codes, retryability, RBAC denial, timeouts, handler4.7Kskills.sh installs
6iii-hq avatariii-architecture-patternsiii-hq/iiiUse when composing iii primitives into backend architectures: durable workflows, reactive backends, agentic pipelines, event-driven CQRS, effect pipelines, and 4.7Kskills.sh installs