spec-kit icon indicating copy to clipboard operation
spec-kit copied to clipboard

[Bug]: /speckit-taskstoissues creates duplicate GitHub issues when issues already exist

Open yucer opened this issue 5 months ago • 0 comments

Describe the bug

/speckit-taskstoissues does not check for existing GitHub issues before creating new ones. If the command is run a second time (e.g. after re-generating tasks.md, or accidentally re-invoking the skill), it creates duplicate issues for every task without warning.

Steps to reproduce

  1. Run /speckit-taskstoissues on a project — issues are created for all tasks (e.g. T001–T027).
  2. Run /speckit-taskstoissues again on the same project without any changes.
  3. Observe that a second set of identical issues is created.

Expected behavior

Before creating an issue, the skill should search for an existing open (or closed) issue whose title contains the task ID (e.g. T001, [T001]). If a match is found, skip creation and optionally log "Issue for T001 already exists (#NNN) — skipping."

Actual behavior

A duplicate issue is created for every task, with no warning or deduplication check. The user must manually close/delete the duplicates.

Suggested fix

Add a deduplication step before the issue-creation loop:

gh issue list --repo <owner>/<repo> --limit 500 --state all

Parse the result to extract task IDs already present in issue titles (matching patterns like T001, [T001], T001:). Skip gh issue create for any task whose ID is already found.

Environment

  • spec-kit version: 0.8.14.dev0
  • Skill: speckit-taskstoissues
  • Host: Claude Code (claude-sonnet-4-6)

yucer avatar Jun 13 '26 17:06 yucer