360 Secure SkillHub
360 安全技能中心

OS Activity

通过 osquery 与 Python 脚本读取本机系统活动,包括最近编辑文件、最近访问目录、已安装程序和运行中的进程,并以 Markdown 表格输出,供 OpenClaw 了解用户使用习惯以给出更个性化建议。不同操作系统支持范围不同,Linux 仅支持查询运行进程。

xiaobao520123
xiaobao520123
热度 62.23
最近更新 2026-05-17 12:33:02
分类:自动化依赖:代码执行 / 读写文件应用场景:自动化脚本 / 工作流 / 数据处理

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add os-activity
Metadata
name
os-activity
description
Personalize your openclaw by learning your operating system activity.
metadata
{"openclaw":{"requires":{"bins":["python"]}}}

OS Activity - Personalize your OpenClaw by learning how you use your computer.

By leveraging osquery tool, add additional information telling OpenClaw about your activity on the computer, such as recent edited files, program running, etc. OpenClaw can then use this information to provide more personalized and relevant suggestions.

Installation

If you have not installed osquery, please run the following command to install it:

python ~/.openclaw/workspace/skills/os-activity/scripts/install_osquery.py

Quick Usage

Find recently edited files:

python ~/.openclaw/workspace/skills/os-activity/scripts/recent_files.py

Example Output

Filename|Path|Last Edited Time
memory|C:\Users\steve\.openclaw\workspace\memory|2026-02-22 17:30:43
os-activity|C:\Users\steve\.openclaw\workspace\os-activity|2026-02-22 17:29:10
openclaw.json|C:\Users\steve\.openclaw\openclaw.json|2026-02-22 17:10:05

More commands

1. Find recently edited files

macOS

python ~/.openclaw/workspace/skills/os-activity/scripts/recent_files.py

Windows

python $Env:USERPROFILE\.openclaw\workspace\skills\os-activity\scripts\recent_files.py

Linux

  • Not supported

2. Find recently accessed directories

macOS

  • Not supported

Windows

python $Env:USERPROFILE\.openclaw\workspace\skills\os-activity\scripts\recent_dirs.py

Linux

  • Not supported

3. Find installed programs

macOS

python ~/.openclaw/workspace/skills/os-activity/scripts/programs.py

Windows

python $Env:USERPROFILE\.openclaw\workspace\skills\os-activity\scripts\programs.py

Linux

  • Not supported

4. Find running programs

macOS

python ~/.openclaw/workspace/skills/os-activity/scripts/processes.py

Windows

python $Env:USERPROFILE\.openclaw\workspace\skills\os-activity\scripts\processes.py

Linux

python ~/.openclaw/workspace/skills/os-activity/scripts/processes.py