Install
openclaw skills install universal-file-ops通用文件操作技能:支持常用文件(txt/py/html/md/docx/xlsx)增删查改,以及文件拷贝、移动、删除、重命名。含标准化 IO 接口、统一调度器、容灾回溯机制。
openclaw skills install universal-file-ops通用文件操作技能:支持常用文件增删查改与文件管理操作,标准化 IO 接口,统一调度,鲁棒可回溯。
当用户提出以下意图时触发本技能:
否定条件(以下情况不触发):
📚 渐进式加载:本技能采用渐进式 MD 体系,
SKILL.md为入口(≤230行),详细内容拆分到references/*.md按需加载。
| # | 功能 | 说明 |
|---|---|---|
| 1 | 文件 CRUD | 支持 txt/py/html/md/docx/xlsx 增删查改,标准化 JSON IO 接口 |
| 2 | 文件管理操作 | 拷贝、移动、重命名、删除,支持单文件与批量 |
| 3 | 统一调度器 | scripts/orchestrator.py 支持串行/并行多任务编排 |
| 4 | 容灾回溯 | 操作前自动备份、支持回滚、操作日志审计 |
| 5 | 鲁棒性设计 | 重复执行稳定、异常自动恢复、幂等性保证 |
# 查看所有可用操作
python scripts/orchestrator.py --list
# 读取文件内容
python scripts/text_crud.py --action read --file path/to/file.txt
# 写入文件内容(自动备份原文件)
python scripts/text_crud.py --action create --file path/to/file.txt --content "Hello"
# 拷贝文件(支持批量)
python scripts/file_ops.py --action copy --src path/to/src --dst path/to/dst
# 多操作串行执行(通过 orchestrator)
python scripts/orchestrator.py --batch batch_config.json
# batch_config.json 格式示例:
# {
# "tasks": [
# {"op": "text_crud", "args": {"action": "create", "file": "a.txt", "content": "Hello"}},
# {"op": "file_ops", "args": {"action": "copy", "src": "a.txt", "dst": "b.txt"}}
# ],
# "parallel": false,
# "stop_on_error": true
# }
→ 完整 API 参考详见 references/guide.md
skills/.standardization/universal-file-ops/data/backup/scripts/*.py,标准化 JSON IOskills/.standardization/universal-file-ops/data/logs/ops.log,支持审计回溯异常处理:任何步骤失败 → 自动回滚(如已备份)→ 返回标准化错误 JSON
→ 详细工作流程详见 references/guide.md
→ 更多反模式详见 references/antipatterns.md
→ 更多常见问题详见 references/faq.md
本技能权限权重:MEDIUM
skills/.standardization/universal-file-ops/data/backup/→ 详细权限说明详见 references/permissions.md