Skill flagged — suspicious patterns detected

ClawHub Security flagged this skill as suspicious. Review the scan results before using.

系统命令

v1.0.0

执行Windows常见系统命令(如ipconfig、tasklist、netstat、systeminfo及别名命令)并返回格式化结果,支持安全分级和自定义配置。

1· 74·0 current·0 all-time

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for ljr287404428/system-cmd.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "系统命令" (ljr287404428/system-cmd) from ClawHub.
Skill page: https://clawhub.ai/ljr287404428/system-cmd
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install system-cmd

ClawHub CLI

Package manager switcher

npx clawhub@latest install system-cmd
Security Scan
VirusTotalVirusTotal
Suspicious
View report →
OpenClawOpenClaw
Suspicious
medium confidence
Purpose & Capability
The name/description match the code: JS scripts execute Windows commands (PowerShell/CMD) and provide alias/config support. Minor inconsistencies: README/README.md sometimes references a Python subprocess implementation while shipped code is Node.js; SKILL metadata says "instruction-only" / no OS restriction, yet the implementation and docs require Windows/PowerShell. These are likely sloppy packaging but worth noting.
Instruction Scope
SKILL.md and the scripts implement pre-defined safe commands, alias resolution, and a /system_cmd exec <command> custom mode with safety checks and time/output limits. That matches the stated scope. However custom-exec still runs arbitrary shell commands (via child_process.exec) with heuristics/regex to block dangerous patterns — such filters can be bypassed by clever inputs. The skill also hot-loads/reads config.json from disk (included in package) to resolve aliases.
Install Mechanism
No install spec or remote downloads; all code is bundled in the skill package. No network fetches or third-party install steps were observed in the manifest, which reduces supply-chain risk.
Credentials
The skill requests no environment variables or external credentials. It reads a local config.json (present in the package) which is reasonable for alias configuration. No unrelated credentials or config paths are requested.
Persistence & Privilege
always:false and agent autonomous invocation defaults are normal. The skill executes system commands as the agent process and may run commands that require elevated privileges; high-risk commands are gated by a textual confirmation mechanism (--yes). This is expected behavior but increases blast radius if the agent or skill is run with elevated rights.
What to consider before installing
This skill appears to do what it claims (run Windows commands) and contains code that enforces whitelists, timeouts and forbidden-pattern checks. Before installing: 1) Confirm you only run it on Windows test machines or VMs — the implementation expects PowerShell/CMD. 2) Review the bundled scripts (especially v3/v4) and config.json yourself; aliases can expand into commands. 3) If you don't need custom command execution, disable or remove the /system_cmd exec feature to avoid arbitrary command execution. 4) Don't grant the agent or this skill administrative privileges; high-risk operations will still run if invoked with elevated rights. 5) Be aware filters use regex/heuristics and could be bypassed; consider running the skill in an isolated environment and auditing logs. 6) Note the packaging inconsistencies (docs mentioning Python, metadata claiming instruction-only), which suggest the package may have been assembled sloppily — request the author clarify or provide a clean, single-language implementation if you require higher assurance.

Like a lobster shell, security has layers — review code before you run it.

latestvk97f971e3pmw4z5d77wr8hszhx84hehn
74downloads
1stars
1versions
Updated 2w ago
v1.0.0
MIT-0

system_cmd - 系统命令执行技能

描述

执行常见的 Windows 系统命令并返回格式化的结果。支持的命令包括网络配置、进程管理、网络连接和系统信息查询。

使用场景

当用户需要快速查看系统状态、网络配置、进程列表或系统信息时使用此技能。

支持的命令

  1. ipconfig - 查看网络接口配置和IP地址
  2. tasklist - 查看当前运行的进程列表
  3. netstat -an - 查看所有网络连接和监听端口
  4. systeminfo - 查看详细的系统信息

用法

1. 预定义命令模式(安全命令)

/system_cmd <命令名>

示例:

  • /system_cmd ipconfig - 查看IP配置
  • /system_cmd tasklist - 查看进程列表
  • /system_cmd netstat - 查看网络连接(自动添加-an参数)
  • /system_cmd systeminfo - 查看系统信息

2. 命令别名模式(快捷方式)

/system_cmd <别名>

默认别名:

  • /system_cmd ip → 等于 /system_cmd ipconfig
  • /system_cmd 进程 → 等于 /system_cmd tasklist
  • /system_cmd 网络 → 等于 /system_cmd netstat
  • /system_cmd 系统 → 等于 /system_cmd systeminfo
  • /system_cmd ping → 等于 /system_cmd exec ping 8.8.8.8

自定义别名: 在 config.json 中配置

3. 自定义命令模式(普通命令)

/system_cmd exec <命令>

