cmux-socket-policy — Claude Code skill: install
This skill sets threading, focus, and relay rules for cmux socket and CLI work. Use it when adding commands or automation that could change app focus.
npx skills add manaflow-ai/cmux --skill cmux-socket-policy -a claude-codeWhat cmux-socket-policy does
The skill guides changes to cmux socket and CLI commands. High-frequency telemetry should parse and validate arguments off the main thread, then deduplicate or coalesce updates there before sending minimal UI or model changes through DispatchQueue.main.async. Commands that directly change AppKit or Ghostty state may run on the main actor. A new socket command defaults to off-main handling, and a code comment must explain any need for main-thread execution.
Focus rules keep ordinary socket and CLI commands from activating the macOS app or raising windows. Open commands focus only during interactive use; agent and script runs stay in the background, while --focus and --no-focus override that choice. The skill also treats every v2 method as a possible cmux ssh relay payload. RemoteRelayCommandPolicy denies methods by default, so an allowlist entry needs security analysis and policy tests.
What it helps with
- review a new socket command’s execution context
- move high-frequency telemetry off the main thread
- preserve app focus during agent automation
- assess a v2 method for
cmux sshrelay access - check focus behavior for open commands
Example prompts for the agent
- Review this new socket command: keep argument validation and telemetry deduplication off the main thread.
- Check whether
surface openshould change focus when an agent runs it, including--focusand--no-focus. - Audit this v2 method before allowing it through
cmux ssh, and list the required relay policy tests.
How to install cmux-socket-policy
1Skills CLI (Vercel)
npx skills add manaflow-ai/cmux --skill cmux-socket-policy -a claude-code2Manually: put the files in place
~/.claude/skills/cmux-socket-policy/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/cmux-socket-policy/
1Skills CLI (Vercel)
npx skills add manaflow-ai/cmux --skill cmux-socket-policy -a codex2Manually: put the files in place
.agents/skills/cmux-socket-policy/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add manaflow-ai/cmux --skill cmux-socket-policy -a cursor2Manually: put the files in place
.cursor/skills/cmux-socket-policy/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install manaflow-ai/cmux cmux-socket-policy2Manually: put the files in place
.github/skills/cmux-socket-policy/SKILL.md1Skills CLI (Vercel)
npx skills add manaflow-ai/cmux --skill cmux-socket-policy -a gemini-cli2Platform CLI
gemini skills install https://github.com/manaflow-ai/cmux --path skills/cmux-socket-policyManually: put the files in place
.devin/skills/cmux-socket-policy/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add manaflow-ai/cmux --skill cmux-socket-policy -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about cmux-socket-policy
How do I install cmux-socket-policy in Claude Code?
Run npx skills add manaflow-ai/cmux --skill cmux-socket-policy -a claude-code, then check ~/.claude/skills/cmux-socket-policy/SKILL.md.
What does cmux-socket-policy do?
It sets threading and focus rules for cmux socket and CLI commands. It also covers authorization checks for v2 methods that could be relayed through cmux ssh.
When do cmux open commands focus the app?
They may focus the app during interactive use. Agent and script runs stay in the background; --focus opts in and --no-focus opts out.