← 返回 Skills 市场
dlutwuwei

mac-system-control

作者 wei.wu · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
666
总下载
0
收藏
2
当前安装
1
版本数
在 OpenClaw 中安装
/install mac-system-control
功能描述
管理和控制 macOS 系统功能。包括查看系统信息、管理进程、控制音量/亮度、 网络管理、电源管理、截图、剪贴板、Finder 操作等。当用户要求查看系统状态、 控制系统设置、管理进程、截图、调节音量亮度、查看网络信息、 关机重启睡眠等 Mac 系统操作时使用。
使用说明 (SKILL.md)

Mac System Control

系统信息

# 系统概览
system_profiler SPSoftwareDataType SPHardwareDataType

# CPU 使用率
top -l 1 -n 0 | head -10

# 内存使用
vm_stat | head -6

# 磁盘空间
df -h /

# 电池状态(笔记本)
pmset -g batt

# macOS 版本
sw_vers

进程管理

# 按 CPU 排序前 10 进程
ps aux --sort=-%cpu | head -11

# 按内存排序前 10 进程
ps aux --sort=-%mem | head -11

# 查找进程
pgrep -fl "\x3C关键词>"

# 杀掉进程(先确认再操作)
kill \x3CPID>
killall "\x3C进程名>"

操作前务必向用户确认目标进程,避免误杀。

音量与亮度

# 查看当前音量(0-100)
osascript -e 'output volume of (get volume settings)'

# 设置音量
osascript -e 'set volume output volume \x3C0-100>'

# 静音/取消静音
osascript -e 'set volume output muted true'
osascript -e 'set volume output muted false'

# 调节亮度(需要 brightness 命令,brew install brightness)
brightness \x3C0.0-1.0>

网络

# 当前 Wi-Fi 名称
networksetup -getairportnetwork en0

# IP 地址
ipconfig getifaddr en0

# 公网 IP
curl -s ifconfig.me

# DNS 设置
networksetup -getdnsservers Wi-Fi

# 网络连通性测试
ping -c 3 \x3Chost>

# 列出 Wi-Fi 网络
/System/Library/PrivateFrameworks/Apple80211.framework/Resources/airport -s

# 开关 Wi-Fi
networksetup -setairportpower en0 off
networksetup -setairportpower en0 on

电源管理

# 睡眠
pmset sleepnow

# 关机(需确认)
sudo shutdown -h now

# 重启(需确认)
sudo shutdown -r now

# 锁屏
pmset displaysleepnow

# 防止休眠(保持唤醒)
caffeinate -d -t \x3C秒数>

关机和重启操作必须先向用户确认。

截图

# 全屏截图保存到桌面
screencapture ~/Desktop/screenshot.png

# 指定区域截图(交互式)
screencapture -i ~/Desktop/screenshot.png

# 窗口截图(交互式选择窗口)
screencapture -w ~/Desktop/screenshot.png

# 截图到剪贴板
screencapture -c

剪贴板

# 读取剪贴板文本
pbpaste

# 写入文本到剪贴板
echo "内容" | pbcopy

# 将文件内容复制到剪贴板
pbcopy \x3C /path/to/file

Finder 操作

# 在 Finder 中打开目录
open /path/to/directory

# 在 Finder 中显示文件
open -R /path/to/file

# 清空废纸篓
osascript -e 'tell application "Finder" to empty trash'

# 显示/隐藏隐藏文件
defaults write com.apple.finder AppleShowAllFiles -bool true && killall Finder
defaults write com.apple.finder AppleShowAllFiles -bool false && killall Finder

系统设置快捷方式

# 打开系统设置(Ventura+)
open "x-apple.systempreferences:"

# 打开特定设置面板
open "x-apple.systempreferences:com.apple.Network-Settings.extension"
open "x-apple.systempreferences:com.apple.Sound-Settings.extension"
open "x-apple.systempreferences:com.apple.Bluetooth-Settings.extension"
open "x-apple.systempreferences:com.apple.Display-Settings.extension"