示例:

  • /system_cmd exec ping google.com - 自定义Ping目标
  • /system_cmd exec dir - 查看当前目录
  • /system_cmd exec echo Hello World - 输出文本
  • /system_cmd exec whoami - 查看当前用户
  • /system_cmd exec date /t - 查看当前日期
  • /system_cmd exec time /t - 查看当前时间
  • /system_cmd exec hostname - 查看主机名
  • /system_cmd exec ver - 查看Windows版本

4. 高危命令模式(需要确认)

/system_cmd exec <高危命令> --yes

示例:

  • /system_cmd exec del temp.txt --yes - 删除文件(需要确认)
  • /system_cmd exec taskkill /f notepad.exe --yes - 强制结束进程(需要确认)
  • /system_cmd exec net stop wuauserv --yes - 停止Windows更新服务(需要确认)
  • /system_cmd exec sc delete MyService --yes - 删除系统服务(需要确认)

实现细节

命令映射

  • ipconfig → 执行 ipconfig /all 获取详细信息
  • tasklist → 执行 tasklist 获取进程列表
  • netstat → 执行 netstat -an 获取网络连接
  • systeminfo → 执行 systeminfo 获取系统信息

输出处理

  1. 中文支持:所有输出都进行适当的编码处理,确保中文正确显示
  2. 格式化:根据命令类型进行适当的格式化(表格、列表等)
  3. 错误处理:捕获命令执行错误并提供友好的错误信息
  4. 安全性:只允许执行预定义的安全命令

安全等级与权限控制

1. 🟢 安全命令(直接执行)

  • 预定义命令:ipconfig, tasklist, netstat, systeminfo
  • 命令别名:ip, 进程, 网络, 系统, ping
  • 安全只读命令:ping, echo, whoami, hostname, ver

2. 🟡 普通命令(安全检查后执行)

  • 大多数自定义命令
  • 经过安全检查:路径检查、字符过滤、长度限制
  • 执行限制:15秒超时,5MB缓冲区

3. 🔴 高危命令(需要用户确认)

高危命令列表

  • 文件操作: del, erase, rm, rmdir, rd
  • 磁盘操作: format, chkdsk, diskpart
  • 进程管理: taskkill /f, taskkill /im
  • 服务管理: net stop, net start, sc delete, sc stop
  • 注册表操作: reg delete, reg add
  • 系统控制: shutdown, reboot

确认机制

  • 首次执行高危命令:返回风险提示和确认要求
  • 确认执行:添加 --yes 参数,如 /system_cmd exec del file.txt --yes
  • 执行限制:30秒超时,额外安全监控

4. 🚫 完全禁止的命令

绝对禁止执行的命令

  • rm -rf - 递归强制删除
  • del *.* - 删除所有文件
  • format c: - 格式化系统盘
  • reg delete HKLM - 删除系统注册表
  • net user administrator - 修改管理员账户

5. 配置系统

