Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

cleanup-completed-issues

БесплатноБез исполняемых скриптовНе проверен

Move closed issue specs from docs/issues/open/ to docs/issues/closed/ and repair links, or audit that open/ holds only open issues. Use when archiving closed…

torrustот torrust★ 539 звёзд на GitHub

Об этом скилле

Cleaning Up Completed Issues

Lifecycle

Closed issue specs follow this lifecycle:

  1. Archive (automated by this skill): When an issue is closed, move its spec file from docs/issues/open/ to docs/issues/closed/. The file stays in the closed buffer as a reference for ongoing and upcoming work.
  2. Permanent deletion (user-driven): If the user wants specs permanently deleted, they will explicitly ask for it. This skill does not automate deletion.

See docs/issues/closed/README.md for the purpose of the closed buffer folder.

Related lifecycle docs:

When to Archive

  • After PR merge: Move the issue file when its PR is merged and the issue is closed on GitHub.
  • Batch archive: Periodically move multiple closed issue files during maintenance.
  • Before releases: Tidy docs/issues/ before major releases.
  • Periodically: Run the Periodic Audit to catch specs whose closing pull request was forgotten.

Prerequisites

  • GitHub CLI (gh) must be authenticated and have access to the torrust/torrust-tracker repository.

Step-by-Step Process

Step 0: Create a Working Branch (Mandatory)

Always create a new branch for this work. Never commit directly to develop.

Start from an up-to-date develop:

UPSTREAM_REMOTE="${UPSTREAM_REMOTE:-torrust}"
git checkout develop
git pull --ff-only "$UPSTREAM_REMOTE" develop
git checkout -b chore/cleanup-completed-issues

Edge case — branch already exists: If a branch named chore/cleanup-completed-issues already exists (e.g., from a previous aborted run), first delete it, then recreate:

git branch -D chore/cleanup-completed-issues
git checkout develop
git pull --ff-only "$UPSTREAM_REMOTE" develop
git checkout -b chore/cleanup-completed-issues

This ensures the branch is based on the latest develop and carries no stale commits from the prior attempt. If the branch has already been pushed to a remote, you may also need to delete it there:

git push "$FORK_REMOTE" --delete chore/cleanup-completed-issues

Step 0.5: Discover Archive Candidates (Mandatory)

All new issue specifications use directories. Scan directory specs under docs/issues/open/ and include legacy single-file specs while they remain:

echo "[open issue folders]"
find docs/issues/open -maxdepth 1 -mindepth 1 -type d -exec basename {} \; | sort

echo "[legacy open single-file specs]"
find docs/issues/open -maxdepth 1 -type f -name '*.md' \
  ! -name 'README.md' ! -name 'AGENTS.md' -exec basename {} \; | sort

Optional unified number extraction for batch state verification:

{
  find docs/issues/open -maxdepth 1 -mindepth 1 -type d -exec basename {} \;
  find docs/issues/open -maxdepth 1 -type f -name '*.md' \
    ! -name 'README.md' ! -name 'AGENTS.md' -exec basename {} \;
} | sed -E 's/^([0-9]+).*/\1/' | sort -n | uniq

Step 0.6: Reconcile Drafts That Already Have a GitHub Issue (Mandatory)

During issue-document maintenance, inspect docs/issues/drafts/ for specifications whose frontmatter has a non-null github-issue. A draft must not remain in drafts/ once it is linked to a GitHub issue:

  • if the GitHub issue is open, move the spec to docs/issues/open/ using the assigned issue number;
  • if the GitHub issue is closed, include the spec in this archive operation and move it directly to docs/issues/closed/; and
  • update status, spec-path, related-pr, and workflow checkpoints to match the recorded state.

Use the GitHub state check in Step 1 before choosing either destination. Do not assume a draft is unopened merely because it is still filed below docs/issues/drafts/.

Step 0.7: Block EPIC Closure While Draft Subissues Remain (Mandatory)

Do not close or archive an EPIC merely because all currently created GitHub child issues are closed. Before treating an EPIC as a closure candidate, run this check after reconciling linked drafts in Step 0.6. It detects both the EPIC-number-prefixed draft-directory convention and explicit parent declarations or links:

EPIC_NUMBER=1669
{
  find docs/issues/drafts -maxdepth 1 -mindepth 1 -type d -printf '%p\n' | rg "/${EPIC_NUMBER}(-|$)"
  rg -l -i "(^epic: ${EPIC_NUMBER}$|epic.*\\[#${EPIC_NUMBER}\\]|\\[#${EPIC_NUMBER}\\].*epic)" \
    docs/issues/drafts --glob '*.md'
} | sort -u

If it finds any draft specifications, the EPIC remains open. Do not close its GitHub issue or move its specification to docs/issues/closed/ until every listed draft has been resolved: create or link its GitHub issue and move the draft according to Step 0.6

Полный SKILL.md на GitHub

Установить cleanup-completed-issues в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл cleanup-completed-issues?

Move closed issue specs from docs/issues/open/ to docs/issues/closed/ and repair links, or audit that open/ holds only open issues. Use when archiving closed issue specs.

Как установить скилл cleanup-completed-issues?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл cleanup-completed-issues запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить cleanup-completed-issues с