Skip to content
cccskills
FreePublished on GitHub

mdoctor-agent

Install, verify, and operate mdoctor on macOS and Debian/Arch-based Linux. Use when users ask to set up mdoctor, install dependencies, test branch builds on the current machine, run first health checks, troubleshoot install/runtime issues, or perform safe cleanup/fix workflows with mdoctor commands.

The English summary is being prepared. Showing the original description.

See how to install

Files included (2)

  • SKILL.md3.2 KB
  • scripts/install_mdoctor_with_deps.sh5.4 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

mdoctor Agent

Run reliable mdoctor setup + usage workflows, with dependency handling built in.

Quick start

From the mdoctor repo root, run:

bash skills/mdoctor-agent/scripts/install_mdoctor_with_deps.sh

Useful modes:

# Preview only
bash skills/mdoctor-agent/scripts/install_mdoctor_with_deps.sh --dry-run

# Dev mode: link current checkout (best for branch testing)
bash skills/mdoctor-agent/scripts/install_mdoctor_with_deps.sh --method dev --user-bin

# Force local installer behavior (~/.mdoctor clone/update)
bash skills/mdoctor-agent/scripts/install_mdoctor_with_deps.sh --method local

Workflow

1) Preflight

  • Detect OS (Darwin or Debian/Arch-family Linux only).
  • Validate method (auto|dev|local|remote).
  • Check required dependencies:
    • git for local/remote methods
    • curl for remote method
  • If dependencies are missing:
    • Debian-family Linux: install via sudo apt update && sudo apt install -y ...
    • Arch-family Linux (incl. Omarchy): install via sudo pacman -S --needed ...
    • macOS: instruct user to run xcode-select --install (or Homebrew install)

2) Install mdoctor

Choose method by intent:

  • dev: symlink current repo ./mdoctor into bin dir (branch-accurate testing)
  • local: run local install.sh (installs under ~/.mdoctor)
  • remote: one-line installer from GitHub
  • auto (default): prefer dev when current repo is available, fallback to local, then remote

Optional flags:

  • --user-bin: use ~/.local/bin (avoids sudo in most cases)
  • --repo-root <path>: override repository root for dev/local modes

3) Verify installation

Run smoke checks:

mdoctor version
mdoctor help
mdoctor info
mdoctor check -m system

The installer script forces a safe TERM fallback for non-interactive sessions to reduce tput noise during checks.

4) First safe usage

Prefer non-destructive commands first:

mdoctor check
mdoctor clean
mdoctor list

Only run destructive cleanup with explicit intent:

mdoctor clean --force

5) Troubleshooting

  • If mdoctor is not found: verify symlink target and PATH.
  • If /usr/local/bin is not writable: rerun with --user-bin.
  • If Linux distro unsupported: stop and explain the Debian/Arch-family limitation.
  • If sudo is unavailable in remote sessions: provide exact commands for user to run locally (apt on Debian-family, pacman -S on Arch-family).

Command reference

Common operations:

mdoctor check
mdoctor check --json
mdoctor check -m security
mdoctor clean
mdoctor clean --interactive
mdoctor fix dns
mdoctor fix disk
mdoctor update --check
mdoctor update

Guardrails

  • Ask before state-changing operations (clean --force, fix *, package installs).
  • Prefer read-only diagnosis first, then targeted fixes.
  • Do not claim support for Linux outside Debian/Arch families.

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

Report a problem with this skill