# cmux-shared-behavior

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.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 4600 installs · ★ 28491
- Author: manaflow-ai
- License: GPL-3.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/manaflow-ai/cmux/tree/HEAD/skills/cmux-shared-behavior/SKILL.md
- Updated: 2026-10-25
- HTML: https://affpapa.org/en/nevibecode/skills/cmux-shared-behavior

## What it 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.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add manaflow-ai/cmux --skill cmux-shared-behavior -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/cmux-shared-behavior/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/cmux-shared-behavior/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add manaflow-ai/cmux --skill cmux-shared-behavior -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/cmux-shared-behavior/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add manaflow-ai/cmux --skill cmux-shared-behavior -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/cmux-shared-behavior/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install manaflow-ai/cmux cmux-shared-behavior
```

2. **Manually: put the files in place**
- File: `.github/skills/cmux-shared-behavior/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add manaflow-ai/cmux --skill cmux-shared-behavior -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/manaflow-ai/cmux --path skills/cmux-shared-behavior
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/cmux-shared-behavior/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add manaflow-ai/cmux --skill cmux-shared-behavior -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/manaflow-ai/cmux/tree/HEAD/skills/cmux-shared-behavior/SKILL.md

## When to use it
- 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
- 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.

## Similar
- [setup-matt-pocock-skills](https://affpapa.org/en/nevibecode/skills/setup-matt-pocock-skills.md) — skill · 1052851 installs
- [ask-matt](https://affpapa.org/en/nevibecode/skills/ask-matt.md) — skill · 766587 installs
- [to-tickets](https://affpapa.org/en/nevibecode/skills/to-tickets.md) — skill · 711230 installs
- [writing-plans](https://affpapa.org/en/nevibecode/skills/writing-plans.md) — skill · 282859 installs
- [caveman-review](https://affpapa.org/en/nevibecode/skills/caveman-review.md) — skill · 411800 installs
- [caveman-compress](https://affpapa.org/en/nevibecode/skills/caveman-compress.md) — skill · 411500 installs

From the same set: [manaflow-ai/cmux](https://affpapa.org/en/nevibecode/by/manaflow-ai/cmux.md) — 24 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
