Skip to content

Add customization and diagnostics skills - #4222

Merged
lawrencecchen merged 4 commits into
mainfrom
task-end-user-skills-customization-diagnostics
May 16, 2026
Merged

lawrencecchen merged 4 commits into
mainfrom
task-end-user-skills-customization-diagnostics

Conversation

@lawrencecchen

@lawrencecchen lawrencecchen commented May 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary:

  • Add end-user cmux-customization and cmux-diagnostics skills.
  • Remove cmux-debug-windows from the public cmux repo skill set; it remains in cmuxterm-hq.
  • Update Skills docs to show Vercel's npx skills add install path first, with skills.sh as the Codex-only fallback.

Testing:

  • ./skills.sh --list
  • ./skills.sh --dry-run
  • skills/cmux-diagnostics/scripts/cmux-diagnostics
  • npx skills add /Users/lawrence/fun/cmuxterm-hq/worktrees/task-end-user-skills-customization-diagnostics --list
  • npx skills add /Users/lawrence/fun/cmuxterm-hq/worktrees/task-end-user-skills-customization-diagnostics -g -y --all
  • SKIP_ENV_VALIDATION=1 bun run build
  • bun test tests/docs-search-utils.test.ts

Note

Low Risk
Low risk: adds new skill docs plus a read-only diagnostics script and updates the docs/skill catalog, with no changes to runtime app logic.

Overview
Adds two new end-user skills: cmux-customization (guidance for safely editing cmux.json actions/layouts/shortcuts and deferring terminal prefs to Ghostty) and cmux-diagnostics (support-safe, read-only health checks plus a bundled cmux-diagnostics script with optional --include-context).

Removes the cmux-debug-windows skill and snapshot script from this repo’s published skill set.

Updates the Skills docs UI and EN/JA strings to list the new skills, drop Debug Windows/suggested-skill entries, and prefer installation via Vercel’s npx skills add ... flow with skills.sh as a fallback.

Reviewed by Cursor Bugbot for commit b8be110. Bugbot is set up for automated code reviews on this repo. Configure here.


Summary by cubic

Adds end-user skills cmux-customization and cmux-diagnostics, updates docs to prefer the Vercel skills install flow, and removes the public cmux-debug-windows skill. The diagnostics report now redacts home paths, skips socket sentinels by default, and safely handles special files.

  • New Features

    • cmux-customization: Schema-safe edits to cmux.json (actions, layouts, toolbar, Command Palette, shortcuts); defers terminal prefs to Ghostty; includes examples and reload/validate steps.
    • cmux-diagnostics: Read-only checks for CLI/socket, hooks, session restore, settings, and agent binaries; adds skills/cmux-diagnostics/scripts/cmux-diagnostics with optional --include-context; redacts $HOME, skips socket sentinels, and treats non-regular files safely.
    • Docs: Adds both skills to the Skills page; updates EN/JA copy to prefer npx skills add manaflow-ai/cmux; shows both “Install with Vercel skills” and “Install with skills.sh”; removes Debug Windows and outdated suggestions.
  • Migration

    • cmux-debug-windows is no longer published here; use the version in cmuxterm-hq.
    • Install via Vercel skills: npx skills add manaflow-ai/cmux --all -g -y (or --skill cmux-diagnostics as needed). Use skills.sh only for Codex’s directory.

Written for commit b8be110. Summary will update on new commits. Review in cubic

Summary by CodeRabbit

  • New Features

    • Added cmux Customization and cmux Diagnostics skills (includes agent interfaces and a read-only diagnostics CLI/report).
  • Documentation

    • Added user guides for customization and diagnostics; updated skills listing, coverage, install flows (Vercel + skills.sh) and refreshed English/Japanese copy and suggestions.
  • Removals

    • Removed cmux Debug Windows skill and its associated snapshot/debugging command.

Review Change Stack

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@vercel

vercel Bot commented May 15, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cmux Ready Ready Preview, Comment May 16, 2026 0:59am
cmux-staging Building Building Preview, Comment May 16, 2026 0:59am

@coderabbitai

coderabbitai Bot commented May 15, 2026 •

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

