ops-mac

按需运维:在用户询问“Mac 运行缓慢”或“修复 macOS”等问题时使用此技能。

仓库最近推送
GitHub Stars
564
Forks
64
Issues / PRs
6

安装方式

先用 Prompt 核对来源与依赖。也可下载安装包。

用 AI 助手安装

复制提示词,让助手先核对固定版本和依赖。

查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "ops-mac":https://skillpi.com/zh/skills/deepskill-d83a43b508ba88e8922e63a9c922483b9dd9b471ca2b286b1e20dc9715cbc673。安装前核对上游来源和版本:https://github.com/Lifecycle-Innovations-Limited/claude-ops。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。

来源与配置

github.com

配置方式待核实

请查看原始来源中的适用工具、依赖和权限要求。

安装实测待补充

按需运维:在用户询问“Mac 运行缓慢”或“修复 macOS”等问题时使用此技能。

0 下载

介绍来源: third_party · Lifecycle-Innovations-Limited · 0.0.1 参考来源

SkillPi 解读

能完成的任务
翻译待完成,请参阅来源文档。
适合谁
翻译待完成,请参阅来源文档。
实测状态
未测试

文件浏览

在原站浏览文件 ↗

原始 SKILL.md

打开原文 ↗
Frontmatter
name: ops-mac
description: "OPS on-demand: This skill should be used when the user asks to \"mac is slow\", \"macos fix\", or…"
argument-hint: '[audit|health|net|disk|procs|security|launchd|fix|ensure|update]'
allowed-tools:
  - Bash
  - Read
  - Grep
  - Glob
  - AskUserQuestion
effort: low
maxTurns: 30

OPS ► MAC — macOS Diagnose & Fix

Load ops-rules before acting. Public repo (no personal data). Outbound: one draft → one approval → one send. If AskUserQuestion / Workflow are missing, follow Rule 10 in ops-rules (Hermes: numbered options / two-turn Telegram card; delegate_task).

One command for native macOS health: it bundles the macos-toolkit CLI suite, auto-installs it on first use, runs a read-only baseline, and remediates the common offenders behind explicit confirmations.

All work routes through ${CLAUDE_PLUGIN_ROOT}/bin/ops-mac, the single source of truth for install + probes + the aggregate audit. The bundled CLIs:

Tool Domain ops-mac subcommand
machealth composite health (CPU/mem/disk/thermal/battery/iCloud/TM/net) health
netwhiz network + WiFi diagnostics net / net wifi
macbroom disk cleanup & reclaimable cache scan disk
pstop process monitoring (CPU/mem hogs) procs
macdog security & privacy audit security
lanchr launchd agent/daemon health (doctor) launchd
macctl power / display / audio control power
macfig hidden macOS defaults defaults
updater app update management update

Platform guard

This skill is macOS only. The dispatcher exits with code 3 on non-Darwin. For Linux/WSL/Windows system optimization use /ops:speedup (cross-platform). The two are complementary — /ops:mac is the deep macOS-native surface; /ops:speedup is the portable cleaner.

Two hard-won quirks (baked into the dispatcher)

  1. machealth check/diagnose can hang forever on a stuck Time Machine / iCloud probe (its checks run in parallel with no per-probe skip flag). Every machealth call is wrapped in a hard timeout (default 25s, override OPS_MAC_MACHEALTH_TIMEOUT). If it trips, the other probes are still reliable — never block on it.
  2. The toolkit's pretty TUI tables render EMPTY when stdout isn't a TTY. The dispatcher forces --json for headless/agent consumers (macbroom, pstop, macdog, lanchr). When you need machine data, always pass --json.

Runtime Context

Before anything, ensure the suite is installed (idempotent — no-op if already present):

${CLAUDE_PLUGIN_ROOT}/bin/ops-mac ensure

Mode routing

Dispatch on $ARGUMENTS:

  • empty / audit → Baseline flow (read-only, below)
  • health / net / disk / procs / security / launchd / power / update → run that single probe and print verbatim:
    ${CLAUDE_PLUGIN_ROOT}/bin/ops-mac <subcommand>
  • fix → Remediation flow (below, Rule 5 confirmations)
  • ensure / install → run ops-mac ensure and report what was added