配置文件: config.json

  • pingDefaultTarget: 默认Ping目标(默认: 8.8.8.8
  • aliases: 自定义别名映射
  • 支持变量: ${pingDefaultTarget} 在别名中替换

默认配置:

{
  "pingDefaultTarget": "8.8.8.8",
  "aliases": {
    "ip": "ipconfig",
    "进程": "tasklist",
    "网络": "netstat",
    "系统": "systeminfo",
    "ping": "ping ${pingDefaultTarget}"
  }
}

6. 执行限制

  • 命令长度: 最大1000字符
  • 执行时间: 普通命令15秒,高危命令30秒
  • 输出长度: 最大4000字符(自动截断)
  • 缓冲区大小: 5MB

错误处理

  • 命令不存在时返回错误信息
  • 命令执行失败时返回详细的错误原因
  • 输出过长时进行适当的截断和分页
  • 危险命令被阻止并返回安全警告

技能文件结构

system_cmd/
├── SKILL.md              # 本文件
├── scripts/
│   └── system_cmd.js     # 主要实现脚本
└── references/
    └── commands.md       # 命令参考文档

依赖

  • Windows 操作系统
  • PowerShell 或 CMD
  • OpenClaw 执行权限

注意事项

  1. 部分命令可能需要管理员权限才能获取完整信息
  2. 系统信息命令可能执行较慢,请耐心等待
  3. 网络连接信息可能包含大量数据,输出会进行适当截断

技能特点

🟢 安全命令模式

  1. 简单易用: 只需输入命令名称即可执行
  2. 中文友好: 自动处理编码问题,确保中文正常显示
  3. 错误处理: 完善的错误检测和友好的错误提示
  4. 格式化输出: 结果清晰易读,带有标题和分隔符

🔄 命令别名模式(新增)

  1. 快捷操作: 使用简短别名代替完整命令
  2. 中文支持: 支持中文别名,如 进程网络系统
  3. 配置灵活: 可通过 config.json 自定义别名
  4. 变量支持: 别名中支持变量替换(如 ${pingDefaultTarget}

🟡 普通命令模式

  1. 灵活扩展: 支持执行大多数系统命令
  2. 安全检查: 路径检查、字符过滤、长度验证
  3. 资源限制: 执行时间、输出长度、命令长度限制
  4. 友好提示: 详细的错误信息和安全警告

🔴 高危命令模式

  1. 权限控制: 高危命令需要用户明确确认
  2. 风险提示: 详细说明命令的风险和后果
  3. 确认机制: 使用 --yes 参数确认执行高危命令
  4. 额外监控: 高危命令有更长的超时时间和额外监控

🚫 安全防护

  1. 多层防护: 黑名单 + 模式匹配 + 路径检查 + 字符过滤
  2. 分级控制: 安全命令/普通命令/高危命令/禁止命令四级控制
  3. 完全禁止: 绝对危险的命令被完全阻止
  4. 向后兼容: 原有功能完全保留,新增功能可选使用

⚙️ 配置系统

  1. 配置文件: 支持 config.json 配置
  2. 默认配置: 提供合理的默认值和别名
  3. 热加载: 配置文件修改后自动生效
  4. 用户定制: 用户可自定义别名和配置

技术实现

编码处理

使用PowerShell执行命令并设置代码页为65001(UTF-8),确保中英文混合输出正常显示。CMD特有命令使用CMD执行。

别名解析系统

  1. 多层解析: 配置文件别名 → 预定义命令别名 → 原始命令
  2. 变量替换: 支持 ${pingDefaultTarget} 等变量在别名中替换
  3. 热加载: 配置文件修改后自动重新加载
  4. 别名映射: 显示别名到实际命令的映射关系

安全机制(四级防护)

  1. 完全禁止层: 检测并阻止绝对危险的命令(如 rm -rf, format c:
  2. 高危确认层: 识别高危命令,要求用户明确确认(--yes 参数)
  3. 安全检查层: 路径检查、字符过滤、模式匹配、长度验证
  4. 资源限制层: 限制命令长度、执行时间、输出大小、缓冲区

权限控制机制

  1. 命令分类: 自动识别命令的安全等级(安全/普通/高危/禁止)
  2. 风险评估: 为高危命令提供详细的风险描述
  3. 确认流程: 高危命令首次执行返回确认提示,需要 --yes 确认
  4. 执行监控: 高危命令有更长的超时时间和额外监控

配置管理系统

  1. 默认配置: 提供合理的默认值和别名
  2. 用户配置: 支持用户通过 config.json 自定义
  3. 配置合并: 用户配置与默认配置智能合并
  4. 错误处理: 配置文件错误时使用默认配置并提示

错误处理机制

  1. 命令验证:检查输入的命令是否在支持列表中
  2. 别名解析:解析命令别名到实际命令
  3. 安全分级:识别命令的安全等级和风险
  4. 权限检查:验证用户是否有权限执行高危命令
  5. 执行监控:捕获命令执行过程中的错误
  6. 资源监控:监控执行时间和资源使用
  7. 友好提示:将系统错误转换为用户友好的提示信息

输出格式化

  1. 添加标题和分隔符,提高可读性
  2. 根据命令类型和安全等级使用不同图标
  3. 清理多余的空格和换行符
  4. 自动截断过长的输出
  5. 显示原始命令和安全等级(自定义命令模式)
  6. 显示别名映射信息(如果使用别名)
  7. 高危命令执行结果有额外警告提示

更新日志

v1.0 (2026-04-08)

  • 初始版本创建,支持4个基本系统命令
  • 修复编码问题,确保中文正常显示
  • 添加完整的错误处理和帮助系统

v2.0 (2026-04-08)

  • 新增自定义命令功能: 支持 /system_cmd exec <命令> 格式
  • 增强安全机制: 危险命令检测和阻止
  • 资源限制: 命令长度、执行时间、输出大小限制
  • 改进错误处理: 更详细的错误信息和安全警告
  • 保持向后兼容: 原有功能完全保留
  • 更新文档: 完整的帮助和使用说明

v3.0 (2026-04-08)

  • 新增权限控制: 高危命令需要用户确认 (--yes)
  • 四级安全防护: 安全命令/普通命令/高危命令/禁止命令
  • 风险评估: 为高危命令提供详细风险描述
  • 确认机制: 高危命令首次执行返回确认提示
  • 分级监控: 不同安全等级有不同的执行限制
  • 完全禁止: 绝对危险的命令被完全阻止
  • 改进帮助: 更详细的帮助信息和示例

v4.0 (2026-04-08)

  • 新增命令别名功能: 支持快捷别名,如 ip进程网络系统
  • 配置文件系统: 支持 config.json 配置别名和默认值
  • 中文别名支持: 支持中文别名,提高中文用户友好性
  • 变量替换: 别名中支持 ${pingDefaultTarget} 等变量
  • 热加载配置: 配置文件修改后自动生效
  • 别名映射显示: 执行结果显示别名到实际命令的映射
  • 扩展预定义命令: 新增 ping 预定义命令(可配置默认目标)
  • 改进帮助系统: 显示所有别名和配置信息

Comments

Loading comments...