PR adds two new skills—cmux-customization for config management and cmux-diagnostics for health checks—removes the cmux-debug-windows skill, and updates the skills documentation site to reflect the new catalog. Includes a diagnostic Bash script with environment, CLI, settings, and hook validation.

Changes

Skills Catalog Refresh

Layer / File(s) Summary
cmux-customization skill
skills/cmux-customization/SKILL.md, skills/cmux-customization/agents/openai.yaml
New user-facing skill documentation explains workflow for inspecting configs, choosing scope (global vs project), using cmux-settings helper, editing JSONC for actions/layouts/UI, reloading, and verifying entrypoints. Common patterns show Command Palette actions, workspace layouts, and toolbar buttons. Agent interface wires the skill to OpenAI.
cmux-diagnostics skill and script
skills/cmux-diagnostics/SKILL.md, skills/cmux-diagnostics/agents/openai.yaml, skills/cmux-diagnostics/scripts/cmux-diagnostics
New read-only diagnostic skill with end-user documentation and Bash script that reports CMUX environment state, CLI health, socket availability, settings validation, hook configs, session stores, and agent binaries. Supports --include-context flag for additional JSON output. Agent interface directs AI usage.
Web documentation and i18n updates
web/app/[locale]/docs/skills/page.tsx, web/messages/en.json, web/messages/ja.json
Skills page adds customization and diagnostics entries while removing debug-windows. Install section changes from single GitHub command to dual Vercel and skills.sh methods. English and Japanese i18n strings updated with new skill categories, descriptions, scope/reference blocks, install guidance, and suggested skills list (removes custom commands, agent hooks, notifications suggestions).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Poem

A pair of helpers hops in with care,
Customization and Diagnostics to share! 🐰
One tunes the config, one checks the health,
While docs and i18n sync up their wealth.
Old debug-windows bids farewell today.

