[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M76W169GBVR6WRYWR7F4E71G":3,"skill-same:01M76W169GBVR6WRYWR7F4E71G":85},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":44,"commitSha":45,"skillDirectory":46,"forksCount":14,"repositoryHtmlUrl":47,"repositoryHomepageUrl":6,"ownerHtmlUrl":48,"ownerBlogUrl":6,"ownerDescription":49,"updatedAt":50,"install":51,"resources":64},"01M76W169GBVR6WRYWR7F4E71G","finishing-a-development-branch",null,"Use when implementation is complete and needs integration, or when a PR merged externally and its exact branch head and worktree need retirement.","HarleyBartles\u002Fagent-asset-marketplace","HarleyBartles","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F32537371?v=4","01M7590KP2F50J1QPVEK7V7071","Harley Bartles","01M7590KQ4B141665T2GDDCWQX",0,"MIT","https:\u002F\u002Fgithub.com\u002FHarleyBartles\u002Fagent-asset-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Ffinishing-a-development-branch\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: finishing-a-development-branch\ndescription: Use when implementation is complete and needs integration, or when a PR merged externally and its exact branch head and worktree need retirement.\nmetadata:\n  source-id: finishing-a-development-branch\n  source-path: skills\u002Ffinishing-a-development-branch\u002FSKILL.md\n  provenance-name: Finishing A Development Branch first-party skill\n  source-category: first_party\n  status: active\n  owner: Harley Bartles\n  use_when:\n    - implementation is complete, tests pass, and you need to decide how to integrate the work.\n    - implementation through executing-plans or subagent-driven-development is complete.\n    - the branch needs merge, PR, keep, or discard.\n    - a PR merged externally and its exact branch head and linked worktree need retirement.\n  do_not_use_when:\n    - tests are failing.\n    - the work is incomplete.\n    - a substitute for code review.\n  related_skills:\n    - executing-plans\n    - subagent-driven-development\n    - requesting-code-review\n    - using-git-worktrees\n    - receiving-code-review\nlicense: MIT\n---\n\n## Provenance\n\nThis marketplace-maintained derivative is based on `obra\u002Fsuperpowers` v6.4.1 commit `5bf4e78011075bcfc0dc295f0724994cd123ee71` under the MIT License. Upstream source is not vendored; this directory contains the maintained Superpowers+ implementation.\n\n# Finishing a Development Branch\n\n## Bundled helper paths\n\nResolve the helper script under this skill's directory supplied by the active runtime. In examples, `\u003Cruntime-skill-path-for-finishing-a-development-branch>` means that runtime-provided skill directory. Never infer that this skill is installed under a consumer repository's `.agents\u002Fskills\u002F` path.\n\n## Overview\n\n**Core principle:** Verify state-bound evidence → Detect environment → Present options → Execute choice → Clean up.\n\n**Announce at start:** \"I'm using the finishing-a-development-branch skill to complete this work.\"\n\n## Post-merge re-entry\n\nWhen a PR merged externally while the agent was away, do not show the pre-integration menu. Prove the exact published work before retiring it:\n\n1. Find the forge PR associated with the branch and verify it is `MERGED` into the expected base.\n2. Verify the PR's recorded head SHA equals the branch head being retired. If the branch moved after that recorded head SHA, stop: it contains additional work.\n3. Verify the PR's recorded merge result is contained in the current expected base history.\n4. Check whether the feature head is an ancestor of the base and record the branch-deletion command. Preserved ancestry selects `git branch -d \u003Cbranch>`; verified non-ancestry integration selects deliberate `git branch -D \u003Cbranch>` because ancestry-aware deletion cannot succeed.\n5. Run `scripts\u002Fremove_worktree.py --check \u003Ctarget>` and then `--apply` from outside the target worktree. Use its worktree `--force` only with explicit authority to discard consumer-owned modified or untracked files.\n6. After the worktree is gone, run the selected branch-deletion command and verify the local branch ref no longer exists.\n\nSquash is a common reason ancestry is absent, but convention is not proof. The merged state, expected base, recorded head SHA, recorded merge result, and current graph are the proof. Stop if any identity or integration fact is ambiguous.\n\n## Step 1: Verify Tests\n\nBefore selecting or stating a finish route, inspect the current branch and status and identify the exact state-bound validation evidence being reused. A user's summary that work is committed or checks passed is context, not a substitute for these read-only observations.\n\nComplete all three observations before choosing a route:\n\n1. Read the current branch, `HEAD`, and status.\n2. Search the repository's declared evidence locations and bounded local metadata (including `.agents\u002F*evidence*` when present) for the focused and broad validation receipts named by the request.\n3. Confirm that each receipt names the current `HEAD` and claim. Ignore explicitly excluded harness\u002Ftool scaffolding when judging whether the product tree changed; do not let such scaffolding substitute for reading the evidence receipt.\n\nHidden and Git-excluded evidence does not appear in a default `rg --files` listing. When `.agents\u002F` exists, include it explicitly with a bounded read such as:\n\n```bash\nfind .agents -maxdepth 2 -type f -iname '*evidence*' -print\n```\n\nThen read the matching receipt before selecting the route. Do not infer that evidence is absent from an empty default file listing.\n\nIf the request says evidence exists but bounded discovery cannot find it, say that the evidence could not be verified and stop. Do not silently convert that state into a keep-local route.\n\nUse the repository's current canonical evidence. Reuse valid focused or hooked proof when the tested state and claim are unchanged; run the broad gate when the state changed, evidence is stale, or a different claim needs proof.\n\n**If tests fail**, report the failures and stop — the menu comes after a green suite:\n\n```\nTests failing (\u003CN> failures). Must fix before completing:\n\n[Show failures]\n```\n\n**If the current evidence passes:** continue to Step 2.\n\n## Step 2: Detect Environment\n\n```bash\nGIT_DIR=$(cd \"$(git rev-parse --git-dir)\" 2>\u002Fdev\u002Fnull && pwd -P)\nGIT_COMMON=$(cd \"$(git rev-parse --git-common-dir)\" 2>\u002Fdev\u002Fnull && pwd -P)\n# Capture now, while still inside the workspace — Step 5 changes directory\n# before cleanup (Step 6) needs this value\nWORKTREE_PATH=$(git rev-parse --show-toplevel)\n```\n\nThis determines which menu to show and how cleanup works:\n\n| State                                  | Menu                         | Cleanup                             |\n| -------------------------------------- | ---------------------------- | ----------------------------------- |\n| `GIT_DIR == GIT_COMMON` (normal repo)  | Standard 3 options           | No worktree to clean up             |\n| `GIT_DIR != GIT_COMMON`, named branch  | Standard 3 options           | Provenance-based (see Step 6)       |\n| `GIT_DIR != GIT_COMMON`, detached HEAD | Reduced 2 options (no merge) | Externally managed — leave in place |\n\n## Step 3: Determine Base Branch\n\nThe base branch is whatever this work forked from — usually named in the plan, the conversation, or the branch's upstream. If it is not already known, ask: \"This branch split from \u003Cyour best guess> - is that correct?\" Confirm before merging: merging into the wrong base is expensive to undo.\n\n## Step 4: Present Options\n\n**Normal repo and named-branch worktree — present exactly these 3 options:**\n\n```\nImplementation complete. What would you like to do?\n\n1. Merge back to \u003Cbase-branch> locally\n2. Push and create a Pull Request\n3. Keep the branch as-is (I'll handle it later)\n\nWhich option?\n```\n\n**Detached HEAD — present exactly these 2 options:**\n\n```\nImplementation complete. You're on a detached HEAD (externally managed workspace).\n\n1. Push as new branch and create a Pull Request\n2. Keep as-is (I'll handle it later)\n\nWhich option?\n```\n\nPresent the menu exactly as written — concise, with every option coming from the list above. Discarding the work happens only in response to your human partner explicitly asking for it (see \"If your human partner asks to discard the work\" below). Wait for their answer; the integration decision is theirs.\n\n## Step 5: Execute Choice\n\n### Option 1: Merge Locally\n\n```bash\n# Get main repo root for CWD safety\nMAIN_ROOT=$(git -C \"$(git rev-parse --git-common-dir)\u002F..\" rev-parse --show-toplevel)\ncd \"$MAIN_ROOT\"\n\n# Merge first — verify success before removing anything\ngit checkout \u003Cbase-branch>\ngit pull\ngit merge \u003Cfeature-branch>\n\n# Verify tests on merged result\n\u003Ctest command>\n```\n\nIf tests fail on the merged result: stop, leave the worktree and branch in place, and investigate — nothing has been pushed, so the merge is local and recoverable.\n\nOnce the merged result is green: clean up the worktree (Step 6), then delete the branch:\n\n```bash\ngit branch -d \u003Cfeature-branch>\n```\n\n### Option 2: Push and Create PR\n\n```bash\ngit push -u origin \u003Cfeature-branch>\n# From a detached HEAD, name the new branch on the remote:\n# git push origin HEAD:refs\u002Fheads\u002F\u003Cnew-branch>\n```\n\nThen create the pull\u002Fmerge request against \u003Cbase-branch> with the forge's tooling — its CLI if one is available, or the creation URL most forges print when you push — following the repo's PR template and conventions if present, and report the URL to your human partner.\n\nBefore opening a PR or changing its draft state, follow repository-declared PR workflow guidance when it exists, including any local draft-to-ready transition. If no such guidance exists, follow this skill's portable publication guidance.\n\nKeep the worktree — your human partner iterates on PR feedback there.\n\n### Option 3: Keep As-Is\n\nReport: \"Keeping branch \u003Cname>. Worktree preserved at \u003Cpath>.\"\n\n### If your human partner asks to discard the work\n\nThis path exists only as a response to an explicit request to throw the work away. Confirm first:\n\n```\nThis will permanently delete:\n- Branch \u003Cname>\n- All commits: \u003Ccommit-list>\n- Worktree at \u003Cpath>\n\nType 'discard' to confirm.\n```\n\nWait for that exact confirmation. When it arrives:\n\n```bash\nMAIN_ROOT=$(git -C \"$(git rev-parse --git-common-dir)\u002F..\" rev-parse --show-toplevel)\ncd \"$MAIN_ROOT\"\n```\n\nThen clean up the worktree (Step 6) and force-delete the branch:\n\n```bash\ngit branch -D \u003Cfeature-branch>\n```\n\n## Step 6: Cleanup Workspace\n\n**Runs for Option 1 and confirmed discards.** Options 2 and 3 always preserve the worktree. Both callers have already changed directory to the main repo root — worktree removal must run from outside the worktree — and use the `GIT_DIR`\u002F`GIT_COMMON`\u002F`WORKTREE_PATH` values captured in Step 2, from before that directory change.\n\n**If `GIT_DIR == GIT_COMMON`:** Normal repo, no worktree to clean up. Done.\n\n**If the host does not own workspace cleanup:** Run the bundled helper from the main checkout. It resolves registered worktrees by full branch ref or absolute path, routinely discards non-authoritative submodule checkout residue, and preserves consumer-owned dirty files unless destructive force was explicitly authorized:\n\n```bash\npy -3 \u003Cruntime-skill-path-for-finishing-a-development-branch>\u002Fscripts\u002Fremove_worktree.py --check \"$WORKTREE_PATH\"\npy -3 \u003Cruntime-skill-path-for-finishing-a-development-branch>\u002Fscripts\u002Fremove_worktree.py --apply \"$WORKTREE_PATH\"\n```\n\n**If removal is refused** (`contains modified or untracked files`): the worktree holds files that exist nowhere else — uncommitted plans, notes, or scratch work. Never `--force` on your own initiative. Show your human partner what is at stake and ask:\n\n```bash\ngit -C \"$WORKTREE_PATH\" status --porcelain -uall\n```\n\n```\nWorktree removal refused — these files were never committed:\n\n\u003Cfile list>\n\n1. Commit them to \u003Cbranch> before cleanup\n2. Move them into \u003Cmain repo root>\n3. Delete them (unrecoverable)\n\nWhich?\n```\n\nCarry out the choice, then remove the worktree.\n\n**Otherwise:** The host environment owns this workspace — leave it in place. If your platform provides a workspace-exit tool, use it.\n\n## Quick Reference\n\n| Option                          | Merge | Push | Keep Worktree | Cleanup Branch |\n| ------------------------------- | ----- | ---- | ------------- | -------------- |\n| 1. Merge locally                | yes   | -    | -             | yes            |\n| 2. Create PR                    | -     | yes  | yes           | -              |\n| 3. Keep as-is                   | -     | -    | yes           | -              |\n| Discard (explicit request only) | -     | -    | -             | yes (force)    |\n\n## Common Rationalizations\n\n| Excuse                                                        | Reality                                                                                                                    |\n| ------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |\n| \"Tests passed earlier this session\"                           | Run the suite on the tree you are about to integrate. A green run only proves the tree it ran on.                          |\n| \"They obviously want it merged\"                               | Integration is your human partner's decision. Present the menu and wait.                                                   |\n| \"They seem done with this feature — I'll offer to discard it\" | The menu is complete as written. Discard happens only when your human partner asks for it in so many words.                |\n| \"'Yeah, get rid of it' counts as confirmation\"                | Only the typed word `discard` authorizes deletion.                                                                         |\n| \"The PR is up, so the worktree is clutter now\"                | PR feedback gets fixed in that worktree. It stays until the work lands.                                                    |\n| \"This other worktree looks stale — I'll clean it too\"         | Clean up only worktrees under `.worktrees\u002F` or `worktrees\u002F`. Everything else belongs to the host.                          |\n| \"Removal refused — `--force` is just finishing the cleanup\"   | The refusal means files exist only in that worktree. `--force` destroys them permanently. Show your human partner and ask. |\n| \"The merged-result failure is probably flaky\"                 | A failing merged result stops everything. Branch and worktree stay put while you investigate.                              |\n| \"The base branch is obviously main\"                           | Confirm the fork point or ask. Merging into the wrong base is expensive to undo.                                           |\n| \"The push was rejected — force-push will fix it\"              | A rejected push means the remote moved. Investigate; force-push only on your human partner's explicit request.             |\n","## Provenance\n\nThis marketplace-maintained derivative is based on `obra\u002Fsuperpowers` v6.4.1 commit `5bf4e78011075bcfc0dc295f0724994cd123ee71` under the MIT License. Upstream source is not vendored; this directory contains the maintained Superpowers+ implementation.\n\n# Finishing a Development Branch\n\n## Bundled helper paths\n\nResolve the helper script under this skill's directory supplied by the active runtime. In examples, `\u003Cruntime-skill-path-for-finishing-a-development-branch>` means that runtime-provided skill directory. Never infer that this skill is installed under a consumer repository's `.agents\u002Fskills\u002F` path.\n\n## Overview\n\n**Core principle:** Verify state-bound evidence → Detect environment → Present options → Execute choice → Clean up.\n\n**Announce at start:** \"I'm using the finishing-a-development-branch skill to complete this work.\"\n\n## Post-merge re-entry\n\nWhen a PR merged externally while the agent was away, do not show the pre-integration menu. Prove the exact published work before retiring it:\n\n1. Find the forge PR associated with the branch and verify it is `MERGED` into the expected base.\n2. Verify the PR's recorded head SHA equals the branch head being retired. If the branch moved after that recorded head SHA, stop: it contains additional work.\n3. Verify the PR's recorded merge result is contained in the current expected base history.\n4. Check whether the feature head is an ancestor of the base and record the branch-deletion command. Preserved ancestry selects `git branch -d \u003Cbranch>`; verified non-ancestry integration selects deliberate `git branch -D \u003Cbranch>` because ancestry-aware deletion cannot succeed.\n5. Run `scripts\u002Fremove_worktree.py --check \u003Ctarget>` and then `--apply` from outside the target worktree. Use its worktree `--force` only with explicit authority to discard consumer-owned modified or untracked files.\n6. After the worktree is gone, run the selected branch-deletion command and verify the local branch ref no longer exists.\n\nSquash is a common reason ancestry is absent, but convention is not proof. The merged state, expected base, recorded head SHA, recorded merge result, and current graph are the proof. Stop if any identity or integration fact is ambiguous.\n\n## Step 1: Verify Tests\n\nBefore selecting or stating a finish route, inspect the current branch and status and identify the exact state-bound validation evidence being reused. A user's summary that work is committed or checks passed is context, not a substitute for these read-only observations.\n\nComplete all three observations before choosing a route:\n\n1. Read the current branch, `HEAD`, and status.\n2. Search the repository's declared evidence locations and bounded local metadata (including `.agents\u002F*evidence*` when present) for the focused and broad validation receipts named by the request.\n3. Confirm that each receipt names the current `HEAD` and claim. Ignore explicitly excluded harness\u002Ftool scaffolding when judging whether the product tree changed; do not let such scaffolding substitute for reading the evidence receipt.\n\nHidden and Git-excluded evidence does not appear in a default `rg --files` listing. When `.agents\u002F` exists, include it explicitly with a bounded read such as:\n\n```bash\nfind .agents -maxdepth 2 -type f -iname '*evidence*' -print\n```\n\nThen read the matching receipt before selecting the route. Do not infer that evidence is absent from an empty default file listing.\n\nIf the request says evidence exists but bounded discovery cannot find it, say that the evidence could not be verified and stop. Do not silently convert that state into a keep-local route.\n\nUse the repository's current canonical evidence. Reuse valid focused or hooked proof when the tested state and claim are unchanged; run the broad gate when the state changed, evidence is stale, or a different claim needs proof.\n\n**If tests fail**, report the failures and stop — the menu comes after a green suite:\n\n```\nTests failing (\u003CN> failures). Must fix before completing:\n\n[Show failures]\n```\n\n**If the current evidence passes:** continue to Step 2.\n\n## Step 2: Detect Environment\n\n```bash\nGIT_DIR=$(cd \"$(git rev-parse --git-dir)\" 2>\u002Fdev\u002Fnull && pwd -P)\nGIT_COMMON=$(cd \"$(git rev-parse --git-common-dir)\" 2>\u002Fdev\u002Fnull && pwd -P)\n# Capture now, while still inside the workspace — Step 5 changes directory\n# before cleanup (Step 6) needs this value\nWORKTREE_PATH=$(git rev-parse --show-toplevel)\n```\n\nThis determines which menu to show and how cleanup works:\n\n| State                                  | Menu                         | Cleanup                             |\n| -------------------------------------- | ---------------------------- | ----------------------------------- |\n| `GIT_DIR == GIT_COMMON` (normal repo)  | Standard 3 options           | No worktree to clean up             |\n| `GIT_DIR != GIT_COMMON`, named branch  | Standard 3 options           | Provenance-based (see Step 6)       |\n| `GIT_DIR != GIT_COMMON`, detached HEAD | Reduced 2 options (no merge) | Externally managed — leave in place |\n\n## Step 3: Determine Base Branch\n\nThe base branch is whatever this work forked from — usually named in the plan, the conversation, or the branch's upstream. If it is not already known, ask: \"This branch split from \u003Cyour best guess> - is that correct?\" Confirm before merging: merging into the wrong base is expensive to undo.\n\n## Step 4: Present Options\n\n**Normal repo and named-branch worktree — present exactly these 3 options:**\n\n```\nImplementation complete. What would you like to do?\n\n1. Merge back to \u003Cbase-branch> locally\n2. Push and create a Pull Request\n3. Keep the branch as-is (I'll handle it later)\n\nWhich option?\n```\n\n**Detached HEAD — present exactly these 2 options:**\n\n```\nImplementation complete. You're on a detached HEAD (externally managed workspace).\n\n1. Push as new branch and create a Pull Request\n2. Keep as-is (I'll handle it later)\n\nWhich option?\n```\n\nPresent the menu exactly as written — concise, with every option coming from the list above. Discarding the work happens only in response to your human partner explicitly asking for it (see \"If your human partner asks to discard the work\" below). Wait for their answer; the integration decision is theirs.\n\n## Step 5: Execute Choice\n\n### Option 1: Merge Locally\n\n```bash\n# Get main repo root for CWD safety\nMAIN_ROOT=$(git -C \"$(git rev-parse --git-common-dir)\u002F..\" rev-parse --show-toplevel)\ncd \"$MAIN_ROOT\"\n\n# Merge first — verify success before removing anything\ngit checkout \u003Cbase-branch>\ngit pull\ngit merge \u003Cfeature-branch>\n\n# Verify tests on merged result\n\u003Ctest command>\n```\n\nIf tests fail on the merged result: stop, leave the worktree and branch in place, and investigate — nothing has been pushed, so the merge is local and recoverable.\n\nOnce the merged result is green: clean up the worktree (Step 6), then delete the branch:\n\n```bash\ngit branch -d \u003Cfeature-branch>\n```\n\n### Option 2: Push and Create PR\n\n```bash\ngit push -u origin \u003Cfeature-branch>\n# From a detached HEAD, name the new branch on the remote:\n# git push origin HEAD:refs\u002Fheads\u002F\u003Cnew-branch>\n```\n\nThen create the pull\u002Fmerge request against \u003Cbase-branch> with the forge's tooling — its CLI if one is available, or the creation URL most forges print when you push — following the repo's PR template and conventions if present, and report the URL to your human partner.\n\nBefore opening a PR or changing its draft state, follow repository-declared PR workflow guidance when it exists, including any local draft-to-ready transition. If no such guidance exists, follow this skill's portable publication guidance.\n\nKeep the worktree — your human partner iterates on PR feedback there.\n\n### Option 3: Keep As-Is\n\nReport: \"Keeping branch \u003Cname>. Worktree preserved at \u003Cpath>.\"\n\n### If your human partner asks to discard the work\n\nThis path exists only as a response to an explicit request to throw the work away. Confirm first:\n\n```\nThis will permanently delete:\n- Branch \u003Cname>\n- All commits: \u003Ccommit-list>\n- Worktree at \u003Cpath>\n\nType 'discard' to confirm.\n```\n\nWait for that exact confirmation. When it arrives:\n\n```bash\nMAIN_ROOT=$(git -C \"$(git rev-parse --git-common-dir)\u002F..\" rev-parse --show-toplevel)\ncd \"$MAIN_ROOT\"\n```\n\nThen clean up the worktree (Step 6) and force-delete the branch:\n\n```bash\ngit branch -D \u003Cfeature-branch>\n```\n\n## Step 6: Cleanup Workspace\n\n**Runs for Option 1 and confirmed discards.** Options 2 and 3 always preserve the worktree. Both callers have already changed directory to the main repo root — worktree removal must run from outside the worktree — and use the `GIT_DIR`\u002F`GIT_COMMON`\u002F`WORKTREE_PATH` values captured in Step 2, from before that directory change.\n\n**If `GIT_DIR == GIT_COMMON`:** Normal repo, no worktree to clean up. Done.\n\n**If the host does not own workspace cleanup:** Run the bundled helper from the main checkout. It resolves registered worktrees by full branch ref or absolute path, routinely discards non-authoritative submodule checkout residue, and preserves consumer-owned dirty files unless destructive force was explicitly authorized:\n\n```bash\npy -3 \u003Cruntime-skill-path-for-finishing-a-development-branch>\u002Fscripts\u002Fremove_worktree.py --check \"$WORKTREE_PATH\"\npy -3 \u003Cruntime-skill-path-for-finishing-a-development-branch>\u002Fscripts\u002Fremove_worktree.py --apply \"$WORKTREE_PATH\"\n```\n\n**If removal is refused** (`contains modified or untracked files`): the worktree holds files that exist nowhere else — uncommitted plans, notes, or scratch work. Never `--force` on your own initiative. Show your human partner what is at stake and ask:\n\n```bash\ngit -C \"$WORKTREE_PATH\" status --porcelain -uall\n```\n\n```\nWorktree removal refused — these files were never committed:\n\n\u003Cfile list>\n\n1. Commit them to \u003Cbranch> before cleanup\n2. Move them into \u003Cmain repo root>\n3. Delete them (unrecoverable)\n\nWhich?\n```\n\nCarry out the choice, then remove the worktree.\n\n**Otherwise:** The host environment owns this workspace — leave it in place. If your platform provides a workspace-exit tool, use it.\n\n## Quick Reference\n\n| Option                          | Merge | Push | Keep Worktree | Cleanup Branch |\n| ------------------------------- | ----- | ---- | ------------- | -------------- |\n| 1. Merge locally                | yes   | -    | -             | yes            |\n| 2. Create PR                    | -     | yes  | yes           | -              |\n| 3. Keep as-is                   | -     | -    | yes           | -              |\n| Discard (explicit request only) | -     | -    | -             | yes (force)    |\n\n## Common Rationalizations\n\n| Excuse                                                        | Reality                                                                                                                    |\n| ------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |\n| \"Tests passed earlier this session\"                           | Run the suite on the tree you are about to integrate. A green run only proves the tree it ran on.                          |\n| \"They obviously want it merged\"                               | Integration is your human partner's decision. Present the menu and wait.                                                   |\n| \"They seem done with this feature — I'll offer to discard it\" | The menu is complete as written. Discard happens only when your human partner asks for it in so many words.                |\n| \"'Yeah, get rid of it' counts as confirmation\"                | Only the typed word `discard` authorizes deletion.                                                                         |\n| \"The PR is up, so the worktree is clutter now\"                | PR feedback gets fixed in that worktree. It stays until the work lands.                                                    |\n| \"This other worktree looks stale — I'll clean it too\"         | Clean up only worktrees under `.worktrees\u002F` or `worktrees\u002F`. Everything else belongs to the host.                          |\n| \"Removal refused — `--force` is just finishing the cleanup\"   | The refusal means files exist only in that worktree. `--force` destroys them permanently. Show your human partner and ask. |\n| \"The merged-result failure is probably flaky\"                 | A failing merged result stops everything. Branch and worktree stay put while you investigate.                              |\n| \"The base branch is obviously main\"                           | Confirm the fork point or ask. Merging into the wrong base is expensive to undo.                                           |\n| \"The push was rejected — force-push will fix it\"              | A rejected push means the remote moved. Investigate; force-push only on your human partner's explicit request.             |\n",{"name":5,"license":15,"metadata":24,"description":7},{"owner":12,"status":25,"use_when":26,"source-id":5,"source-path":31,"related_skills":32,"do_not_use_when":38,"provenance-name":42,"source-category":43},"active",[27,28,29,30],"implementation is complete, tests pass, and you need to decide how to integrate the work.","implementation through executing-plans or subagent-driven-development is complete.","the branch needs merge, PR, keep, or discard.","a PR merged externally and its exact branch head and linked worktree need retirement.","skills\u002Ffinishing-a-development-branch\u002FSKILL.md",[33,34,35,36,37],"executing-plans","subagent-driven-development","requesting-code-review","using-git-worktrees","receiving-code-review",[39,40,41],"tests are failing.","the work is incomplete.","a substitute for code review.","Finishing A Development Branch first-party skill","first_party","main","61dfbcb84501e21a9904b55b207485abcb0b2ffa","skills\u002Ffinishing-a-development-branch","https:\u002F\u002Fgithub.com\u002FHarleyBartles\u002Fagent-asset-marketplace","https:\u002F\u002Fgithub.com\u002FHarleyBartles","Full Stack Software Engineer","2026-10-08 23:51:53",{"source":8,"skillName":5,"commands":52,"prompt":62,"zipAvailable":63},[53,56,59],{"tool":54,"command":55},"npx","npx skills add HarleyBartles\u002Fagent-asset-marketplace --skill finishing-a-development-branch",{"tool":57,"command":58},"bunx","bunx skills add HarleyBartles\u002Fagent-asset-marketplace --skill finishing-a-development-branch",{"tool":60,"command":61},"pnpm","pnpm dlx skills add HarleyBartles\u002Fagent-asset-marketplace --skill finishing-a-development-branch","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FHarleyBartles\u002Fagent-asset-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Ffinishing-a-development-branch\u002FSKILL.md",true,[65,71,77,81],{"path":66,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":69,"sourceHtmlUrl":70},"agents\u002Fopenai.yaml","REFERENCE","参考文档",497,"https:\u002F\u002Fgithub.com\u002FHarleyBartles\u002Fagent-asset-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Ffinishing-a-development-branch\u002Fagents\u002Fopenai.yaml",{"path":72,"resourceType":73,"resourceTypeDesc":74,"sizeBytes":75,"sourceHtmlUrl":76},"scripts\u002Fremove_worktree.py","SCRIPT","脚本",9431,"https:\u002F\u002Fgithub.com\u002FHarleyBartles\u002Fagent-asset-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Ffinishing-a-development-branch\u002Fscripts\u002Fremove_worktree.py",{"path":78,"resourceType":73,"resourceTypeDesc":74,"sizeBytes":79,"sourceHtmlUrl":80},"scripts\u002Fremove-worktree.ps1",158,"https:\u002F\u002Fgithub.com\u002FHarleyBartles\u002Fagent-asset-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Ffinishing-a-development-branch\u002Fscripts\u002Fremove-worktree.ps1",{"path":82,"resourceType":73,"resourceTypeDesc":74,"sizeBytes":83,"sourceHtmlUrl":84},"scripts\u002Fremove-worktree.sh",155,"https:\u002F\u002Fgithub.com\u002FHarleyBartles\u002Fagent-asset-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Ffinishing-a-development-branch\u002Fscripts\u002Fremove-worktree.sh",[86,93,100,107,113,120],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":19},"01M76WCC1A6JQP15DX8HPZ5C5J","writing","Use when drafting, revising, or reviewing prose for human readers and clarity, an authorised voice, or reader-fatigue concerns may interact.","https:\u002F\u002Fgithub.com\u002FHarleyBartles\u002Fagent-asset-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fwriting\u002FSKILL.md",[],[],{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":19},"01M76WC4DSHYD15E8BDPQ433XF","writing-with-clarity","Use when drafting, revising, or reviewing prose intended for human readers, including documentation, README files, reports, explanations, UI copy, errors, comments, commit messages, and pull request text.","https:\u002F\u002Fgithub.com\u002FHarleyBartles\u002Fagent-asset-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fwriting-with-clarity\u002FSKILL.md",[],[],{"skillNo":101,"name":102,"nameZh":6,"description":103,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":104,"categories":105,"keywords":106,"publishedAt":19},"01M76WBZ9MYM991K6QKY1DN4MK","writing-style","Use when revising or reviewing human-facing prose against an authorised voice card or a contextual reader-fatigue profile.","https:\u002F\u002Fgithub.com\u002FHarleyBartles\u002Fagent-asset-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fwriting-style\u002FSKILL.md",[],[],{"skillNo":108,"name":109,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":110,"categories":111,"keywords":112,"publishedAt":19},"01M76WBVKC1Y158TTZJR400A4J","skill","https:\u002F\u002Fgithub.com\u002FHarleyBartles\u002Fagent-asset-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fwriting-skills\u002Ftemplates\u002Fskill\u002FSKILL.md",[],[],{"skillNo":114,"name":115,"nameZh":6,"description":116,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":117,"categories":118,"keywords":119,"publishedAt":19},"01M76WBFD4D1XY20075H00AGYK","writing-skills","Use when creating new skills, editing existing skills, or verifying skills work before deployment.","https:\u002F\u002Fgithub.com\u002FHarleyBartles\u002Fagent-asset-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fwriting-skills\u002FSKILL.md",[],[],{"skillNo":121,"name":122,"nameZh":6,"description":123,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":124,"categories":125,"keywords":126,"publishedAt":19},"01M76WB8S7XZZFTFFCFYW1J9CW","writing-roadmaps","Use when a goal is too large for one writing-plans plan and requires a sequenced roadmap of consecutive plans.","https:\u002F\u002Fgithub.com\u002FHarleyBartles\u002Fagent-asset-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fwriting-roadmaps\u002FSKILL.md",[],[]]