本文へ移動
cccskills
無料GitHub で公開

finish-worktree

After an issue's PR has squash-merged on GitHub and its issue has closed: fast-forward the default branch, remove the issue-numbered nested worktree (.worktrees/<issue#>), and delete the local feature branch. Use when the user says to finish, tear down, or clean up a lane or worktree for a merged issue.

インストール方法を見る

含まれるファイル(2)

  • SKILL.md2.3 KB
  • finish-worktree.sh5.3 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Finish-Worktree

Teardown counterpart to /move-to-worktree. Run it in the primary checkout, on the default branch, after you squash-and-merge the issue's PR on github.com. The script uses GitHub's PR and issue state as the authoritative merge guard; remote branch deletion is an additional safety check, not proof of merge by itself.

Run (1 bash call)

bash {base_directory}/finish-worktree.sh <issue-number>

The script:

  1. Hard-stops unless run in the clean primary checkout on the default branch.
  2. Finds exactly one local branch {type}/<issue#>/{slug} and its matching worktree.
  3. Uses gh to verify a PR for that exact head branch is merged, its recorded head commit matches the local branch tip, and issue <issue#> is closed. It also requires the remote feature branch to be gone.
  4. git pull --ff-only on the default branch (brings the squashed work in) + git fetch --prune (clears the stale tracking ref).
  5. git worktree remove .worktrees/<issue#> — never --force: if the worktree has uncommitted work it prints the leftovers and stops.
  6. git branch -D <branch> — capital -D is deliberate: squash-merge means git can't prove the branch merged, so -d always refuses; step 3 already verified the work landed.

Non-zero exit → hard-stop, print stderr verbatim.

Report

What was removed (worktree path, branch), then the standing post-merge hygiene reminder: run /archive-issue <issue#> promptly to retire the issue's specs/ artifacts to the wiki. After any merge, in-flight lanes should sync with the default branch only when they need the merged work; for an already pushed/shared lane, merge the default branch rather than rewriting its history.

You Must NOT

  • Use git worktree remove --force or otherwise discard uncommitted work — surface it and stop.
  • Delete the branch when any merge guard fails.
  • Archive the issue yourself unless asked — remind, don't perform.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Retire a closed issue's working artifacts out of specs/ into the GitHub wiki. Use only when the user asks to archive a finished issue, empty out specs/ for a done task, or move an issue's requirements/architecture/tasks/review/QA docs to the wiki.

日本語の概要は準備中です。原文の説明を表示しています。

foyzulkarim/skills432026年9月4日 更新

commit

無料

One-shot conventional commit; bundled scripts adaptively gather diff context, draft the message, and stage+commit — pass `ask` to confirm first or add a hint for the title. Use only when the user asks for a commit.

日本語の概要は準備中です。原文の説明を表示しています。

foyzulkarim/skills432026年9月4日 更新

Executes a QA specification (specs/qa/QA-<N>-<slug>.md) written by /plan-qa: drives every step with the plan's drivers, verifies each Expected line mechanically ([assert]) or by evidence-backed judgment against the plan's written criterion ([judge]), pauses at named operator handoffs, and writes the results artifact QA-RESULTS-<N>-<slug>.md. Use only when the user asks to run or execute a QA plan — never trigger automatically.

日本語の概要は準備中です。原文の説明を表示しています。

foyzulkarim/skills432026年9月4日 更新

Phase 3 of 5 — slices the ARCH doc into verification-ready task specs (tdd/test-after/ui/checklist), emitted as a separate TASKS-<N>-<slug>.md file alongside ARCH for the implement skill. Use only when the user asks to run Phase 3 or generate tasks from an ARCH doc — never trigger automatically.

日本語の概要は準備中です。原文の説明を表示しています。

foyzulkarim/skills432026年9月4日 更新

implement

無料

Phase 4 of 5 — implements tasks from TASKS-<N>-<slug>.md (with ARCH-<N>-<slug>.md as architecture-only context) using mode-appropriate verification (tdd, test-after, ui, checklist); pass 'auto' to run without stepping. Use only when the user asks to run Phase 4 or implement tasks from an ARCH doc — never trigger automatically from a coding request.

日本語の概要は準備中です。原文の説明を表示しています。

foyzulkarim/skills432026年9月4日 更新

After /start-task: park the current clean, pushed feature branch in its own issue-numbered nested worktree (.worktrees/<issue#>) and return the primary checkout to current main, so the next parallel lane can start. Use when the user says to move the branch or task to a worktree or open a parallel lane.

日本語の概要は準備中です。原文の説明を表示しています。

foyzulkarim/skills432026年9月4日 更新

foyzulkarim のスキルをすべて見る

このスキルの問題を報告する