工作流

  1. 用户描述要执行的系统操作
  2. 判断属于哪个类别(信息查询 / 设置调整 / 进程管理等)
  3. 信息查询类直接执行并展示结果
  4. 破坏性操作(关机、重启、杀进程、清空废纸篓)先向用户确认
  5. 需要 sudo 的命令提前告知用户
安全使用建议
This skill appears coherent for controlling a Mac, but it exposes powerful and privacy-sensitive commands. Before installing or invoking it: ensure the agent prompts you before destructive actions (shutdown, reboot, kill, empty trash), avoid using autonomous invocation if you don't want background changes, be aware screenshots and clipboard access can capture sensitive data, and note that the skill makes an external request (curl ifconfig.me) to learn the public IP. Only run it on devices you trust and require explicit user confirmation for any sudo/destructive commands.
功能分析
Type: OpenClaw Skill Name: mac-system-control Version: 1.0.0 The skill provides extensive macOS system control capabilities, including process management, clipboard access (pbpaste), screen capture (screencapture), and power management (sudo shutdown). While these functions are aligned with the stated purpose in SKILL.md and include instructions to confirm destructive actions with the user, the broad shell access and ability to read sensitive system data represent high-risk capabilities that could be abused. No evidence of intentional malice or exfiltration to unauthorized endpoints was found.
能力评估
Purpose & Capability
The SKILL.md contains macOS commands for system info, process management, audio/brightness, network, power, screenshots, clipboard, and Finder—these directly match the skill name and description. No unrelated binaries, env vars, or config paths are requested.
Instruction Scope
Instructions run local macOS CLI tools and AppleScript (e.g., system_profiler, pmset, screencapture, pbcopy/pbpaste, networksetup). This matches the stated scope, but several commands are privacy- or safety-sensitive: screencapture and pbpaste/pbcopy access screen and clipboard contents, shutdown/kill/empty-trash are destructive, and curl to ifconfig.me transmits a network request to an external endpoint. The SKILL.md does advise confirming destructive operations, which is appropriate—ensure confirmations are enforced at runtime.
Install Mechanism
Instruction-only skill with no install spec and no code files. Lowest-risk installation surface (nothing is written to disk by the skill itself). One listed helper (brightness) is optional and notes brew install; nothing is auto-installed by the skill.
Credentials
No environment variables, credentials, or config paths are requested. The skill does not ask for unrelated secrets or system config access beyond standard macOS CLI usage.
Persistence & Privilege
always is false and the skill is user-invocable. The skill does not request permanent presence or elevated platform privileges. Note: model invocation is enabled by default on the platform (the agent could invoke the skill autonomously); that is normal and not in itself a red flag here.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install mac-system-control
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /mac-system-control 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of mac-system-control. - 提供 macOS 系统信息查询、进程管理、音量与亮度控制 - 支持网络管理、电源操作(含安全确认)、截图、剪贴板管理 - 内置 Finder 常用操作及系统设置快捷访问 - 适配命令行工具,涵盖常见 Mac 操作自动化
元数据
Slug mac-system-control
版本 1.0.0
许可证 MIT-0
累计安装 2
当前安装数 2
历史版本数 1
常见问题

mac-system-control 是什么?

管理和控制 macOS 系统功能。包括查看系统信息、管理进程、控制音量/亮度、 网络管理、电源管理、截图、剪贴板、Finder 操作等。当用户要求查看系统状态、 控制系统设置、管理进程、截图、调节音量亮度、查看网络信息、 关机重启睡眠等 Mac 系统操作时使用。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 666 次。

如何安装 mac-system-control?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install mac-system-control」即可一键安装,无需额外配置。

mac-system-control 是免费的吗?

是的,mac-system-control 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

mac-system-control 支持哪些平台?

mac-system-control 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 mac-system-control?

由 wei.wu(@dlutwuwei)开发并维护,当前版本 v1.0.0。

💬 留言讨论