360 Secure SkillHub
360 安全技能中心

Desktop Sorter

核心功能:识别PDF、图片、压缩包、文档等格式的桌面文件,自动创建对应分类文件夹并移动文件,会跳过打开的文件及系统文件。典型场景:用户提出整理桌面需求时触发。输入为用户的整理指令,输出为已移动文件数量及对应目的地的报告。

kevinchai3868
kevinchai3868
热度 23.64
最近更新 2026-05-20 03:27:29
分类:自动化依赖:代码执行 / 读写文件应用场景:自动化脚本 / 工作流 / 任务管理

安装技能

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

执行命令安装此 skill: npx secure-skills-cli add desktop-sorter
Metadata
name
Desktop Organizer
description
Automatically organizes files on the desktop into folders based on their extensions (PDF, JPG, ZIP).

Desktop Organizer Skill

This skill allows the AI to automatically organize files on the user's desktop. It scans for specific file types and moves them into dedicated subdirectories.

Capabilities

  • Detects .pdf, .jpg, .jpeg, .png, .gif, .zip, .rar, .7z, .docx, .xlsx, and .pptx files on the desktop.
  • Creates destination folders (PDFs, Images, Archives, Documents, Presentations) if they do not exist.
  • Moves identified files into their respective folders.

Usage

When the user asks to organize their desktop, the AI should:

  1. Locate the desktop directory.
  2. Run the scripts/organize_desktop.py script.
  3. Report the number of files moved and their destinations.

Implementation Details

The core logic resides in scripts/organize_desktop.py. It uses the os and shutil modules to perform file operations safely.

Safety Precautions

  • Do not move files that are currently open or locked.
  • Avoid moving system files or shortcuts (.lnk, .ini).
  • Ensure destination folders are created before moving.