[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6EPCYRE1T2MEAQ0FCD6HESC":3,"skill-same:01M6EPCYRE1T2MEAQ0FCD6HESC":74},{"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":23,"publishedAt":40,"linkOnly":41,"markdownContent":42,"markdownBody":43,"frontMatter":44,"refName":45,"commitSha":46,"skillDirectory":47,"forksCount":48,"repositoryHtmlUrl":49,"repositoryHomepageUrl":50,"ownerHtmlUrl":51,"ownerBlogUrl":6,"ownerDescription":52,"updatedAt":53,"install":54,"resources":67},"01M6EPCYRE1T2MEAQ0FCD6HESC","finishing-a-development-branch",null,"Git branch completion workflow. Use when implementation is complete, tests pass, and a feature branch needs to be integrated via merge, pull request, or cleanup.","ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",67,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fcodingcossack\u002Ffinishing-a-development-branch\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39],"finishing a development branch","development","branch","workflow","merge","pull request","cleanup","git branch","git","pull","use","implementation","tests","feature","complete","via","2026-11-10 10:12:30",false,"---\nname: finishing-a-development-branch\ndescription: Git branch completion workflow. Use when implementation is complete, tests pass, and a feature branch needs to be integrated via merge, pull request, or cleanup.\n---\n\n# Finishing a Development Branch\n\n## The Process\n\n### Step 1: Verify Tests\n\nDetermine test runner from project structure:\n- `package.json` → `npm test` or `yarn test`\n- `Cargo.toml` → `cargo test`\n- `pyproject.toml` \u002F `setup.py` → `pytest`\n- `go.mod` → `go test .\u002F...`\n- `Makefile` with `test` target → `make test`\n\nRun tests. If any fail, report `⊘ BLOCKED:TESTS` with failure count and stop. Do not proceed to Step 2.\n\n### Step 2: Determine Base Branch\n\nFind the branch this feature diverged from:\n\n```bash\n# Check which branch has the closest merge-base\nfor candidate in main master develop; do\n  if git rev-parse --verify \"$candidate\" >\u002Fdev\u002Fnull 2>&1; then\n    MERGE_BASE=$(git merge-base HEAD \"$candidate\" 2>\u002Fdev\u002Fnull)\n    if [ -n \"$MERGE_BASE\" ]; then\n      echo \"Candidate: $candidate (merge-base: $MERGE_BASE)\"\n    fi\n  fi\ndone\n```\n\nSelect the candidate with the most recent merge-base (closest ancestor). If multiple branches share the same merge-base or detection is ambiguous, ask: \"This branch could target `main` or `develop`. Which should it merge into?\"\n\n**Store the result** - subsequent steps reference `\u003Cbase-branch>` meaning this determined value.\n\n### Step 3: Present Options\n\nPresent 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### Step 4: Execute Choice\n\n#### Option 1: Merge Locally\n\n```bash\ngit checkout \u003Cbase-branch>\ngit pull\ngit merge \u003Cfeature-branch>\n```\n\n**If merge conflicts:**\n```\n⊘ BLOCKED:CONFLICTS\n\nMerge conflicts in:\n- \u003Cconflicted files>\n\nCannot auto-resolve. User must:\n1. Resolve conflicts manually\n2. Run tests\n3. Re-run this workflow\n```\nStop. Do not proceed.\n\n**If merge succeeds:**\n```bash\n# Verify tests on merged result\n\u003Ctest command>\n\n# If tests pass, delete feature branch\ngit branch -d \u003Cfeature-branch>\n```\n\nThen: Cleanup worktree (Step 5). Report `✓ MERGED`.\n\n#### Option 2: Push and Create PR\n\n**Verify `gh` CLI is available:**\n```bash\nif ! command -v gh &>\u002Fdev\u002Fnull; then\n  echo \"gh CLI not installed. Install from https:\u002F\u002Fcli.github.com\u002F or push manually and create PR via web.\"\n  exit 1\nfi\ngh auth status || echo \"gh not authenticated. Run: gh auth login\"\n```\n\nExtract title from first commit on branch (original intent):\n\n```bash\nMERGE_BASE=$(git merge-base HEAD \u003Cbase-branch>)\nTITLE=$(git log --reverse --format=%s \"$MERGE_BASE\"..HEAD | head -1)\ngit push -u origin \u003Cfeature-branch>\ngh pr create --title \"$TITLE\" --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\nReport `✓ PR_CREATED` with PR URL. **Keep worktree intact** for continued work during review.\n\n#### Option 3: Keep As-Is\n\nReport `✓ PRESERVED` with branch name and worktree path.\n\n**Do not 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. If not received, abort.\n\nIf confirmed:\n```bash\ngit checkout \u003Cbase-branch>\ngit branch -D \u003Cfeature-branch>\n```\n\nThen: Cleanup worktree (Step 5). Report `✓ DISCARDED`.\n\n### Step 5: Cleanup Worktree\n\n**For Options 1 and 4 only:**\n\n```bash\n# Check if currently in a worktree (not main repo)\nif [ \"$(git rev-parse --git-common-dir)\" != \"$(git rev-parse --git-dir)\" ]; then\n  # Get worktree root (handles invocation from subdirectory)\n  WORKTREE_ROOT=$(git rev-parse --show-toplevel)\n  cd \"$(git rev-parse --git-common-dir)\u002F..\"\n  git worktree remove \"$WORKTREE_ROOT\"\nfi\n```\n\n**For Options 2 and 3:** Keep worktree intact.\n\n## Quick Reference\n\n| Option | Merge | Push | Keep Worktree | Cleanup Branch |\n|--------|-------|------|---------------|----------------|\n| 1. Merge locally | ✓ | - | - | ✓ |\n| 2. Create PR | - | ✓ | ✓ | - |\n| 3. Keep as-is | - | - | ✓ | - |\n| 4. Discard | - | - | - | ✓ (force) |\n\n## Terminal States\n\nOn completion, report exactly one:\n\n| State | Output | Meaning |\n|-------|--------|---------|\n| `✓ MERGED` | Branch merged to `\u003Cbase>`, worktree cleaned | Option 1 success |\n| `✓ PR_CREATED` | PR #N at URL | Option 2 success |\n| `✓ PRESERVED` | Branch kept at path | Option 3 success |\n| `✓ DISCARDED` | Branch deleted, worktree cleaned | Option 4 success |\n| `⊘ BLOCKED:TESTS` | N test failures | Cannot proceed |\n| `⊘ BLOCKED:CONFLICTS` | Merge conflict in files | Cannot proceed |\n\n## Guardrails\n\n**Blocking conditions (stop immediately):**\n- Tests failing → `⊘ BLOCKED:TESTS`\n- Merge conflicts → `⊘ BLOCKED:CONFLICTS`\n\n**Mandatory confirmations:**\n- Option 4 (Discard): Require typed \"discard\" confirmation\n\n**Cleanup rules:**\n- Options 1, 4: Clean up worktree and branch\n- Options 2, 3: Preserve worktree\n\n**Never:**\n- Proceed with failing tests\n- Merge without verifying tests on result\n- Delete work without typed confirmation\n- Force-push without explicit request\n\n## Integration\n\n**Called by:**\n- **subagent-driven-development** (Step 7) - After all tasks complete\n- **executing-plans** (Step 5) - After all batches complete\n\n**Pairs with:**\n- **using-git-worktrees** - Cleans up worktree created by that skill\n","# Finishing a Development Branch\n\n## The Process\n\n### Step 1: Verify Tests\n\nDetermine test runner from project structure:\n- `package.json` → `npm test` or `yarn test`\n- `Cargo.toml` → `cargo test`\n- `pyproject.toml` \u002F `setup.py` → `pytest`\n- `go.mod` → `go test .\u002F...`\n- `Makefile` with `test` target → `make test`\n\nRun tests. If any fail, report `⊘ BLOCKED:TESTS` with failure count and stop. Do not proceed to Step 2.\n\n### Step 2: Determine Base Branch\n\nFind the branch this feature diverged from:\n\n```bash\n# Check which branch has the closest merge-base\nfor candidate in main master develop; do\n  if git rev-parse --verify \"$candidate\" >\u002Fdev\u002Fnull 2>&1; then\n    MERGE_BASE=$(git merge-base HEAD \"$candidate\" 2>\u002Fdev\u002Fnull)\n    if [ -n \"$MERGE_BASE\" ]; then\n      echo \"Candidate: $candidate (merge-base: $MERGE_BASE)\"\n    fi\n  fi\ndone\n```\n\nSelect the candidate with the most recent merge-base (closest ancestor). If multiple branches share the same merge-base or detection is ambiguous, ask: \"This branch could target `main` or `develop`. Which should it merge into?\"\n\n**Store the result** - subsequent steps reference `\u003Cbase-branch>` meaning this determined value.\n\n### Step 3: Present Options\n\nPresent 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### Step 4: Execute Choice\n\n#### Option 1: Merge Locally\n\n```bash\ngit checkout \u003Cbase-branch>\ngit pull\ngit merge \u003Cfeature-branch>\n```\n\n**If merge conflicts:**\n```\n⊘ BLOCKED:CONFLICTS\n\nMerge conflicts in:\n- \u003Cconflicted files>\n\nCannot auto-resolve. User must:\n1. Resolve conflicts manually\n2. Run tests\n3. Re-run this workflow\n```\nStop. Do not proceed.\n\n**If merge succeeds:**\n```bash\n# Verify tests on merged result\n\u003Ctest command>\n\n# If tests pass, delete feature branch\ngit branch -d \u003Cfeature-branch>\n```\n\nThen: Cleanup worktree (Step 5). Report `✓ MERGED`.\n\n#### Option 2: Push and Create PR\n\n**Verify `gh` CLI is available:**\n```bash\nif ! command -v gh &>\u002Fdev\u002Fnull; then\n  echo \"gh CLI not installed. Install from https:\u002F\u002Fcli.github.com\u002F or push manually and create PR via web.\"\n  exit 1\nfi\ngh auth status || echo \"gh not authenticated. Run: gh auth login\"\n```\n\nExtract title from first commit on branch (original intent):\n\n```bash\nMERGE_BASE=$(git merge-base HEAD \u003Cbase-branch>)\nTITLE=$(git log --reverse --format=%s \"$MERGE_BASE\"..HEAD | head -1)\ngit push -u origin \u003Cfeature-branch>\ngh pr create --title \"$TITLE\" --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\nReport `✓ PR_CREATED` with PR URL. **Keep worktree intact** for continued work during review.\n\n#### Option 3: Keep As-Is\n\nReport `✓ PRESERVED` with branch name and worktree path.\n\n**Do not 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. If not received, abort.\n\nIf confirmed:\n```bash\ngit checkout \u003Cbase-branch>\ngit branch -D \u003Cfeature-branch>\n```\n\nThen: Cleanup worktree (Step 5). Report `✓ DISCARDED`.\n\n### Step 5: Cleanup Worktree\n\n**For Options 1 and 4 only:**\n\n```bash\n# Check if currently in a worktree (not main repo)\nif [ \"$(git rev-parse --git-common-dir)\" != \"$(git rev-parse --git-dir)\" ]; then\n  # Get worktree root (handles invocation from subdirectory)\n  WORKTREE_ROOT=$(git rev-parse --show-toplevel)\n  cd \"$(git rev-parse --git-common-dir)\u002F..\"\n  git worktree remove \"$WORKTREE_ROOT\"\nfi\n```\n\n**For Options 2 and 3:** Keep worktree intact.\n\n## Quick Reference\n\n| Option | Merge | Push | Keep Worktree | Cleanup Branch |\n|--------|-------|------|---------------|----------------|\n| 1. Merge locally | ✓ | - | - | ✓ |\n| 2. Create PR | - | ✓ | ✓ | - |\n| 3. Keep as-is | - | - | ✓ | - |\n| 4. Discard | - | - | - | ✓ (force) |\n\n## Terminal States\n\nOn completion, report exactly one:\n\n| State | Output | Meaning |\n|-------|--------|---------|\n| `✓ MERGED` | Branch merged to `\u003Cbase>`, worktree cleaned | Option 1 success |\n| `✓ PR_CREATED` | PR #N at URL | Option 2 success |\n| `✓ PRESERVED` | Branch kept at path | Option 3 success |\n| `✓ DISCARDED` | Branch deleted, worktree cleaned | Option 4 success |\n| `⊘ BLOCKED:TESTS` | N test failures | Cannot proceed |\n| `⊘ BLOCKED:CONFLICTS` | Merge conflict in files | Cannot proceed |\n\n## Guardrails\n\n**Blocking conditions (stop immediately):**\n- Tests failing → `⊘ BLOCKED:TESTS`\n- Merge conflicts → `⊘ BLOCKED:CONFLICTS`\n\n**Mandatory confirmations:**\n- Option 4 (Discard): Require typed \"discard\" confirmation\n\n**Cleanup rules:**\n- Options 1, 4: Clean up worktree and branch\n- Options 2, 3: Preserve worktree\n\n**Never:**\n- Proceed with failing tests\n- Merge without verifying tests on result\n- Delete work without typed confirmation\n- Force-push without explicit request\n\n## Integration\n\n**Called by:**\n- **subagent-driven-development** (Step 7) - After all tasks complete\n- **executing-plans** (Step 5) - After all batches complete\n\n**Pairs with:**\n- **using-git-worktrees** - Cleans up worktree created by that skill\n",{"name":5,"description":7},"main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002Faiskillstore\u002Fmarketplace\u002Fcodingcossack\u002Ffinishing-a-development-branch",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":8,"skillName":5,"commands":55,"prompt":65,"zipAvailable":66},[56,59,62],{"tool":57,"command":58},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill finishing-a-development-branch",{"tool":60,"command":61},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill finishing-a-development-branch",{"tool":63,"command":64},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill finishing-a-development-branch","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fcodingcossack\u002Ffinishing-a-development-branch\u002FSKILL.md",true,[68],{"path":69,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":72,"sourceHtmlUrl":73},"skill-report.json","REFERENCE","参考文档",15472,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fcodingcossack\u002Ffinishing-a-development-branch\u002Fskill-report.json",[75,85,95,104,110,117],{"skillNo":76,"name":77,"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":78,"categories":79,"keywords":81,"publishedAt":40},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[80],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[82,83,84],"model","model hierarchy","model hierarchy skill",{"skillNo":86,"name":87,"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":88,"categories":89,"keywords":91,"publishedAt":40},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[90],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[92,93,94],"MCP","zoom","zoom mcp",{"skillNo":96,"name":97,"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":98,"categories":99,"keywords":100,"publishedAt":40},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[101,102,103,93],"sdk","zoom apps sdk","apps",{"skillNo":105,"name":106,"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":107,"categories":108,"keywords":109,"publishedAt":40},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[106],{"skillNo":111,"name":112,"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":113,"categories":114,"keywords":116,"publishedAt":40},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[115],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[112],{"skillNo":118,"name":119,"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":120,"categories":121,"keywords":122,"publishedAt":40},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[119]]