🚥 Pre-merge checks | ✅ 15 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (15 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Add customization and diagnostics skills' directly and accurately summarizes the main changes: adding two new end-user skills (cmux-customization and cmux-diagnostics) as documented in the PR description and file summaries.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Cmux Swift Actor Isolation ✅ Passed PR contains no Swift code changes. All changes are documentation, YAML configs, Bash scripts, and TypeScript/React/JSON. Check for Swift actor isolation is not applicable.
Cmux Swift Blocking Runtime ✅ Passed No Swift files modified. Changes are documentation, config, scripts, and TypeScript/React UI code only. Check not applicable.
Cmux No Hacky Sleeps ✅ Passed No sleep/delay/timing workarounds found in production code. Documentation correctly prohibits sleeps in generated commands.
Cmux Swift Concurrency ✅ Passed Swift concurrency check not applicable. PR contains no Swift code—only documentation, YAML config, Bash scripts, TypeScript/React, and JSON translations.
Cmux Swift @Concurrent ✅ Passed No Swift code changes in this PR. The check for Swift @concurrent annotations is not applicable—all changes are documentation, YAML configs, shell scripts, TypeScript/React, and JSON files.
Cmux Swift File And Package Boundaries ✅ Passed The check targets Swift file boundaries. This PR modifies only documentation, YAML configs, TypeScript/React, JSON, and bash scripts—no Swift files. Check not applicable.
Cmux Swift Logging ✅ Passed No Swift code in PR. Check applies only to "production Swift changes" per swift-logging.md. All files modified are Markdown, YAML, JSON, TypeScript, or Bash—not subject to Swift logging rules.
Cmux User-Facing Error Privacy ✅ Passed PR complies with privacy rules: script redacts environment variables, passwords, and paths; no vendor names, credentials, or tokens exposed in user-facing output.
Cmux Swiftui State Layout ✅ Passed SwiftUI state layout check not applicable. PR contains no Swift files—only documentation, config YAML, bash scripts, TypeScript/React, and JSON i18n changes.
Cmux Architecture Rethink ✅ Passed Check not applicable. PR contains only documentation, YAML, Bash scripts, JSON, and TypeScript/React—no Swift files. Swift Architectural Rethink rule does not apply.
Cmux Swift Auxiliary Window Close Shortcuts ✅ Passed This PR contains no Swift code. Custom check applies only to Swift changes that add/materially change cmux-owned windows. This PR modifies only docs, scripts, config, and i18n files.
Description check ✅ Passed The pull request description provides a clear summary, lists testing performed, and includes implementation notes from automated review tools.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch task-end-user-skills-customization-diagnostics

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit dc95e7e. Configure here.

Comment thread skills/cmux-diagnostics/scripts/cmux-diagnostics
@greptile-apps

greptile-apps Bot commented May 16, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds two new end-user skills (cmux-customization and cmux-diagnostics), removes the cmux-debug-windows skill from the public repo, and updates the Skills docs page and EN/JA strings to prefer the Vercel npx skills add install flow.

  • cmux-customization: Documentation-only skill guiding schema-safe edits to cmux.json/.cmux/cmux.json, surface/scope selection, Ghostty config boundaries, and validation steps; no executable scripts.
  • cmux-diagnostics: Adds a read-only cmux-diagnostics shell script that reports CLI/socket status, settings validation, hook markers, session-store presence, and agent binaries; redacts $HOME paths and resolves the cmux-settings helper via relative peer path → ~/.agents/skills → ~/.codex/skills fallback chain.
  • Docs/i18n: Skills page now shows a Vercel install block with clearly-commented mutually-exclusive alternatives, followed by a skills.sh fallback block; EN and JA message keys are consistent with the updated component arrays.

Confidence Score: 5/5

Safe to merge — changes are limited to new skill docs, a read-only diagnostics shell script, and docs/i18n updates; no runtime app logic is touched.

The diagnostics script is purely additive and read-only: it only runs command -v, cmux ping, file-existence checks, and grep for markers. The $HOME redaction via safe_path is applied consistently, the settings_helper fallback chain correctly checks the Vercel install path before the Codex path, and set -euo pipefail is paired with || true/2>/dev/null guards everywhere a command can legitimately fail. The customization skill is documentation only. The docs page and i18n keys are consistent across the component and both language files.

No files require special attention.

Important Files Changed

Filename Overview
skills/cmux-diagnostics/scripts/cmux-diagnostics New read-only diagnostics script; resolves settings_helper via relative-peer path then ~/.agents and ~/.codex fallbacks; uses safe_path for home redaction; no sleeps or polling.
skills/cmux-diagnostics/SKILL.md New skill documentation for end-user diagnostics; read-only defaults, correct install paths, and secret-redaction rules documented.
skills/cmux-customization/SKILL.md New skill documentation guiding schema-safe cmux.json edits, scope selection, and Ghostty config boundaries; includes safety constraints on secrets and sleeps.
web/app/[locale]/docs/skills/page.tsx Adds cmux-customization and cmux-diagnostics to skills/skillCoverage arrays, removes cmux-debug-windows; replaces single install code block with clearly-commented Vercel and skills.sh alternatives.
web/messages/en.json Adds customization/diagnostics message keys, removes debugWindows and suggest* keys; consistent with component and ja.json.
web/messages/ja.json Japanese translations mirroring en.json changes; all added/removed keys match the component.

Reviews (4): Last reviewed commit: "Guard diagnostics against special files" | Re-trigger Greptile

Comment on lines +83 to +85
if [[ ! -x "$settings_helper" && -x "$HOME/.codex/skills/cmux-settings/scripts/cmux-settings" ]]; then
settings_helper="$HOME/.codex/skills/cmux-settings/scripts/cmux-settings"
fi

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 The fallback only checks ~/.codex/skills/ but not ~/.agents/skills/, the install destination used by npx skills add. If a user installs cmux-diagnostics via skills.sh (writing to ~/.codex/skills/) while cmux-settings was installed via npx skills add (writing to ~/.agents/skills/), the relative-path resolution gives ~/.codex/skills/cmux-settings/… (not found), the fallback checks the same path again (no-op), and the report incorrectly prints cmux_settings_helper: missing even though the helper is present at ~/.agents/skills/.

Suggested change
if [[ ! -x "$settings_helper" && -x "$HOME/.codex/skills/cmux-settings/scripts/cmux-settings" ]]; then
settings_helper="$HOME/.codex/skills/cmux-settings/scripts/cmux-settings"
fi
if [[ ! -x "$settings_helper" && -x "$HOME/.agents/skills/cmux-settings/scripts/cmux-settings" ]]; then
settings_helper="$HOME/.agents/skills/cmux-settings/scripts/cmux-settings"
elif [[ ! -x "$settings_helper" && -x "$HOME/.codex/skills/cmux-settings/scripts/cmux-settings" ]]; then
settings_helper="$HOME/.codex/skills/cmux-settings/scripts/cmux-settings"
fi

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed by checking the Vercel install path before the Codex-only install path.

— Claude Code

Comment thread web/app/[locale]/docs/skills/page.tsx Outdated
Comment on lines +162 to +163
<CodeBlock title={t("installWithVercel")} lang="bash">{`npx skills add manaflow-ai/cmux --all -g -y
npx skills add manaflow-ai/cmux --skill cmux-diagnostics -g -y`}</CodeBlock>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Both commands are shown in the same "Install with Vercel skills" code block with no separator or comment indicating they are mutually exclusive alternatives. A reader following the docs sequentially would likely run both, first installing all skills then reinstalling just cmux-diagnostics on top. Adding inline comments makes the intent unambiguous.

Suggested change
<CodeBlock title={t("installWithVercel")} lang="bash">{`npx skills add manaflow-ai/cmux --all -g -y
npx skills add manaflow-ai/cmux --skill cmux-diagnostics -g -y`}</CodeBlock>
<CodeBlock title={t("installWithVercel")} lang="bash">{`# Install all cmux skills
npx skills add manaflow-ai/cmux --all -g -y
# Or install just the diagnostics skill
npx skills add manaflow-ai/cmux --skill cmux-diagnostics -g -y`}</CodeBlock>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed by labeling the Vercel install commands as alternatives in the docs code block.

— Claude Code

coderabbitai[bot]
coderabbitai Bot previously requested changes May 16, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@skills/cmux-customization/SKILL.md`:
- Around line 21-38: The numbered workflow in SKILL.md has fenced code blocks
(```bash ... ```) that lack surrounding blank lines, triggering markdownlint
MD031; update the list items (notably the code blocks under steps 1, 3, and 5)
to insert a blank line before each opening ```bash and a blank line after each
closing ``` so each fenced block is separated from adjacent list text; keep the
code fence markers (```bash) and the surrounding numbered items intact while
only adding the required empty lines to satisfy markdownlint.

