360 Secure SkillHub
360 安全技能中心

File Cleaner

该技能是一个 Node 脚本,通过命令行传入路径,仅允许删除以 temp/、logs/ 或 cache/ 开头的文件与目录,并阻止删除工作区根目录、skills/ 等受保护路径。它用于清理临时文件、缓存和日志以释放空间,被标记为具有破坏性操作,材料未说明删除前预览、回收站或恢复机制。

autogame-17
autogame-17
热度 31.17
最近更新 2026-05-20 03:35:36
分类:自动化依赖:代码执行 / 读写文件应用场景:自动化脚本 / 工作流

安装技能

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

执行命令安装此 skill: npx secure-skills-cli add file-cleaner
Metadata
name
file-cleaner
description
A specialized skill for safely cleaning up temporary files and directories. Use this when you need to remove temp files, clear caches, or delete logs to free up space or maintain hygiene. Restricted to 'temp/', 'logs/', and 'cache/' directories for safety.

File Cleaner

Safely removes files and directories. Built with strict safety checks to prevent accidental deletion of critical workspace files.

Usage

node skills/file-cleaner/index.js <path>

Examples

Clean a specific temp directory:

node skills/file-cleaner/index.js temp/my-experiment

Clean a log file:

node skills/file-cleaner/index.js logs/debug.log

Safety

  • ONLY deletes paths starting with temp/, logs/, or cache/.
  • Will block attempts to delete workspace root, skills/, or other protected paths.