← 返回 Skills 市场
Automation Scripts
作者
hoohoobear
· GitHub ↗
· v1.0.0
· MIT-0
341
总下载
0
收藏
4
当前安装
1
版本数
在 OpenClaw 中安装
/install automation-scripts
功能描述
Manage automation scripts with creation, scheduling, logging, failure retries, and status notifications for monitoring, backup, sync, reports, and more.
使用说明 (SKILL.md)
Automation Scripts Skill
自动化脚本管理 - 创建、执行、维护自动化任务
功能
- 脚本模板库
- 定时任务管理
- 执行日志记录
- 失败自动重试
- 状态通知
脚本分类
| 类别 | 说明 | 示例 |
|---|---|---|
| 监控 | 系统监控 | 健康检查、磁盘监控 |
| 备份 | 数据备份 | 配置备份、日志清理 |
| 同步 | 数据同步 | Git自动提交、文件同步 |
| 报告 | 报告生成 | 日报、周报、月报 |
| 研究 | 自动化研究 | GitHub项目分析 |
使用方法
# 列出可用脚本
skill:automation-scripts --list
# 创建新脚本
skill:automation-scripts --create --name "my-script" --type "monitor"
# 执行脚本
skill:automation-scripts --run "script-name"
# 查看执行日志
skill:automation-scripts --log "script-name"
# 定时执行
skill:automation-scripts --schedule "script-name" --cron "0 6 * * *"
# 禁用脚本
skill:automation-scripts --disable "script-name"
# 启用脚本
skill:automation-scripts --enable "script-name"
内置脚本模板
1. 健康检查脚本
#!/bin/bash
# OpenClaw 健康检查
# 位置: ~/scripts/openclaw-health-check.sh
# 检查项目
- 服务状态 (Gateway进程)
- 配置文件语法
- 磁盘空间
- 内存使用
- 日志错误
# 输出格式
✓ 检查通过
✗ 检查失败 (显示原因)
2. 自动备份脚本
#!/bin/bash
# 配置自动备份
# 位置: ~/scripts/backup-openclaw-config.sh
# 功能
- 每日自动备份配置
- 保留30天历史
- 清理旧备份
# 配置
BACKUP_DIR="~/.openclaw/backups"
RETENTION_DAYS=30
3. Git 自动同步脚本
#!/bin/bash
# Git 自动同步
# 位置: ~/scripts/auto-git-sync.sh
# 功能
- 检查文件变更
- 自动 add + commit
- 自动 push
- 记录同步日志
4. 定时报告脚本
#!/bin/bash
# 定时报告生成
# 位置: ~/scripts/daily-report.sh
# 功能
- 生成日报
- 发送到指定位置
- 记录发送状态
5. OpenCode 集成脚本
#!/bin/bash
# OpenCode 自动修复
# 位置: ~/scripts/opencode-auto-fix.sh
# 功能
- 检测服务故障
- 调用 OpenCode 诊断
- 自动修复
- 验证结果
脚本结构
scripts/
├── templates/ # 脚本模板
│ ├── monitor.sh
│ ├── backup.sh
│ ├── sync.sh
│ └── report.sh
├── custom/ # 自定义脚本
├── logs/ # 执行日志
└── config.conf # 全局配置
配置示例
{
"automation": {
"enabled": true,
"logRetentionDays": 30,
"maxRetries": 3,
"retryDelay": 60,
"notifications": {
"onFailure": true,
"onSuccess": false
}
}
}
执行日志
| 字段 | 说明 |
|---|---|
| timestamp | 执行时间 |
| script | 脚本名称 |
| status | success/failure |
| duration | 执行耗时 |
| output | 输出摘要 |
| error | 错误信息(如有) |
最佳实践
-
脚本命名
- 使用描述性名称
- 包含类型前缀:
backup-,monitor-,sync-
-
错误处理
- 总是检查返回值
- 失败时发送通知
- 保留错误日志
-
日志管理
- 记录执行详情
- 定期清理旧日志
- 分析失败模式
-
定时任务
- 避免高峰期执行
- 设置合理重试
- 监控执行状态
安全使用建议
Do not install or enable this skill without further details. Ask the publisher for: (1) the actual CLI/binary or installation steps referenced by 'skill:automation-scripts', (2) exact destinations for notifications and any external services (OpenCode) it will call, (3) what credentials (git, SSH, service tokens) are required and why, and (4) sample concrete scripts to review. If you must try it, run in an isolated/sandboxed environment, review every generated script and cron job before enabling, avoid supplying broad credentials, and verify backups are stored encrypted and not sent to unknown endpoints.
功能分析
Type: OpenClaw Skill
Name: automation-scripts
Version: 1.0.0
The skill bundle provides a framework for an AI agent to manage and schedule automation tasks, such as system health checks, configuration backups, and Git synchronization. The instructions in SKILL.md and the metadata in _meta.json are consistent with legitimate administrative automation and contain no evidence of malicious intent, data exfiltration, or prompt injection attacks.
能力评估
Purpose & Capability
The SKILL.md describes creating/scheduling/logging automation scripts which is consistent with the name. However it repeatedly references a CLI command 'skill:automation-scripts' (no binary or install is declared) and platform-specific items like ~/.openclaw, 'Gateway进程', and 'OpenCode' integration. Those platform-specific accesses are not declared or justified in the metadata and make the declared purpose only partially coherent.
Instruction Scope
The instructions tell the agent/user to create and run shell scripts that check services, read configs, perform backups, run git auto-pushes, and call 'OpenCode' diagnostics. They also use vague placeholders like '发送到指定位置' without specifying destinations. This grants broad discretion and implies access to local system state and external endpoints beyond what is documented.
Install Mechanism
There is no install spec (instruction-only), which is lower risk. However, the README assumes a 'skill:automation-scripts' CLI exists; the absence of any declared binary or install steps is an incoherence — the skill as described cannot be invoked as shown unless extra software is present.
Credentials
No environment variables or credentials are requested, yet the instructions imply needing access to: user home files (~/.openclaw), service status (may require elevated rights), git remotes (would require credentials), and external services (OpenCode, notification endpoints). The absence of declared credentials is disproportionate to the operations the scripts describe.
Persistence & Privilege
The skill does not request 'always: true' and is user-invocable, which is appropriate. It does recommend creating scheduled jobs (cron) and writing files under ~/scripts and config locations; that is persistent activity but limited to the skill's own artifacts. Still, scheduling tasks that run arbitrary scripts increases risk if the scripts are later modified or sourced from untrusted places.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install automation-scripts - 安装完成后,直接呼叫该 Skill 的名称或使用
/automation-scripts触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of Automation Scripts Skill:
- 提供自动化脚本模板库,包含监控、备份、同步、报告、自动化研究等分类。
- 支持定时任务管理、执行日志记录、失败自动重试、状态通知等功能。
- 内置多种常用 Bash 脚本模板,如健康检查、自动备份、Git 自动同步、定时报表与自动故障修复。
- 提供脚本管理命令,包括创建、执行、调度、启用/禁用及日志查询。
- 结构化执行日志与灵活配置选项,支持最佳实践指引。
元数据
常见问题
Automation Scripts 是什么?
Manage automation scripts with creation, scheduling, logging, failure retries, and status notifications for monitoring, backup, sync, reports, and more. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 341 次。
如何安装 Automation Scripts?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install automation-scripts」即可一键安装,无需额外配置。
Automation Scripts 是免费的吗?
是的,Automation Scripts 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Automation Scripts 支持哪些平台?
Automation Scripts 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Automation Scripts?
由 hoohoobear(@hoohoobear)开发并维护,当前版本 v1.0.0。
推荐 Skills