← Back to Skills Marketplace
dlutwuwei

mac-system-control

by wei.wu · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
666
Downloads
0
Stars
2
Active Installs
1
Versions
Install in OpenClaw
/install mac-system-control
Description
管理和控制 macOS 系统功能。包括查看系统信息、管理进程、控制音量/亮度、 网络管理、电源管理、截图、剪贴板、Finder 操作等。当用户要求查看系统状态、 控制系统设置、管理进程、截图、调节音量亮度、查看网络信息、 关机重启睡眠等 Mac 系统操作时使用。
README (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 的命令提前告知用户
Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install mac-system-control
  3. After installation, invoke the skill by name or use /mac-system-control
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release of mac-system-control. - 提供 macOS 系统信息查询、进程管理、音量与亮度控制 - 支持网络管理、电源操作(含安全确认)、截图、剪贴板管理 - 内置 Finder 常用操作及系统设置快捷访问 - 适配命令行工具,涵盖常见 Mac 操作自动化
Metadata
Slug mac-system-control
Version 1.0.0
License MIT-0
All-time Installs 2
Active Installs 2
Total Versions 1
Frequently Asked Questions

What is mac-system-control?

管理和控制 macOS 系统功能。包括查看系统信息、管理进程、控制音量/亮度、 网络管理、电源管理、截图、剪贴板、Finder 操作等。当用户要求查看系统状态、 控制系统设置、管理进程、截图、调节音量亮度、查看网络信息、 关机重启睡眠等 Mac 系统操作时使用。 It is an AI Agent Skill for Claude Code / OpenClaw, with 666 downloads so far.

How do I install mac-system-control?

Run "/install mac-system-control" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is mac-system-control free?

Yes, mac-system-control is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does mac-system-control support?

mac-system-control is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created mac-system-control?

It is built and maintained by wei.wu (@dlutwuwei); the current version is v1.0.0.

💬 Comments