Baseline flow (/ops:mac or /ops:mac audit)

Run the aggregate audit — it composes the reliable probes in one call:

${CLAUDE_PLUGIN_ROOT}/bin/ops-mac audit

Then summarize for the user with a verdict per area:

OPS ► MAC AUDIT — [version] ([arch])

🔴/🟡/🟢 Security    grade [X]/100 — [firewall/SIP/FileVault/Gatekeeper/remote-login]
🔴/🟡/🟢 Launchd     [N] genuinely-broken user daemons (Apple -9/SIGKILL noise filtered out)
🟢 Processes  top hog: [name] [N]% CPU
🟢 Network    [iface] [ip] — [ok/degraded]
🟢 Disk       ~[N] GB safe reclaimable (biggest: [cache] [N] GB)
⚠ Health     [machealth result, or "probe timed out — TM/iCloud stuck"]

Next: /ops:mac fix to remediate, or pick one area.

Launchd noise filter — lanchr doctor flags ~50+ "critical" entries; most are normal:

  • Apple on-demand agents exit -9 (SIGKILL) when idle — expected, not broken.
  • Stale Apple plist paths (cvmsCompAgent, BluetoothUIService, battery helper) — cosmetic.
  • The actionable ones are user/3rd-party daemons with exit status: 1 or a missing binary you own. Surface only those.

Remediation flow (/ops:mac fix)

Run the audit first to know what's wrong, then offer fixes. Per plugin Rule 5, every mutating action needs its own confirmation — never batch-execute. Present via AskUserQuestion, max 4 options each.

Common offenders and their guarded fixes:

1. Firewall — opt-in only, never offered

The application firewall is out of scope for /ops:mac fix. Report its state in the audit and stop there. Do not offer to enable it, do not add it to a fix menu, and do not list it as a recommendation — a firewall that comes on unasked breaks local listeners (dev servers, MCP proxies, VNC, tunnels) that the user did not connect the change to.

Touch it only when the user asks for the firewall by name in that turn ("turn the firewall on", "enable stealth mode"). Then confirm the single action and run:

sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setglobalstate on
# stealth (optional): sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setstealthmode on

"Run /ops:mac fix" is not that request.

2. Stale / crashing launchd user daemons

For each actionable entry from lanchr doctor (missing binary, or repeated exit 1), confirm individually:

com.example.foo — binary missing at [path]. This launchd job is dead.
  [Show the plist first]  [Remove it]  [Disable (keep file)]  [Skip]

Use lanchr to remediate where possible; otherwise launchctl bootout/disable after showing the plist. Never touch a daemon the user relies on (CLIProxyAPI/haproxy, gbrain push, ops-daemon, cloudflared tunnels, watchdogs) without spelling out exactly what it is — cross-check before recommending removal.

3. Reclaimable disk

macbroom found ~[N] GB of safe cache. Categories: [list].
  [Clean safe caches]  [Pick categories]  [Review largest first]  [Skip]

On confirm (safe categories only):

macbroom clean --caches            # confirm prompt; or --yolo only after explicit approval

Never run macbroom clean --all --yolo without per-category approval.

4. App updates

${CLAUDE_PLUGIN_ROOT}/bin/ops-mac update    # updater check — then confirm before applying

After any fix, re-run the relevant probe and show before→after.

Mobile mode (Rule 7)

If $SSH_CONNECTION/$SSH_CLIENT/$SSH_TTY is set, $OPS_MOBILE=1, or $COLUMNS < 80: drop the boxes/tables, emit 3–8 plain lines, one fact each. Example:

mac audit:
security B/100 — firewall OFF.
launchd: 2 dead user daemons.
disk: 8.6 GB safe to clean.
health: machealth probe stuck (TM/iCloud).
fix? /ops:mac fix

When to use this vs other skills

Want… Use
macOS-native deep diagnose + fix (firewall, launchd, network, security) /ops:mac
Cross-platform cleaner (Linux/WSL/Windows too) /ops:speedup
Quick "is everything connected?" integration glance /ops:status
Full health check + auto-repair of the ops plugin itself /ops:doctor

