From harmony-plugin
Use when the user wants to finish, complete, wrap up, land, or merge their current work. Triggers on phrases like "finish", "done", "wrap up", "land this", "merge", "ship it", or "we're done". This is the exit point for ALL development work in this project — it handles the full merge-and-cleanup sequence.
npx claudepluginhub ycomplex/harmony-plugin --plugin harmony-pluginThis skill uses the workspace's default tool permissions.
Safely land completed work: verify readiness, rebase, squash merge, update main, and clean up the worktree and branch.
Verifies tests pass on completed feature branch, presents options to merge locally, create GitHub PR, keep as-is or discard; executes choice and cleans up worktree.
Guides root cause investigation for bugs, test failures, unexpected behavior, performance issues, and build failures before proposing fixes.
Writes implementation plans from specs for multi-step tasks, mapping files and breaking into TDD bite-sized steps before coding.
Share bugs, ideas, or general feedback.
Safely land completed work: verify readiness, rebase, squash merge, update main, and clean up the worktree and branch.
Before doing anything, verify ALL three conditions. If any fail, stop immediately and tell the user what needs to be done — do NOT attempt to fix these yourself.
Working in a worktree? Check that the current directory is inside .worktrees/. If not, error: "You're not in a worktree. Please switch to the worktree for the work you want to finish."
All code committed? Run git status and check for uncommitted changes. If there are any, error: "There are uncommitted changes. Please commit your work before finishing."
PR created? Check if the current branch has an open PR using gh pr view. If not, error: "No PR found for this branch. Please create a PR before finishing."
Acceptance criteria addressed? (soft check — warning, not a blocker)
If the task has acceptance criteria, use list_acceptance_criteria to check whether all items are marked as done. If not, warn the user:
"N of M acceptance criteria are not yet checked. Proceed anyway?"
Similarly check if test cases have been recorded via list_test_cases.
If either is missing, warn but don't block — the user may have valid reasons to skip.
If any of the first three checks fail, stop. Do not proceed. Do not offer to fix it. Just report the issue clearly. For the fourth check, warn but allow the user to override.
Once all checks pass:
git fetch origin main
git rebase origin/main
If there are conflicts, attempt to resolve them. If anything is ambiguous or unclear, stop and consult the user before continuing.
git push --force-with-lease
The force-push triggers a new CI run. Wait for it to complete before merging.
gh pr checks <PR-number> --watch
If CI fails, stop and investigate — do not merge a failing build.
Use gh pr merge <PR-number> --squash. Do NOT pass --delete-branch — the branch deletion will fail from inside the worktree and break the flow.
cd <project-root> # The parent directory outside .worktrees/
git checkout main
git pull origin main
The project root is the repository root (parent of .worktrees/).
Before removing the worktree, find and kill any processes (dev servers, watchers, etc.) whose working directory is inside the worktree. This prevents orphan processes after the directory is deleted.
# Find node/vite processes running inside the worktree
lsof +D .worktrees/<worktree-name> 2>/dev/null | awk 'NR>1 {print $2}' | sort -u | xargs kill 2>/dev/null
If no processes are found, continue silently — this step is best-effort.
git worktree remove .worktrees/<worktree-name>
git branch -d <branch-name>
git push origin --delete <branch-name>
Read .harmony-task.json from the worktree root (written by start-work). This contains the task UUID, visual ID, and title. If the file doesn't exist, fall back to inferring the task from the branch name, PR title, or conversation context.
mcp__harmony__update_taskmcp__harmony__add_comment(task_id, "Merged to main via PR #<number>")
The task should be a living record of what happened — see the full task lifecycle reference in the start-work skill.
Confirm that main is updated, the worktree is removed, and branches are pruned.