← Back to Skills Marketplace
vic276344-dotcom

Automation Dedup Guard

by haha · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
52
Downloads
1
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install automation-dedup-guard
Description
WorkBuddy 自动化任务去重守护。当用户的自动化任务出现重复时自动检测并清理。触发场景:自动化任务重复、任务列表膨胀、需要清理重复任务。支持 Windows/macOS/Linux,纯 Python 标准库,零依赖。
README (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
Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install automation-dedup-guard
  3. After installation, invoke the skill by name or use /automation-dedup-guard
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
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.
Metadata
Slug automation-dedup-guard
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

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.

💬 Comments