cmux-shared-behavior — Claude Code skill: shared logic and mutations
Rules for cmux: one shared action path across every entrypoint and a single mutation path. Useful when a bug shows up on just one surface.
npx skills add manaflow-ai/cmux --skill cmux-shared-behavior -a claude-codeWhat cmux-shared-behavior does
This skill sets rules for cmux when the same behavior is reachable from several surfaces at once: a keyboard shortcut, the command palette, a context menu, a CLI or socket command, the settings UI, the debug menu. Rather than patching one surface and leaving the rest with duplicated logic, you build one shared action and model path, then verify every entrypoint that should call it.
For optimistic updates the rule is the same: keep a single mutation path. Pending state is tracked by request id or by the earlier snapshot, then reconciled against the authoritative result, and a failure ends in an explicit rollback or error state. A separate optimistic copy per entrypoint is how the two drift apart.
There is a section on missed bugs. When a user says the tests did not catch a bug, behavior-level coverage goes in around the exact reproduction path first, and only then is the fix called done. The skill installs through npx skills add and runs in Claude, Codex, Cursor, GitHub Copilot, Gemini CLI and OpenCode.
What it helps with
- collapse several entrypoints into one shared action
- drop duplicated logic between the command palette and keyboard shortcuts
- add a rollback when an optimistic update fails
- cover the reproduction path of a missed bug with tests
- check that every surface calls the shared path
Example prompts for the agent
- This behavior is reachable from a keyboard shortcut, the command palette and a context menu — make it one shared path and verify each entrypoint.
- The optimistic update broke: keep a single mutation path, reconcile against the authoritative result and add an explicit rollback.
- Tests missed a bug — add coverage around the reproduction path first, then call the fix done.
How to install cmux-shared-behavior
1Skills CLI (Vercel)
npx skills add manaflow-ai/cmux --skill cmux-shared-behavior -a claude-code2Manually: put the files in place
~/.claude/skills/cmux-shared-behavior/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/cmux-shared-behavior/
1Skills CLI (Vercel)
npx skills add manaflow-ai/cmux --skill cmux-shared-behavior -a codex2Manually: put the files in place
.agents/skills/cmux-shared-behavior/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add manaflow-ai/cmux --skill cmux-shared-behavior -a cursor2Manually: put the files in place
.cursor/skills/cmux-shared-behavior/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install manaflow-ai/cmux cmux-shared-behavior2Manually: put the files in place
.github/skills/cmux-shared-behavior/SKILL.md1Skills CLI (Vercel)
npx skills add manaflow-ai/cmux --skill cmux-shared-behavior -a gemini-cli2Platform CLI
gemini skills install https://github.com/manaflow-ai/cmux --path skills/cmux-shared-behaviorManually: put the files in place
.devin/skills/cmux-shared-behavior/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add manaflow-ai/cmux --skill cmux-shared-behavior -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-shared-behavior
How do I install cmux-shared-behavior in Claude Code?
Run npx skills add manaflow-ai/cmux --skill cmux-shared-behavior -a claude-code. The skill file lands at ~/.claude/skills/cmux-shared-behavior/SKILL.md.
What does cmux-shared-behavior do?
It sets rules for cmux: one shared action and model path across entrypoints, a single mutation path, and behavior-level coverage around a bug's reproduction path.
Which editors and CLIs does this skill support?
Claude, Codex, Cursor, GitHub Copilot, Gemini CLI and OpenCode. Each has its own install command and its own SKILL.md path.