In `@skills/cmux-diagnostics/SKILL.md`:
- Around line 33-67: In SKILL.md, the fenced code blocks inside the numbered
checklist items (e.g., the blocks under "CLI and socket health:", "Settings
health:", "Hook installation:", "Session restore evidence:", and "Notification
path:") lack surrounding blank lines and trigger markdownlint MD031; edit the
file to insert a blank line immediately before each ```...``` fence and a blank
line immediately after each closing ``` so each fenced block is separated from
the surrounding list text (apply the same change for the three-line blocks under
"CLI and socket health" and "Settings health" and for every other fenced block
in that numbered section).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 8783f8e6-4dcf-4011-b665-3e8b6f1b2ce3

📥 Commits

Reviewing files that changed from the base of the PR and between e5cfb91 and dc95e7e.

📒 Files selected for processing (11)
  • skills/cmux-customization/SKILL.md
  • skills/cmux-customization/agents/openai.yaml
  • skills/cmux-debug-windows/SKILL.md
  • skills/cmux-debug-windows/agents/openai.yaml
  • skills/cmux-debug-windows/scripts/debug_windows_snapshot.sh
  • skills/cmux-diagnostics/SKILL.md
  • skills/cmux-diagnostics/agents/openai.yaml
  • skills/cmux-diagnostics/scripts/cmux-diagnostics
  • web/app/[locale]/docs/skills/page.tsx
  • web/messages/en.json
  • web/messages/ja.json
💤 Files with no reviewable changes (3)
  • skills/cmux-debug-windows/SKILL.md
  • skills/cmux-debug-windows/agents/openai.yaml
  • skills/cmux-debug-windows/scripts/debug_windows_snapshot.sh

Comment thread skills/cmux-customization/SKILL.md
Comment thread skills/cmux-diagnostics/SKILL.md

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 issues found across 11 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="skills/cmux-diagnostics/scripts/cmux-diagnostics">

<violation number="1" location="skills/cmux-diagnostics/scripts/cmux-diagnostics:83">
P2: Add a fallback to `~/.agents/skills/cmux-settings/scripts/cmux-settings` before the Codex fallback so diagnostics can find the settings helper when skills were installed via `npx skills add`.</violation>

<violation number="2" location="skills/cmux-diagnostics/scripts/cmux-diagnostics:98">
P3: Avoid using the string sentinel `unset` to detect missing socket env vars; check variable presence instead so a real value of `unset` is not misclassified.

(Based on your team's feedback about checking key presence instead of string sentinels.) [FEEDBACK_USED]</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
Re-trigger cubic

Comment thread skills/cmux-diagnostics/scripts/cmux-diagnostics Outdated
Comment thread skills/cmux-diagnostics/scripts/cmux-diagnostics Outdated
coderabbitai[bot]
coderabbitai Bot previously requested changes May 16, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@skills/cmux-diagnostics/scripts/cmux-diagnostics`:
- Around line 53-77: The checks in file_summary and marker_summary use [[ -e
"$path" ]], which treats FIFOs/devices/sockets as "present" and can cause
wc/grep to block; update both functions to guard for regular files instead (use
[[ -f "$path" ]] or an equivalent test) before invoking wc, stat or grep, and
treat non-regular paths as missing (or emit a clear non-regular status) so
diagnostics won't block on special file types; locate the checks in file_summary
and marker_summary and replace the -e guard with a regular-file test.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: adf42d3f-0b2f-4d8b-a63c-6bacafa3bac6

📥 Commits

Reviewing files that changed from the base of the PR and between d579ec7 and 37c2a98.

📒 Files selected for processing (1)
  • skills/cmux-diagnostics/scripts/cmux-diagnostics

Comment thread skills/cmux-diagnostics/scripts/cmux-diagnostics
coderabbitai[bot]
coderabbitai Bot previously requested changes May 16, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@skills/cmux-diagnostics/scripts/cmux-diagnostics`:
- Around line 104-109: The conditionals that check CMUX_SOCKET_PATH and
CMUX_SOCKET should use non-empty tests so empty values don't mask fallbacks:
replace the presence checks using "${CMUX_SOCKET_PATH+x}" and "${CMUX_SOCKET+x}"
with non-empty checks like -n "${CMUX_SOCKET_PATH:-}" and -n "${CMUX_SOCKET:-}"
in the conditional block that prints cmux_socket_path (which uses safe_path to
format the value), so an empty CMUX_SOCKET_PATH will no longer prevent falling
back to CMUX_SOCKET.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 6190a65a-60dd-4406-9d66-82092d01f2d6

📥 Commits

Reviewing files that changed from the base of the PR and between 37c2a98 and b8be110.

📒 Files selected for processing (1)
  • skills/cmux-diagnostics/scripts/cmux-diagnostics

Comment on lines +104 to +109
if [[ "${CMUX_SOCKET_PATH+x}" == "x" ]]; then
printf 'cmux_socket_path: %s (from CMUX_SOCKET_PATH)\n' "$(safe_path "$CMUX_SOCKET_PATH")"
elif [[ "${CMUX_SOCKET+x}" == "x" ]]; then
printf 'cmux_socket_path: %s (from CMUX_SOCKET)\n' "$(safe_path "$CMUX_SOCKET")"
else
printf 'cmux_socket_path: unset\n'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# 1) Show the current branch logic in the file.
sed -n '102,110p' skills/cmux-diagnostics/scripts/cmux-diagnostics

# 2) Demonstrate behavior difference when CMUX_SOCKET_PATH is set-but-empty.
CMUX_SOCKET_PATH="" CMUX_SOCKET="/tmp/cmux.sock" bash -lc '
if [[ "${CMUX_SOCKET_PATH+x}" == "x" ]]; then
  echo "current: chose CMUX_SOCKET_PATH (value=\"${CMUX_SOCKET_PATH}\")"
elif [[ "${CMUX_SOCKET+x}" == "x" ]]; then
  echo "current: chose CMUX_SOCKET=${CMUX_SOCKET}"
else
  echo "current: unset"
fi

if [[ -n "${CMUX_SOCKET_PATH:-}" ]]; then
  echo "proposed: chose CMUX_SOCKET_PATH=${CMUX_SOCKET_PATH}"
elif [[ -n "${CMUX_SOCKET:-}" ]]; then
  echo "proposed: chose CMUX_SOCKET=${CMUX_SOCKET}"
else
  echo "proposed: unset"
fi
'

Repository: manaflow-ai/cmux

Length of output: 775


🏁 Script executed:

rg '\$\{[A-Z_]+\+x\}' skills/cmux-diagnostics/scripts/cmux-diagnostics

Repository: manaflow-ai/cmux

Length of output: 149


Use non-empty checks for socket env precedence.

At lines 104–106, ${VAR+x} treats an empty variable as "present," so an empty CMUX_SOCKET_PATH masks a valid CMUX_SOCKET and prints a blank path. Switch to -n "${VAR:-}" to skip empty values and fall back correctly.

Proposed fix
-if [[ "${CMUX_SOCKET_PATH+x}" == "x" ]]; then
+if [[ -n "${CMUX_SOCKET_PATH:-}" ]]; then
   printf 'cmux_socket_path: %s (from CMUX_SOCKET_PATH)\n' "$(safe_path "$CMUX_SOCKET_PATH")"
-elif [[ "${CMUX_SOCKET+x}" == "x" ]]; then
+elif [[ -n "${CMUX_SOCKET:-}" ]]; then
   printf 'cmux_socket_path: %s (from CMUX_SOCKET)\n' "$(safe_path "$CMUX_SOCKET")"
 else
   printf 'cmux_socket_path: unset\n'
 fi
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
if [[ "${CMUX_SOCKET_PATH+x}" == "x" ]]; then
printf 'cmux_socket_path: %s (from CMUX_SOCKET_PATH)\n' "$(safe_path "$CMUX_SOCKET_PATH")"
elif [[ "${CMUX_SOCKET+x}" == "x" ]]; then
printf 'cmux_socket_path: %s (from CMUX_SOCKET)\n' "$(safe_path "$CMUX_SOCKET")"
else
printf 'cmux_socket_path: unset\n'
if [[ -n "${CMUX_SOCKET_PATH:-}" ]]; then
printf 'cmux_socket_path: %s (from CMUX_SOCKET_PATH)\n' "$(safe_path "$CMUX_SOCKET_PATH")"
elif [[ -n "${CMUX_SOCKET:-}" ]]; then
printf 'cmux_socket_path: %s (from CMUX_SOCKET)\n' "$(safe_path "$CMUX_SOCKET")"
else
printf 'cmux_socket_path: unset\n'
fi
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@skills/cmux-diagnostics/scripts/cmux-diagnostics` around lines 104 - 109, The
conditionals that check CMUX_SOCKET_PATH and CMUX_SOCKET should use non-empty
tests so empty values don't mask fallbacks: replace the presence checks using
"${CMUX_SOCKET_PATH+x}" and "${CMUX_SOCKET+x}" with non-empty checks like -n
"${CMUX_SOCKET_PATH:-}" and -n "${CMUX_SOCKET:-}" in the conditional block that
prints cmux_socket_path (which uses safe_path to format the value), so an empty
CMUX_SOCKET_PATH will no longer prevent falling back to CMUX_SOCKET.

@lawrencecchen
lawrencecchen dismissed stale reviews from coderabbitai[bot], coderabbitai[bot], and coderabbitai[bot] May 16, 2026 00:49

All actionable CodeRabbit findings from this review were fixed in follow-up commits; latest CodeRabbit check is passing/skipped.

@lawrencecchen
lawrencecchen merged commit a4aa612 into main May 16, 2026
24 of 26 checks passed
@lawrencecchen
lawrencecchen deleted the task-end-user-skills-customization-diagnostics branch May 16, 2026 00:53

This branch was successfully deployed

1 active deployment
Preview – cmux — b8be1100 Deployed May 16, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant