Automation Dedup Guard

v1.0.0

WorkBuddy 自动化任务去重守护。当用户的自动化任务出现重复时自动检测并清理。触发场景:自动化任务重复、任务列表膨胀、需要清理重复任务。支持 Windows/macOS/Linux,纯 Python 标准库,零依赖。

1· 40·0 current·0 all-time

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for vic276344-dotcom/automation-dedup-guard.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "Automation Dedup Guard" (vic276344-dotcom/automation-dedup-guard) from ClawHub.
Skill page: https://clawhub.ai/vic276344-dotcom/automation-dedup-guard
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install automation-dedup-guard

ClawHub CLI

Package manager switcher

npx clawhub@latest install automation-dedup-guard
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
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.
Assessment
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.

Like a lobster shell, security has layers — review code before you run it.

automationvk971b08434wn6jdzq9s1j6eyjx85qbb5cleanupvk971b08434wn6jdzq9s1j6eyjx85qbb5dedupvk971b08434wn6jdzq9s1j6eyjx85qbb5latestvk971b08434wn6jdzq9s1j6eyjx85qbb5utilityvk971b08434wn6jdzq9s1j6eyjx85qbb5workbuddyvk971b08434wn6jdzq9s1j6eyjx85qbb5
40downloads
1stars
1versions
Updated 6h ago
v1.0.0
MIT-0

Automation Dedup Guard

Overview

WorkBuddy 的自动化任务系统没有防重机制,每次新会话创建同名任务时不会检查是否已存在,导致同名任务不断累积。本 Skill 提供一个一键去重脚本,自动检测并清理重复的自动化任务,每组同名任务只保留最新创建的版本。

When to Use

  • 用户反馈自动化任务"重复出现"、"越来越多"、"一堆重复的"
  • 需要检查或清理 WorkBuddy 自动化数据库中的冗余任务
  • 想要配置定期自动去重守护

Core Script

scripts/automation_dedup_guard.py is the main executable.

Usage

# Safe preview (dry-run, no deletions)
python scripts/automation_dedup_guard.py --dry-run

# Execute cleanup
python scripts/automation_dedup_guard.py

# Specify custom database path
python scripts/automation_dedup_guard.py --db /custom/path/automations.db

# Verbose mode for debugging
python scripts/automation_dedup_guard.py --dry-run -v

Exit Codes

  • 0 — No duplicates found, all clean
  • 1 — Duplicates detected (after cleanup, still returns 1 if any were found)

Database Auto-Detection

The script automatically locates the WorkBuddy automations database:

PrioritySourceNotes
1--db CLI argumentManual override
2WORKBUDDY_DB_PATH env varFor advanced users
3OS default pathAuto-detected

Default paths by OS:

  • Windows: %APPDATA%\WorkBuddy\automations\automations.db
  • macOS: ~/Library/Application Support/WorkBuddy/automations\automations.db
  • Linux: ~/.config/WorkBuddy\automations\automations.db

Dedup Strategy

  1. Group by name: Tasks with the same name field are considered duplicates
  2. Keep newest: Within each group, the task with the latest created_at is preserved
  3. Cascade delete: Associated automation_runs records are also cleaned up
  4. No backup: Deletions are permanent (back up the DB file manually if needed)

Setup as Recurring Automation

To run automatically, register it as a WorkBuddy automation:

  • Name: Automation Dedup Guard
  • Schedule: Weekly (e.g., FREQ=WEEKLY;BYDAY=MO;BYHOUR=8;BYMINUTE=55)
  • Prompt:
    Run the dedup guard script: python [path-to]/scripts/automation_dedup_guard.py
    If output contains "[OK]" — no action needed.
    If output contains "[!]" — duplicates were auto-cleaned, confirm the count.
    If script errors — log the error, no other action.
    

Requirements

  • Python 3.6+
  • No third-party dependencies (stdlib only: sqlite3, sys, os, datetime, collections)

Comments

Loading comments...