PluginBench
Skill
Pass
Audit score 90

cmux-shared-behavior

manaflow-ai/cmux

Consolidate multi-entrypoint behavior into shared action paths to prevent bugs and duplication.

What is cmux-shared-behavior?

Shared behavior and mutation-path rules for cmux. Use when a behavior is exposed through multiple entrypoints such as keyboard shortcuts, command palette, context menu, CLI, settings, debug menu, optimistic UI, or tests that previously missed a bug.

  • Implement one shared action/model path for behaviors exposed through multiple surfaces
  • Verify every entrypoint (keyboard, command palette, context menu, CLI, settings, debug menu) invokes the same logic
  • Manage optimistic updates with a single mutation path, pending state tracking, and explicit reconciliation
  • Record pending state with request IDs or snapshots for reliable rollback on failure
  • Add behavior-level test coverage around exact repro paths when bugs are discovered

How to install cmux-shared-behavior

npx skills add null --skill cmux-shared-behavior
Claude Code
Cursor
Windsurf
Cline

How to use cmux-shared-behavior

  1. 1.Identify all entrypoints exposing the same behavior (keyboard, menu, CLI, settings, etc.)
  2. 2.Extract the behavior into one shared action or model mutation path
  3. 3.Replace each entrypoint to call the shared path instead of duplicating logic
  4. 4.For optimistic updates, record pending state with a request ID or snapshot before mutation
  5. 5.Implement reconciliation logic to apply the authoritative result and handle failures with explicit rollback
  6. 6.Add or adjust test coverage to include the exact repro path that previously missed the bug

Use cases

Good for
  • Fixing a feature that works via keyboard shortcut but fails via command palette due to duplicated logic
  • Implementing optimistic UI updates that safely reconcile with server results without per-entrypoint copies
  • Adding test coverage when a bug slips through existing tests by following the actual user repro path
  • Refactoring settings UI changes to use the same mutation path as CLI commands
  • Debugging inconsistent behavior across debug menu, context menu, and keyboard shortcuts
Who it's for
  • Frontend engineers building multi-surface UIs
  • Teams maintaining CLI and UI parity
  • QA engineers investigating missed-bug patterns
  • Developers implementing optimistic updates

cmux-shared-behavior FAQ

What counts as a 'shared entrypoint'?

Any surface that triggers the same behavior: keyboard shortcuts, command palette, context menu, CLI/socket commands, settings UI, debug menu, or optimistic UI updates.

How do I handle optimistic updates safely?

Keep one mutation path, record pending state with a request ID or previous snapshot, reconcile from the authoritative result, and handle failure with explicit rollback or error state. Do not maintain separate optimistic copies per entrypoint.

When should I use this skill?

Use it when a behavior is exposed through multiple entrypoints, when tests miss a bug, or when you need to consolidate duplicated logic across surfaces.

What if an entrypoint needs different behavior?

If behavior truly differs, it is a separate feature and should have its own action path. Only consolidate when the core behavior is identical.

How do I test for missed-bug coverage?

Add or adjust behavior-level tests around the exact repro path the user reported, not just the happy path.

Full instructions (SKILL.md)

Source of truth, from manaflow-ai/cmux.


name: cmux-shared-behavior description: "Shared behavior and mutation-path rules for cmux. Use when a behavior is exposed through multiple entrypoints such as keyboard shortcuts, command palette, context menu, CLI, settings, debug menu, optimistic UI, or tests that previously missed a bug."

cmux Shared Behavior

Use one shared action/model path when behavior is exposed through multiple entrypoints.

Shared entrypoints

When a behavior is exposed through multiple surfaces, implement one shared action/model path and verify every entrypoint that should invoke it.

Common entrypoints include:

  • keyboard shortcut
  • command palette
  • context menu
  • CLI/socket command
  • settings UI
  • debug menu

Do not patch one surface while leaving the others with duplicated logic.

Optimistic updates

For optimistic UI or CLI updates:

  • keep one mutation path
  • record pending state with a request id or previous snapshot
  • reconcile from the authoritative result
  • handle failure with an explicit rollback or error state

Do not let each entrypoint maintain its own optimistic copy.

Missed-bug coverage

When a user says tests missed a bug, add or adjust behavior-level coverage around the exact repro path before claiming the fix is complete.