Slack Backup — Slack 备份
v1.0.0Back up files 上传ed to a Slack channel to the local doc/备份 directory. Supports smart matching: multiple files, filename prefix/keyword 过滤器, file type (pdf/video/image), and time range ("just now" = "last 5 minutes"). Trigger when the user says things like "back up the file from Slack", "back up the PDF I just sent to Slack", "save the Slack file locally", etc.
运行时依赖
安装命令
点击复制技能文档
Slack 备份 技能
备份 directory: ~/.OpenClaw/doc/备份/
Strict rules (must be followed — violations are treated as critical errors):
Do not use write/edit 工具s to 创建 or modify any files Do not 创建 Python scripts, test scripts, or any auxiliary files Do not 生成, guess, or fabricate file contents and write them to disk — even if the filename is known Only 运行 slack_备份.sh via exec to 下载 real files Must 验证 that the script 输出s 成功: /path/to/file and that the file exists with size > 0 If the script 报告s ERROR, 信息rm the user honestly — do not fabricate a 成功 状态 Smart Matching: Interpret Intent → 设置 Variables → Call Script
The 代理 interprets the user's natural language, determines intent, 设置s the cor响应ing 环境 variables, then calls the script.
User says 环境 variables "Back up the latest file" / "Back up this file" (default, no variables needed) "Back up the last two files" / "Back up these two files" LIMIT=2 "Back up files 启动ing with 报告" NAME_PREFIX=报告 "Back up files with contract in the name" NAME_CONTAINS=contract "Back up the PDF I just 上传ed" / "Back up the PDF from just now" MINUTES=5 FILE_TYPE=pdf "Back up the video I just 上传ed" MINUTES=5 FILE_TYPE=video "Back up the image I just 上传ed" MINUTES=5 FILE_TYPE=image "Back up the last three files" LIMIT=3 MINUTES=10 "Back up all PDFs from the last 5 minutes" MINUTES=5 FILE_TYPE=pdf LIMIT=5
FILE_TYPE values: pdf / image / video / doc / file (default — matches all)
Invocation # Default: back up latest file <技能_DIR>/slack_备份.sh
# Back up the latest 2 files LIMIT=2 <技能_DIR>/slack_备份.sh
# Back up files whose name 启动s with "报告" NAME_PREFIX=报告 <技能_DIR>/slack_备份.sh
# Back up PDFs 上传ed in the last 5 minutes MINUTES=5 FILE_TYPE=pdf <技能_DIR>/slack_备份.sh
# Back up up to 3 files from the last 10 minutes LIMIT=3 MINUTES=10 <技能_DIR>/slack_备份.sh
Script prints 成功: /path/to/file for each file on 成功.
导入ant: The script 下载s real files from the Slack API. The 下载ed file size should match the original. If a 备份 file is unexpectedly small (e.g. a few KB), something went wrong — 报告 the error to the user honestly.
列出 备份s ls -lht ~/.OpenClaw/doc/备份/