/install automation-dedup-guard
\r \r
Automation Dedup Guard\r
\r
Overview\r
\r WorkBuddy 的自动化任务系统没有防重机制,每次新会话创建同名任务时不会检查是否已存在,导致同名任务不断累积。本 Skill 提供一个一键去重脚本,自动检测并清理重复的自动化任务,每组同名任务只保留最新创建的版本。\r \r
When to Use\r
\r
- 用户反馈自动化任务"重复出现"、"越来越多"、"一堆重复的"\r
- 需要检查或清理 WorkBuddy 自动化数据库中的冗余任务\r
- 想要配置定期自动去重守护\r \r
Core Script\r
\r
scripts/automation_dedup_guard.py is the main executable.\r
\r
Usage\r
\r
# Safe preview (dry-run, no deletions)\r
python scripts/automation_dedup_guard.py --dry-run\r
\r
# Execute cleanup\r
python scripts/automation_dedup_guard.py\r
\r
# Specify custom database path\r
python scripts/automation_dedup_guard.py --db /custom/path/automations.db\r
\r
# Verbose mode for debugging\r
python scripts/automation_dedup_guard.py --dry-run -v\r
```\r
\r
### Exit Codes\r
\r
- `0` — No duplicates found, all clean\r
- `1` — Duplicates detected (after cleanup, still returns 1 if any were found)\r
\r
### Database Auto-Detection\r
\r
The script automatically locates the WorkBuddy automations database:\r
\r
| Priority | Source | Notes |\r
|----------|--------|-------|\r
| 1 | `--db` CLI argument | Manual override |\r
| 2 | `WORKBUDDY_DB_PATH` env var | For advanced users |\r
| 3 | OS default path | Auto-detected |\r
\r
Default paths by OS:\r
- **Windows**: `%APPDATA%\WorkBuddy\automations\automations.db`\r
- **macOS**: `~/Library/Application Support/WorkBuddy/automations\automations.db`\r
- **Linux**: `~/.config/WorkBuddy\automations\automations.db`\r
\r
### Dedup Strategy\r
\r
1. **Group by name**: Tasks with the same `name` field are considered duplicates\r
2. **Keep newest**: Within each group, the task with the latest `created_at` is preserved\r
3. **Cascade delete**: Associated `automation_runs` records are also cleaned up\r
4. **No backup**: Deletions are permanent (back up the DB file manually if needed)\r
\r
## Setup as Recurring Automation\r
\r
To run automatically, register it as a WorkBuddy automation:\r
\r
- **Name**: Automation Dedup Guard\r
- **Schedule**: Weekly (e.g., `FREQ=WEEKLY;BYDAY=MO;BYHOUR=8;BYMINUTE=55`)\r
- **Prompt**:\r
```\r
Run the dedup guard script: python [path-to]/scripts/automation_dedup_guard.py\r
If output contains "[OK]" — no action needed.\r
If output contains "[!]" — duplicates were auto-cleaned, confirm the count.\r
If script errors — log the error, no other action.\r
```\r
\r
## Requirements\r
\r
- Python 3.6+\r
- No third-party dependencies (stdlib only: `sqlite3`, `sys`, `os`, `datetime`, `collections`)\r
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install automation-dedup-guard - After installation, invoke the skill by name or use
/automation-dedup-guard - Provide required inputs per the skill's parameter spec and get structured output
What is Automation Dedup Guard?
WorkBuddy 自动化任务去重守护。当用户的自动化任务出现重复时自动检测并清理。触发场景:自动化任务重复、任务列表膨胀、需要清理重复任务。支持 Windows/macOS/Linux,纯 Python 标准库,零依赖。 It is an AI Agent Skill for Claude Code / OpenClaw, with 52 downloads so far.
How do I install Automation Dedup Guard?
Run "/install automation-dedup-guard" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Automation Dedup Guard free?
Yes, Automation Dedup Guard is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Automation Dedup Guard support?
Automation Dedup Guard is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Automation Dedup Guard?
It is built and maintained by haha (@vic276344-dotcom); the current version is v1.0.0.