AgentSkillsCN

check-dupes

在向任务数据库中插入新任务之前,先检查SQLite数据库中是否存在重复任务。在对任务数据库进行任何INSERT操作前使用此功能。

SKILL.md
--- frontmatter
name: check-dupes
description: Check for duplicate tasks in the SQLite database before creating new tasks. Use before any INSERT into the task database.
allowed-tools: Bash

Check Duplicates Skill

Canonical deduplication gate for tusk. Run this before inserting any task to avoid creating redundant work.

Usage

code
/check-dupes check "<summary>" [--domain <domain>] [--threshold <float>] [--json]
/check-dupes scan [--domain <domain>] [--status <status>] [--threshold <float>] [--json]
/check-dupes similar <id> [--domain <domain>] [--threshold <float>] [--json]

Commands

check "<summary>"

Pre-insert gate. Checks if a summary is a duplicate of any open task.

bash
tusk dupes check "<summary>" --domain <domain>

When to use: Before every INSERT INTO tasks — in /next-task, /analysis-to-tasks, or any manual task creation.

scan

Find all duplicate pairs among open tasks.

bash
tusk dupes scan --status "To Do"

When to use: During /groom-backlog to surface duplicates for cleanup.

similar <id>

Find tasks related to a given task ID (uses a lower threshold of 0.6).

bash
tusk dupes similar <id>

When to use: Exploratory — when investigating whether a task overlaps with other work.

Interpreting Results

Exit Codes

CodeMeaning
0No duplicates found — safe to create
1Duplicates found — skip or review
2Error (task not found, DB error)

Thresholds

ScoreInterpretationAction
>= 0.82DuplicateSkip the INSERT
0.60 - 0.82Partial overlapPresent to user for decision
< 0.60NewSafe to create

JSON Output

Use --json for programmatic consumption:

json
{
  "duplicates": [
    {"id": 42, "summary": "...", "domain": "Backend", "similarity": 0.95}
  ]
}

Integration Points

This skill is referenced by:

  • /next-task — Before creating deferred tasks
  • /groom-backlog — Scanning for duplicate pairs