[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M75NBK9TAP19N4W6MDJAM8G4":3,"skill-same:01M75NBK9TAP19N4W6MDJAM8G4":46},{"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":24,"commitSha":25,"skillDirectory":26,"forksCount":14,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":29,"ownerDescription":30,"updatedAt":31,"install":32,"resources":45},"01M75NBK9TAP19N4W6MDJAM8G4","finishing-a-development-branch",null,"Use when implementation is complete, all tests pass, and you need to decide how to integrate the work - guides completion of development work by presenting structured options for merge, PR, or cleanup","linktogo\u002Fmaggie","linktogo","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F29751338?v=4","01M75NBAKP44KV5ND0WEE3H87P","Fabien Brunet","01M75NBAMC2TEQQ8FMTBA23MET",2,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Flinktogo\u002Fmaggie\u002Fblob\u002Fmain\u002F.claude\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, all tests pass, and you need to decide how to integrate the work - guides completion of development work by presenting structured options for merge, PR, or cleanup\n---\n\n# Finishing a Development Branch\n\n## Overview\n\nGuide completion of development work by presenting clear options and handling chosen workflow.\n\n**Core principle:** Verify tests → 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## The Process\n\n### Step 1: Verify Tests\n\n**Before presenting options, verify tests pass:**\n\n```bash\n# Run project's test suite\nnpm test \u002F cargo test \u002F pytest \u002F go test .\u002F...\n```\n\n**If tests fail:**\n```\nTests failing (\u003CN> failures). Must fix before completing:\n\n[Show failures]\n\nCannot proceed with merge\u002FPR until tests pass.\n```\n\nStop. Don't proceed to Step 2.\n\n**If tests pass:** Continue to Step 2.\n\n### Step 2: Detect Environment\n\n**Determine workspace state before presenting options:**\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```\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 4 options | No worktree to clean up |\n| `GIT_DIR != GIT_COMMON`, named branch | Standard 4 options | Provenance-based (see Step 6) |\n| `GIT_DIR != GIT_COMMON`, detached HEAD | Reduced 3 options (no merge) | No cleanup (externally managed) |\n\n### Step 3: Determine Base Branch\n\n```bash\n# Try common base branches\ngit merge-base HEAD main 2>\u002Fdev\u002Fnull || git merge-base HEAD master 2>\u002Fdev\u002Fnull\n```\n\nOr ask: \"This branch split from main - is that correct?\"\n\n### Step 4: Present Options\n\n**Normal repo and named-branch worktree — present exactly these 4 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)\n4. Discard this work\n\nWhich option?\n```\n\n**Detached HEAD — present exactly these 3 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)\n3. Discard this work\n\nWhich option?\n```\n\n**Don't add explanation** - keep options concise.\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# Only after merge succeeds: cleanup worktree (Step 6), then delete branch\n```\n\nThen: Cleanup worktree (Step 6), then delete branch:\n\n```bash\ngit branch -d \u003Cfeature-branch>\n```\n\n#### Option 2: Push and Create PR\n\n```bash\n# Push branch\ngit push -u origin \u003Cfeature-branch>\n\n# Create PR\ngh pr create --title \"\u003Ctitle>\" --body \"$(cat \u003C\u003C'EOF'\n## Summary\n\u003C2-3 bullets of what changed>\n\n## Test Plan\n- [ ] \u003Cverification steps>\nEOF\n)\"\n```\n\n**Do NOT clean up worktree** — user needs it alive to iterate on PR feedback.\n\n#### Option 3: Keep As-Is\n\nReport: \"Keeping branch \u003Cname>. Worktree preserved at \u003Cpath>.\"\n\n**Don't cleanup worktree.**\n\n#### Option 4: Discard\n\n**Confirm first:**\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 exact confirmation.\n\nIf confirmed:\n```bash\nMAIN_ROOT=$(git -C \"$(git rev-parse --git-common-dir)\u002F..\" rev-parse --show-toplevel)\ncd \"$MAIN_ROOT\"\n```\n\nThen: Cleanup worktree (Step 6), then force-delete branch:\n```bash\ngit branch -D \u003Cfeature-branch>\n```\n\n### Step 6: Cleanup Workspace\n\n**Only runs for Options 1 and 4.** Options 2 and 3 always preserve the worktree.\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)\nWORKTREE_PATH=$(git rev-parse --show-toplevel)\n```\n\n**If `GIT_DIR == GIT_COMMON`:** Normal repo, no worktree to clean up. Done.\n\n**If worktree path is under `.worktrees\u002F`, `worktrees\u002F`, or `~\u002F.config\u002Fsuperpowers\u002Fworktrees\u002F`:** Superpowers created this worktree — we own cleanup.\n\n```bash\nMAIN_ROOT=$(git -C \"$(git rev-parse --git-common-dir)\u002F..\" rev-parse --show-toplevel)\ncd \"$MAIN_ROOT\"\ngit worktree remove \"$WORKTREE_PATH\"\ngit worktree prune  # Self-healing: clean up any stale registrations\n```\n\n**Otherwise:** The host environment (harness) owns this workspace. Do NOT remove it. If your platform provides a workspace-exit tool, use it. Otherwise, leave the workspace in place.\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| 4. Discard | - | - | - | yes (force) |\n\n## Common Mistakes\n\n**Skipping test verification**\n- **Problem:** Merge broken code, create failing PR\n- **Fix:** Always verify tests before offering options\n\n**Open-ended questions**\n- **Problem:** \"What should I do next?\" is ambiguous\n- **Fix:** Present exactly 4 structured options (or 3 for detached HEAD)\n\n**Cleaning up worktree for Option 2**\n- **Problem:** Remove worktree user needs for PR iteration\n- **Fix:** Only cleanup for Options 1 and 4\n\n**Deleting branch before removing worktree**\n- **Problem:** `git branch -d` fails because worktree still references the branch\n- **Fix:** Merge first, remove worktree, then delete branch\n\n**Running git worktree remove from inside the worktree**\n- **Problem:** Command fails silently when CWD is inside the worktree being removed\n- **Fix:** Always `cd` to main repo root before `git worktree remove`\n\n**Cleaning up harness-owned worktrees**\n- **Problem:** Removing a worktree the harness created causes phantom state\n- **Fix:** Only clean up worktrees under `.worktrees\u002F`, `worktrees\u002F`, or `~\u002F.config\u002Fsuperpowers\u002Fworktrees\u002F`\n\n**No confirmation for discard**\n- **Problem:** Accidentally delete work\n- **Fix:** Require typed \"discard\" confirmation\n\n## Red Flags\n\n**Never:**\n- Proceed with failing tests\n- Merge without verifying tests on result\n- Delete work without confirmation\n- Force-push without explicit request\n- Remove a worktree before confirming merge success\n- Clean up worktrees you didn't create (provenance check)\n- Run `git worktree remove` from inside the worktree\n\n**Always:**\n- Verify tests before offering options\n- Detect environment before presenting menu\n- Present exactly 4 options (or 3 for detached HEAD)\n- Get typed confirmation for Option 4\n- Clean up worktree for Options 1 & 4 only\n- `cd` to main repo root before worktree removal\n- Run `git worktree prune` after removal\n","# Finishing a Development Branch\n\n## Overview\n\nGuide completion of development work by presenting clear options and handling chosen workflow.\n\n**Core principle:** Verify tests → 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## The Process\n\n### Step 1: Verify Tests\n\n**Before presenting options, verify tests pass:**\n\n```bash\n# Run project's test suite\nnpm test \u002F cargo test \u002F pytest \u002F go test .\u002F...\n```\n\n**If tests fail:**\n```\nTests failing (\u003CN> failures). Must fix before completing:\n\n[Show failures]\n\nCannot proceed with merge\u002FPR until tests pass.\n```\n\nStop. Don't proceed to Step 2.\n\n**If tests pass:** Continue to Step 2.\n\n### Step 2: Detect Environment\n\n**Determine workspace state before presenting options:**\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```\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 4 options | No worktree to clean up |\n| `GIT_DIR != GIT_COMMON`, named branch | Standard 4 options | Provenance-based (see Step 6) |\n| `GIT_DIR != GIT_COMMON`, detached HEAD | Reduced 3 options (no merge) | No cleanup (externally managed) |\n\n### Step 3: Determine Base Branch\n\n```bash\n# Try common base branches\ngit merge-base HEAD main 2>\u002Fdev\u002Fnull || git merge-base HEAD master 2>\u002Fdev\u002Fnull\n```\n\nOr ask: \"This branch split from main - is that correct?\"\n\n### Step 4: Present Options\n\n**Normal repo and named-branch worktree — present exactly these 4 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)\n4. Discard this work\n\nWhich option?\n```\n\n**Detached HEAD — present exactly these 3 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)\n3. Discard this work\n\nWhich option?\n```\n\n**Don't add explanation** - keep options concise.\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# Only after merge succeeds: cleanup worktree (Step 6), then delete branch\n```\n\nThen: Cleanup worktree (Step 6), then delete branch:\n\n```bash\ngit branch -d \u003Cfeature-branch>\n```\n\n#### Option 2: Push and Create PR\n\n```bash\n# Push branch\ngit push -u origin \u003Cfeature-branch>\n\n# Create PR\ngh pr create --title \"\u003Ctitle>\" --body \"$(cat \u003C\u003C'EOF'\n## Summary\n\u003C2-3 bullets of what changed>\n\n## Test Plan\n- [ ] \u003Cverification steps>\nEOF\n)\"\n```\n\n**Do NOT clean up worktree** — user needs it alive to iterate on PR feedback.\n\n#### Option 3: Keep As-Is\n\nReport: \"Keeping branch \u003Cname>. Worktree preserved at \u003Cpath>.\"\n\n**Don't cleanup worktree.**\n\n#### Option 4: Discard\n\n**Confirm first:**\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 exact confirmation.\n\nIf confirmed:\n```bash\nMAIN_ROOT=$(git -C \"$(git rev-parse --git-common-dir)\u002F..\" rev-parse --show-toplevel)\ncd \"$MAIN_ROOT\"\n```\n\nThen: Cleanup worktree (Step 6), then force-delete branch:\n```bash\ngit branch -D \u003Cfeature-branch>\n```\n\n### Step 6: Cleanup Workspace\n\n**Only runs for Options 1 and 4.** Options 2 and 3 always preserve the worktree.\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)\nWORKTREE_PATH=$(git rev-parse --show-toplevel)\n```\n\n**If `GIT_DIR == GIT_COMMON`:** Normal repo, no worktree to clean up. Done.\n\n**If worktree path is under `.worktrees\u002F`, `worktrees\u002F`, or `~\u002F.config\u002Fsuperpowers\u002Fworktrees\u002F`:** Superpowers created this worktree — we own cleanup.\n\n```bash\nMAIN_ROOT=$(git -C \"$(git rev-parse --git-common-dir)\u002F..\" rev-parse --show-toplevel)\ncd \"$MAIN_ROOT\"\ngit worktree remove \"$WORKTREE_PATH\"\ngit worktree prune  # Self-healing: clean up any stale registrations\n```\n\n**Otherwise:** The host environment (harness) owns this workspace. Do NOT remove it. If your platform provides a workspace-exit tool, use it. Otherwise, leave the workspace in place.\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| 4. Discard | - | - | - | yes (force) |\n\n## Common Mistakes\n\n**Skipping test verification**\n- **Problem:** Merge broken code, create failing PR\n- **Fix:** Always verify tests before offering options\n\n**Open-ended questions**\n- **Problem:** \"What should I do next?\" is ambiguous\n- **Fix:** Present exactly 4 structured options (or 3 for detached HEAD)\n\n**Cleaning up worktree for Option 2**\n- **Problem:** Remove worktree user needs for PR iteration\n- **Fix:** Only cleanup for Options 1 and 4\n\n**Deleting branch before removing worktree**\n- **Problem:** `git branch -d` fails because worktree still references the branch\n- **Fix:** Merge first, remove worktree, then delete branch\n\n**Running git worktree remove from inside the worktree**\n- **Problem:** Command fails silently when CWD is inside the worktree being removed\n- **Fix:** Always `cd` to main repo root before `git worktree remove`\n\n**Cleaning up harness-owned worktrees**\n- **Problem:** Removing a worktree the harness created causes phantom state\n- **Fix:** Only clean up worktrees under `.worktrees\u002F`, `worktrees\u002F`, or `~\u002F.config\u002Fsuperpowers\u002Fworktrees\u002F`\n\n**No confirmation for discard**\n- **Problem:** Accidentally delete work\n- **Fix:** Require typed \"discard\" confirmation\n\n## Red Flags\n\n**Never:**\n- Proceed with failing tests\n- Merge without verifying tests on result\n- Delete work without confirmation\n- Force-push without explicit request\n- Remove a worktree before confirming merge success\n- Clean up worktrees you didn't create (provenance check)\n- Run `git worktree remove` from inside the worktree\n\n**Always:**\n- Verify tests before offering options\n- Detect environment before presenting menu\n- Present exactly 4 options (or 3 for detached HEAD)\n- Get typed confirmation for Option 4\n- Clean up worktree for Options 1 & 4 only\n- `cd` to main repo root before worktree removal\n- Run `git worktree prune` after removal\n",{"name":5,"description":7},"main","d884e3c730aa8243273458fa6d7de64bfd3b8bba",".claude\u002Fskills\u002Ffinishing-a-development-branch","https:\u002F\u002Fgithub.com\u002Flinktogo\u002Fmaggie","https:\u002F\u002Fgithub.com\u002Flinktogo","http:\u002F\u002Ffabien-brunet.fr\u002F","Software Architect @Capgemini","2026-11-14 21:45:09",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add linktogo\u002Fmaggie --skill finishing-a-development-branch",{"tool":38,"command":39},"bunx","bunx skills add linktogo\u002Fmaggie --skill finishing-a-development-branch",{"tool":41,"command":42},"pnpm","pnpm dlx skills add linktogo\u002Fmaggie --skill finishing-a-development-branch","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flinktogo\u002Fmaggie\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Ffinishing-a-development-branch\u002FSKILL.md",true,[],[47,54,61,68,75,82],{"skillNo":48,"name":49,"nameZh":6,"description":50,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":51,"categories":52,"keywords":53,"publishedAt":19},"01M75NEGXZPJFCHAE5P31CQX94","vuejs-state-management","Manage Vue application state with Pinia and the right state locality","https:\u002F\u002Fgithub.com\u002Flinktogo\u002Fmaggie\u002Fblob\u002Fmain\u002Fskills\u002Fvuejs\u002Fstate-management\u002FSKILL.md",[],[],{"skillNo":55,"name":56,"nameZh":6,"description":57,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":19},"01M75NEEHT92D2SPZFEWBMSVX9","vuejs-composition-api","Write Vue 3 components with the Composition API, script setup, and composables","https:\u002F\u002Fgithub.com\u002Flinktogo\u002Fmaggie\u002Fblob\u002Fmain\u002Fskills\u002Fvuejs\u002Fcomposition-api\u002FSKILL.md",[],[],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":19},"01M75NEBQJKWVJG8CYZQQB4BFQ","reactjs-hooks","Use React hooks correctly — dependencies, effects, and custom hooks","https:\u002F\u002Fgithub.com\u002Flinktogo\u002Fmaggie\u002Fblob\u002Fmain\u002Fskills\u002Freactjs\u002Fhooks\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":19},"01M75NE9V7AYPA9QF9H21TKC08","reactjs-component-design","Write small, composable React components with clean props and no needless state","https:\u002F\u002Fgithub.com\u002Flinktogo\u002Fmaggie\u002Fblob\u002Fmain\u002Fskills\u002Freactjs\u002Fcomponent-design\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M75NE64WGJTNTKW3RYVC7394","postgres-query-performance","Diagnose and fix slow PostgreSQL queries with indexes and EXPLAIN","https:\u002F\u002Fgithub.com\u002Flinktogo\u002Fmaggie\u002Fblob\u002Fmain\u002Fskills\u002Fpostgres\u002Fquery-performance\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M75NE3KGES659BWDAZDM6YQ5","postgres-migrations","Write safe, reversible, zero-downtime PostgreSQL schema migrations","https:\u002F\u002Fgithub.com\u002Flinktogo\u002Fmaggie\u002Fblob\u002Fmain\u002Fskills\u002Fpostgres\u002Fmigrations\u002FSKILL.md",[],[]]