版本历史

  1. v3.12.1 GitHub ↗
    原版更新说明

    ### Fixed - ops-task-reminder: the portable lock now runs the whole counter transaction under a real fcntl.flock, so one worker can no longer remove another's fresh lock and lose counter updates.

  2. v3.12.0 GitHub ↗
    原版更新说明

    ### Changed Add /ops:ops-mix and evidence-only A&R mix-evidence mode using the configured Mixforge engine.

  3. v3.11.0 GitHub ↗
    原版更新说明

    ### Changed Release safety, maintenance and inbox fixes from #1033: passive daemon monitoring, timezone-safe AWS audit dates, fail-closed release merge gates (same-head CI, Copilot review, resolved threads), progressive inbox with attachment and archive read-back proofs, and gate-only outbound wording in ops-desk and ops-leadgen.

  4. v3.10.29 GitHub ↗
    原版更新说明

    ### Fixed - `ops-speedup --clean` stays under 60s: on macOS it skips the slow login-items query (#1036); on Linux it skips the unused disk-reclaim scan and keeps the page cache unless `--aggressive` is set (#1035). - `ops-inbox` shows validated drafts as soon as each one is ready instead of after the whole scan (#1031). ### Changed - Hooks `ops-pretool-skill-update` and `ops-task-reminder` run async; the reminder takes a per-session lock so concurrent runs no longer lose counts, and it now also resets on Task* tools (#1032).

  5. v3.10.28 GitHub ↗
    原版更新说明

    ### Changed ops-ar: Cyanite schema drift (fileUploadRequest id, ID! upload var), real auth test via libraryTracks, webhook must verify HMAC-SHA512 Signature, bpmRangeAdjusted vs bpmPrediction, Soundcharts app-id/key pairing.

此处仅展示最近 5 个版本。 在原站查看完整版本历史 ↗

当前收录版本

0.0.1

核对来源版本 ↗

安全与评测信息

质量评测

满分100 · 来自 SkillPi LAB 实验室的评测报告。

场景价值88/100

亮点

  • 提供全面的 macOS 系统诊断与修复能力,覆盖健康、网络、磁盘、进程、安全等核心运维场景
  • 集成 macos-toolkit 套件,支持自动安装与按需执行,解决用户常见系统性能问题
触发精准75/100

待提升项

  • description内容截断 原报告严重程度:轻微

    description 字段以 'or…' 结尾,未完整描述触发条件

    改进建议:补全 description 中的触发场景,避免省略号

亮点

  • argument-hint 提供清晰的子命令选项,边界明确
结构规范85/100

待提升项

  • 文档过长 原报告严重程度:轻微

    SKILL.md 内容超过 500 行,影响可读性

    改进建议:考虑将部分详细说明移至独立文档或通过链接引用

亮点

  • 结构清晰,分阶段描述 Baseline 和 Remediation 流程
  • 包含完整的前言、运行时上下文、模式路由和移动端适配说明
执行可靠82/100

待提升项

  • 依赖文件缺失风险 原报告严重程度:重大

    执行依赖 ${CLAUDE_PLUGIN_ROOT}/bin/ops-mac 文件,若未正确部署会导致执行失败

    改进建议:在 ensure 阶段增加文件存在性检查与错误提示,或提供备用执行路径

亮点

  • 对 machealth 探针设置 timeout 防止挂起,提升稳定性
  • 针对非 TTY 环境强制使用 --json 输出,避免渲染问题
  • 所有修改操作均需用户确认,符合安全规范
证据可验 (前四项均值)83/100

取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。

正文静态检测

100 / 100 · skillpi-20261123-no-r3-v1

正文未命中当前规则。

分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。

权限与使用前检查

根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。

  • 管理员或提升权限

    确认确有必要再提升权限;不要关闭防护、绕过证书验证或扩大整个系统的访问权限。

    主文档提及 · 第 109, 110 行
文档引用的域名或地址

这些地址可能用于文档链接或示例,不是已批准的联网清单。使用前核对实际目的地及发送的数据。

  • github.com

本站展示提示不会授予权限。涉及文件改动、密钥、外部发送或费用时,仍由你使用的工具按需确认。

安全评级与访问范围

safe · 静态证据核验,不代表运行安全保证。

使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。