360 Secure SkillHub
360 安全技能中心

Device Control

按用户明确请求,用 node ctl.js 调整音量或亮度、打开白名单应用、列出匹配进程,并在确认 PID 后优雅关闭该进程;不接受任意命令、路径或应用名,也不支持强制结束或进程树终止。

分类:自动化
iyeque
iyeque
热度 72.75
最近更新 2026-12-01 18:05:05

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add iyeque/iyeque-device-control
兼容性
通用兼容
联网要求
不联网
数据出网
数据不出本机
Metadata
name
device-control
description
Bounded local desktop controls for explicit requests: adjust volume or brightness, open an allowlisted application, list matching processes, or gracefully close one confirmed process by PID without targeting descendants. Use only when the user clearly asks to control the device.
license
MIT-0
metadata
{"openclaw":{"emoji":"🎛️","requires":{"bins":["node"]},"version":"1.3.3"}}

Bounded device control

Run ctl.js only for an explicit user request. It supports volume, brightness, opening a small safe allowlist of common applications, listing matching processes, and gracefully closing one selected process by PID. It never accepts arbitrary shell commands, paths, shell metacharacters, or arbitrary application names. Closing requires a fresh process list, a specific PID, and explicit --confirm yes.

node ctl.js --action set_volume --value 50
node ctl.js --action change_volume --value -10
node ctl.js --action set_brightness --value 75
node ctl.js --action open_app --app firefox
node ctl.js --action list_app_processes --app firefox
node ctl.js --action close_app --app firefox --pid 12345 --confirm yes

Volume and brightness are 0–100; deltas are -100–100. Opening is limited to common applications such as Firefox, Chrome, Chromium, Edge, VS Code, VLC, Spotify, Calculator, Files, and Terminal. Unsupported platform utilities return an error without fallback execution.

list_app_processes prints the current PID and executable name for the selected allowlisted app. close_app verifies that the PID still belongs to that app before sending graceful termination. Linux and macOS use SIGTERM for the selected PID. Windows and WSL use taskkill /PID <pid> without the process-tree option and without forced termination, so descendants are not targeted. Unsaved work may still be lost; the skill does not provide a force-close option.

The close operation never uses executable-wide matching, process-tree termination, or forced termination. A user must select and confirm one current PID, and a stale or mismatched PID is rejected.

Source and support

Source: https://github.com/iyeque/openclaw-skills/tree/main/skills/device-control

Report bugs and security concerns through the repository issue guidance.