← 返回 Skills 市场
vic276344-dotcom

Automation Dedup Guard

作者 haha · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
52
总下载
1
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install automation-dedup-guard
功能描述
WorkBuddy 自动化任务去重守护。当用户的自动化任务出现重复时自动检测并清理。触发场景:自动化任务重复、任务列表膨胀、需要清理重复任务。支持 Windows/macOS/Linux,纯 Python 标准库,零依赖。
使用说明 (SKILL.md)

\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
安全使用建议
This skill appears to do exactly what it says: find duplicate WorkBuddy automation records and delete them from a local SQLite DB. Before using it: 1) Always run with --dry-run first and verify the listed duplicates. 2) Back up the automations.db file manually (the script warns that deletions are permanent and it does not create backups). 3) Make sure you point the script to the correct DB (use --db or set WORKBUDDY_DB_PATH) to avoid affecting the wrong data. 4) Note it deletes related automation_runs rows as well. 5) If you schedule it as a recurring automation, ensure the scheduled context has access to the correct DB path and that you are comfortable allowing regular automatic deletions. 6) If timestamps aren't ISO/consistent in your DB, review results carefully (the script sorts by created_at strings). If you want extra safety, copy the DB and test the script against the copy first.
功能分析
Type: OpenClaw Skill Name: automation-dedup-guard Version: 1.0.0 The skill is a utility designed to deduplicate tasks in a WorkBuddy application database. The core script, `scripts/automation_dedup_guard.py`, identifies duplicate entries in a SQLite database based on name and creation timestamp, retaining only the newest record. It uses standard Python libraries, provides a safety-oriented `--dry-run` mode, and targets specific application paths and tables. No indicators of data exfiltration, malicious execution, or harmful prompt injection were found.
能力评估
Purpose & Capability
Name/description describe deduplicating WorkBuddy automation records and the included script only touches a local SQLite database (automations and automation_runs). No unrelated binaries, services, or credentials are requested; the filesystem access is proportional to the task.
Instruction Scope
SKILL.md and the script instruct the agent/user to locate and open the WorkBuddy automations DB, run in dry-run mode or execute deletions, and optionally schedule the script as an automation. The instructions reference an optional WORKBUDDY_DB_PATH environment variable (supported by the script) even though the registry lists no required env vars. The skill also explicitly states there is no backup and deletions are permanent — this is scope-relevant and flagged to the user.
Install Mechanism
No install spec, no downloads, and only a small Python script using stdlib is included. There is no remote code fetch or archive extraction; risk from the install mechanism is low.
Credentials
The skill requires no secrets or credentials. It reads filesystem paths (default platform-specific DB locations) and optionally the WORKBUDDY_DB_PATH env var; these are reasonable for a DB-cleanup tool. Minor inconsistency: the registry lists no required env vars, but the script/README mention WORKBUDDY_DB_PATH as an optional override.
Persistence & Privilege
always is false and the skill does not request permanent platform-wide privileges or modify other skills. It runs ad hoc or on a schedule as the user configures; autonomous invocation is allowed by platform default but is not combined here with broad credential or persistence requirements.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install automation-dedup-guard
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /automation-dedup-guard 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- Initial release of automation-dedup-guard. - Detects and removes duplicate WorkBuddy automation tasks, keeping only the newest for each name group. - Cleans up associated automation run records for deleted tasks. - Supports dry-run (preview), custom database path, and verbose debug output. - Auto-detects WorkBuddy database location across Windows, macOS, and Linux. - Designed for Python 3.6+; uses only standard library (no external dependencies). - Suitable for manual or scheduled (recurring) cleanup to prevent automation task bloat.
元数据
Slug automation-dedup-guard
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Automation Dedup Guard 是什么?

WorkBuddy 自动化任务去重守护。当用户的自动化任务出现重复时自动检测并清理。触发场景:自动化任务重复、任务列表膨胀、需要清理重复任务。支持 Windows/macOS/Linux,纯 Python 标准库,零依赖。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 52 次。

如何安装 Automation Dedup Guard?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install automation-dedup-guard」即可一键安装,无需额外配置。

Automation Dedup Guard 是免费的吗?

是的,Automation Dedup Guard 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Automation Dedup Guard 支持哪些平台?

Automation Dedup Guard 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Automation Dedup Guard?

由 haha(@vic276344-dotcom)开发并维护,当前版本 v1.0.0。

💬 留言讨论