{"id":"5614d8e3-25c6-46fb-884a-4d8591dcb4fa","shortId":"Yh9593","kind":"skill","title":"finishing-a-development-branch","tagline":"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","description":"# 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 → 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 / cargo test / pytest / go test ./...\n```\n\n**If tests fail:**\n```\nTests failing (<N> failures). Must fix before completing:\n\n[Show failures]\n\nCannot proceed with merge/PR 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: Determine Base Branch\n\n```bash\n# Try common base branches\ngit merge-base HEAD main 2>/dev/null || git merge-base HEAD master 2>/dev/null\n```\n\nOr ask: \"This branch split from main - is that correct?\"\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 <base-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**Don't add explanation** - keep options concise.\n\n### Step 4: Execute Choice\n\n#### Option 1: Merge Locally\n\n```bash\n# Switch to base branch\ngit checkout <base-branch>\n\n# Pull latest\ngit pull\n\n# Merge feature branch\ngit merge <feature-branch>\n\n# Verify tests on merged result\n<test command>\n\n# If tests pass\ngit branch -d <feature-branch>\n```\n\nThen: Cleanup worktree (Step 5)\n\n#### Option 2: Push and Create PR\n\n```bash\n# Push branch\ngit push -u origin <feature-branch>\n\n# Create PR\ngh pr create --title \"<title>\" --body \"$(cat <<'EOF'\n## Summary\n<2-3 bullets of what changed>\n\n## Test Plan\n- [ ] <verification steps>\nEOF\n)\"\n```\n\nThen: Cleanup worktree (Step 5)\n\n#### Option 3: Keep As-Is\n\nReport: \"Keeping branch <name>. Worktree preserved at <path>.\"\n\n**Don't cleanup worktree.**\n\n#### Option 4: Discard\n\n**Confirm first:**\n```\nThis will permanently delete:\n- Branch <name>\n- All commits: <commit-list>\n- Worktree at <path>\n\nType 'discard' to confirm.\n```\n\nWait for exact confirmation.\n\nIf confirmed:\n```bash\ngit checkout <base-branch>\ngit branch -D <feature-branch>\n```\n\nThen: Cleanup worktree (Step 5)\n\n### Step 5: Cleanup Worktree\n\n**For Options 1, 2, 4:**\n\nCheck if in worktree:\n```bash\ngit worktree list | grep $(git branch --show-current)\n```\n\nIf yes:\n```bash\ngit worktree remove <worktree-path>\n```\n\n**For Option 3:** Keep worktree.\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## 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?\" → ambiguous\n- **Fix:** Present exactly 4 structured options\n\n**Automatic worktree cleanup**\n- **Problem:** Remove worktree when might need it (Option 2, 3)\n- **Fix:** Only cleanup for Options 1 and 4\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\n**Always:**\n- Verify tests before offering options\n- Present exactly 4 options\n- Get typed confirmation for Option 4\n- Clean up worktree for Options 1 & 4 only\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\n## When to Use\nThis skill is applicable to execute the workflow or actions described in the overview.\n\n## Limitations\n- Use this skill only when the task clearly matches the scope described above.\n- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.\n- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.","tags":["finishing","development","branch","antigravity","awesome","skills","sickn33","agent-skills","agentic-skills","ai-agent-skills","ai-agents","ai-coding"],"capabilities":["skill","source-sickn33","skill-finishing-a-development-branch","topic-agent-skills","topic-agentic-skills","topic-ai-agent-skills","topic-ai-agents","topic-ai-coding","topic-ai-workflows","topic-antigravity","topic-antigravity-skills","topic-claude-code","topic-claude-code-skills","topic-codex-cli","topic-codex-skills"],"categories":["antigravity-awesome-skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/sickn33/antigravity-awesome-skills/finishing-a-development-branch","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add sickn33/antigravity-awesome-skills","source_repo":"https://github.com/sickn33/antigravity-awesome-skills","install_from":"skills.sh"}},"qualityScore":"0.700","qualityRationale":"deterministic score 0.70 from registry signals: · indexed on github topic:agent-skills · 34793 github stars · SKILL.md body (4,391 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-04-24T00:50:56.678Z","embedding":null,"createdAt":"2026-04-18T21:37:14.034Z","updatedAt":"2026-04-24T00:50:56.678Z","lastSeenAt":"2026-04-24T00:50:56.678Z","tsv":"'-3':295 '/dev/null':158,166 '1':86,194,236,365,402,470,530 '2':133,140,142,157,165,199,272,294,366,405,463 '3':178,206,309,390,408,464 '4':184,218,232,325,367,413,449,472,517,524,531 '5':270,307,358,360,550 '7':541 'accident':478 'action':580 'add':226 'alway':429,509 'ambigu':445 'announc':66 'applic':574 'as-i':210,311,410 'ask':168,618 'automat':452 'back':196 'base':144,149,154,162,242 'bash':95,146,239,277,348,372,384 'batch':553 'bodi':290 'boundari':626 'branch':5,41,77,145,150,170,209,243,252,264,279,316,333,352,378,401 'broken':423 'bullet':296 'call':534 'cannot':120 'cargo':103 'cat':291 'chang':299 'check':368 'checkout':245,350 'choic':63,234 'chosen':54 'clarif':620 'clean':64,525,561 'cleanup':37,267,304,322,355,361,400,454,467 'clear':50,593 'code':424 'commit':335 'common':148,416 'complet':10,25,44,80,117,187,545,554 'concis':230 'confirm':327,341,345,347,474,485,502,521 'continu':137 'core':56 'correct':176 'creat':202,275,284,288,406,425,564 'criteria':629 'current':381 'd':265,353 'decid':18 'delet':332,479,499 'describ':581,597 'determin':143 'develop':4,27,40,46,76,539 'discard':219,326,339,414,476,484 'driven':538 'end':437 'environ':609 'environment-specif':608 'eof':292,302 'exact':182,344,448,516 'execut':62,233,547,576 'executing-plan':546 'expert':614 'explan':227 'explicit':507 'fail':110,112,426,491 'failur':113,119 'featur':251 'finish':2,38,74 'finishing-a-development-branch':1,73 'first':328 'fix':115,428,446,465,481 'flag':487 'forc':415,504 'force-push':503 'get':519 'gh':286 'git':151,159,244,248,253,263,280,349,351,373,377,385,559 'go':106 'grep':376 'guid':24,43 'handl':53,215 'head':155,163 'implement':8,186 'input':623 'integr':21,533 'keep':207,228,310,315,391,398,409 'later':217 'latest':247 'like':191 'limit':585 'list':375 'll':214 'local':198,238,404 'm':70 'main':156,173 'master':164 'match':594 'merg':34,153,161,195,237,250,254,258,396,403,422,493 'merge-bas':152,160 'merge/pr':123 'might':459 'miss':631 'mistak':417 'must':114 'need':16,460 'never':488 'next':444 'npm':101 'offer':433,513 'open':436 'open-end':435 'option':32,51,61,91,180,185,223,229,235,271,308,324,364,389,395,434,451,462,469,514,518,523,529 'origin':283 'output':603 'overview':42,584 'pair':555 'pass':13,94,126,136,262 'perman':331 'permiss':624 'plan':301,548 'pr':35,276,285,287,407,427 'present':30,49,60,90,179,181,447,515 'preserv':318 'principl':57 'problem':421,439,455,477 'proceed':121,130,489 'process':84 'project':97 'pull':204,246,249 'push':200,273,278,281,397,505 'pytest':105 'question':438 'quick':393 'red':486 'refer':394 'remov':387,456 'report':314 'request':205,508 'requir':482,622 'result':259,498 'review':615 'run':96 'safeti':625 'scope':596 'show':118,380 'show-curr':379 'skill':78,567,572,588 'skill-finishing-a-development-branch' 'skip':418 'source-sickn33' 'specif':610 'split':171 'start':68 'step':85,132,139,141,177,231,269,306,357,359,540,549 'stop':127,616 'structur':31,450 'subag':537 'subagent-driven-develop':536 'substitut':606 'success':628 'suit':100 'summari':293 'switch':240 'task':544,592 'test':12,59,88,93,99,102,104,107,109,111,125,135,256,261,300,419,431,492,496,511,612 'titl':289 'topic-agent-skills' 'topic-agentic-skills' 'topic-ai-agent-skills' 'topic-ai-agents' 'topic-ai-coding' 'topic-ai-workflows' 'topic-antigravity' 'topic-antigravity-skills' 'topic-claude-code' 'topic-claude-code-skills' 'topic-codex-cli' 'topic-codex-skills' 'treat':601 'tri':147 'type':338,483,520 'u':282 'use':6,71,558,570,586 'using-git-worktre':557 'valid':611 'verif':420 'verifi':58,87,92,255,430,495,510 'wait':342 'without':494,501,506 'work':23,28,47,82,221,480,500 'workflow':55,578 'worktre':268,305,317,323,336,356,362,371,374,386,392,399,453,457,527,560,563 'would':189 'yes':383","prices":[{"id":"0f39715b-37f5-438a-8bdd-dc832323d9f3","listingId":"5614d8e3-25c6-46fb-884a-4d8591dcb4fa","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"sickn33","category":"antigravity-awesome-skills","install_from":"skills.sh"},"createdAt":"2026-04-18T21:37:14.034Z"}],"sources":[{"listingId":"5614d8e3-25c6-46fb-884a-4d8591dcb4fa","source":"github","sourceId":"sickn33/antigravity-awesome-skills/finishing-a-development-branch","sourceUrl":"https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/finishing-a-development-branch","isPrimary":false,"firstSeenAt":"2026-04-18T21:37:14.034Z","lastSeenAt":"2026-04-24T00:50:56.678Z"}],"details":{"listingId":"5614d8e3-25c6-46fb-884a-4d8591dcb4fa","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"sickn33","slug":"finishing-a-development-branch","github":{"repo":"sickn33/antigravity-awesome-skills","stars":34793,"topics":["agent-skills","agentic-skills","ai-agent-skills","ai-agents","ai-coding","ai-workflows","antigravity","antigravity-skills","claude-code","claude-code-skills","codex-cli","codex-skills","cursor","cursor-skills","developer-tools","gemini-cli","gemini-skills","kiro","mcp","skill-library"],"license":"mit","html_url":"https://github.com/sickn33/antigravity-awesome-skills","pushed_at":"2026-04-24T00:28:59Z","description":"Installable GitHub library of 1,400+ agentic skills for Claude Code, Cursor, Codex CLI, Gemini CLI, Antigravity, and more. Includes installer CLI, bundles, workflows, and official/community skill collections.","skill_md_sha":"ea146430dd720c0b110dfa6abcc9a5f1909e089e","skill_md_path":"skills/finishing-a-development-branch/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/finishing-a-development-branch"},"layout":"multi","source":"github","category":"antigravity-awesome-skills","frontmatter":{"name":"finishing-a-development-branch","description":"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"},"skills_sh_url":"https://skills.sh/sickn33/antigravity-awesome-skills/finishing-a-development-branch"},"updatedAt":"2026-04-24T00:50:56.678Z"}}