Skip to content
manaflow-ai avatar

Cmux Socket Policy

Socket command threading and focus rules for cmux, keeping automation from stealing app focus.

CCM score
68 of 100
skills.sh installs
5.1K
GitHub stars
29K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers off-main handling for high-frequency telemetry commands and main-actor rules for AppKit and Ghostty UI state
  • Enforces that non-focus socket and CLI commands never activate the app or raise windows without explicit focus intent
  • Lists explicit focus-intent commands such as window.focus, workspace.select, surface.focus, and pane.focus
  • Designed for contributors adding socket commands, CLI open commands, or relay-exposed v2 methods to cmux

Install

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

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

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

Details

Repository
github.com/manaflow-ai/cmux
Categories
CLI & Terminal, Code Review & Quality
First seen
Jul 14, 2026

Questions

What does the cmux-socket-policy skill do?

It sets the threading and focus rules for cmux CLI and socket work. It covers adding or changing socket commands, telemetry commands, and automation that could steal app focus. Non-focus commands keep the user's current focus while still applying data changes.

How do I install the cmux-socket-policy skill?

Run npx -y skills add manaflow-ai/cmux --skill cmux-socket-policy -y in a project. The skill then guides the agent when adding or changing cmux socket and CLI commands.

Where does cmux-socket-policy rank in its category?

It sits in the CLI and Terminal category and ranks in the top 50 on that category page. Other skills listed alongside it include herdr, gws-shared, opentui, cf-cli and pnpm.

When should I use cmux-socket-policy?

Use it when you add socket commands, change focus, select, open, close or send-key behavior, or write telemetry commands. It keeps those changes from pulling app focus unless the command has explicit focus intent.

More from manaflow-ai/cmux

All 21

Similar to Cmux Socket Policy

More CLI & Terminal