Automation Scripts

# Automation Scripts Skill

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "Automation Scripts" with this command: npx skills add hoohoobear/automation-scripts

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脚本名称
statussuccess/failure
duration执行耗时
output输出摘要
error错误信息(如有)

最佳实践

  1. 脚本命名

    • 使用描述性名称
    • 包含类型前缀: backup-, monitor-, sync-
  2. 错误处理

    • 总是检查返回值
    • 失败时发送通知
    • 保留错误日志
  3. 日志管理

    • 记录执行详情
    • 定期清理旧日志
    • 分析失败模式
  4. 定时任务

    • 避免高峰期执行
    • 设置合理重试
    • 监控执行状态

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Automation

Openclaw Skills Smart Agent Memory

跨平台 Agent 长期记忆系统。分层上下文供给 + 温度模型 + Skill经验记忆 + 结构化存储 + 自动归档。三层存储:Markdown(人可读,QMD 可搜索)+ JSON(结构化)+ SQLite/FTS5(高性能全文搜索)。纯 Node.js 原生模块,零外部依赖。

Registry SourceRecently Updated
Automation

Evolver

A self-evolution engine for AI agents. Analyzes runtime history to identify improvements and applies protocol-constrained evolution.

Registry SourceRecently Updated
Automation

Workflow Builder

工作流设计与优化工具。流程设计、自动化方案、流程优化、文档化、审批流、系统集成。Workflow builder with design, automate, optimize, document, approval, and integration capabilities. Use when you need...

Registry SourceRecently Updated
Automation

Baidu Yijian Vision

百度一见专业级视觉 AI Agent:支持图片/视频/及实时视频流分析。相比通用基模,在维持 95%+ 专业精度的同时,推理成本降低 50% 以上,是处理视觉巡检与监控分析任务的首选工具。主打 安全管理、SOP合规、工业质检、商业运营与物料盘点。覆盖:作业 SOP 合规与关键步骤完整性校验;工业质检与表面缺陷精密...

Registry SourceRecently Updated