finishing-a-development-branch
Skill18 starsChanged 7 months agoMITView on GitHub
Use when implementation is done, validation has passed, and you need to decide how to wrap up the current branch, including Chinese requests such as “接下来合并还是提 PR”“这条分支怎么收尾”“保留还是丢弃当前工作”. Do not use while implementation or verification is still in progress, or when the user only wants a normal commit.
- Commits and pushes
123 other projects use a version of this.
Adopted by
Most recently taken up by
- andreymudri/fleetmatestheir own version, first seen Oct 5, 2026
- LayneChai/superpowers-dshtheir own version, first seen Oct 3, 2026
- HanksChen0110/skillstheir own version, first seen Oct 3, 2026
- JameMy0001/antigravity-skills-hubtheir own version, first seen Oct 2, 2026
- lsy041015/orchestratheir own version, first seen Oct 2, 2026
- Wenaixi/dsh-superpowertheir own version, first seen Oct 1, 2026
Used with
Projects with it also use diagnosing-superpowers, testing-anti-patterns and 8 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
obraSkilldiagnosing-superpowers
Use when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.
Also in 6 projects that use this
MicrosoftSkilltesting-anti-patterns
Use when writing or changing tests, adding mocks, or tempted to add test-only methods to production code - prevents testing mock behavior, production pollution with test-only methods, and mocking without understanding dependencies
Also in 5 projects that use this
shibit-netSkillchinese-code-review
中文 review 沟通参考——话术模板、分级标注(必须修复/建议修改/仅供参考)、国内团队常见反模式应对。仅在用户显式 /chinese-code-review 时调用,不要根据上下文自动触发。
Also in 3 projects that use this
shibit-netSkillchinese-commit-conventions
中文 commit 与 changelog 配置参考——Conventional Commits 中文适配、commitlint/husky/commitizen 中文模板、conventional-changelog 中文配置。仅在用户显式 /chinese-commit-conventions 时调用,不要根据上下文自动触发。
Also in 3 projects that use this
kntismSkilldefense-in-depth
Use when invalid data causes failures deep in execution, requiring validation at multiple system layers - validates at every layer data passes through to make bugs structurally impossible
Also in 3 projects that use this
MicrosoftSkillroot-cause-tracing
Use when errors occur deep in execution and you need to trace back to find the original trigger - systematically traces bugs backward through call stack, adding instrumentation when needed, to identify source of invalid data or incorrect behavior
Also in 5 projects that use this
- +1 more from shibit-net
- +1 more from microsoft
Other versions123 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 123
- obra/superpowers★ 314ksame name
- jnMetaCode/superpowers-zh★ 8.3ksame name
- openai/plugins★ 7.3ksame name
- microsoft/FluidFramework★ 4.9ksame name
- GanyuanRan/Aegis★ 1.3ksame name
- coco-research/coco★ 437same name
- Ibrahim-3d/orchestrator-supaconductor★ 380same name
- totvs/engpro-advpl-tlpp-skills★ 138same name
- Houseofmvps/ultraship★ 123same name
- LayneChai/superpowers-dsh★ 102same name
113 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository37 other files it gives its agents.
- a11y-debuggingSkill
- agent-blueprint-architectSkill
- brainstormingSkill
- chart-visualizationSkill
- chinese-copywritingSkill
- chinese-git-workflowSkill
- chrome-devtoolsSkill
- creating-trae-rulesSkill
- debug-optimize-lcpSkill
- discovering-subagent-capabilitiesSkill
- dispatching-parallel-agentsSkill
- everything-searchSkill
- executing-plansSkill
- find-docsSkill
- frontend-designSkill
- gh-cliSkill
- git-commitSkill
- image-manipulation-python-magickSkill
- memory-kernelSkill
- memory-leak-debuggingSkill
- mineru-to-mdSkill
- model-config-lookupSkill
- receiving-code-reviewSkill
- requesting-code-reviewSkill
- self-improvementSkill
- skill-creatorSkill
- skill-language-policySkill
- skill-stability-reviewSkill
- subagent-driven-developmentSkill
- systematic-debuggingSkill
- test-driven-developmentSkill
- troubleshootingSkill
- using-git-worktreesSkill
- verification-before-completionSkill
- visual-brainstormingSkill
- workflow-runnerSkill
- writing-plansSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
26 rules. 0 are common, 21 are distinctive, and 5 are very specific to this project.
0
Common
Most of the 114 edited versions we read keep these.
21
Distinctive
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
Use this skill for development wrap-up: confirm that results are genuinely usable first, provide structured options, and then execute …
- Distinctive: line 41
Base branch unclear: Ask the user first.
- Distinctive: line 42
Remote capabilities unclear: Check first or explain uncertainty.
- Distinctive: line 48
If there is no fresh validation evidence, stop and run validation first.
- Very specific: line 63
If such knowledge exists, invoke self-improvement to capture it before proceeding with wrap-up.
- Distinctive: line 74
If the base branch is unclear, ask the user first.
- Distinctive: line 81
Keep the current branch and workspace as-is.
- Distinctive: line 95
After merging, re-run minimal necessary validations.
- Very specific: line 104
Remote is GitHub (
github.com): Use standard GitHub flow: - Very specific: line 112
If gh is unavailable when using GitHub:
- Distinctive: line 116
Default to keeping the current worktree/branch.
- Distinctive: line 127
Only execute the deletion after explicit user confirmation.
- Distinctive: line 131
If the current work is in a git worktree:
- Distinctive: line 132
Option 1: After a successful merge, optionally clean up the worktree.
- Distinctive: line 133
Option 2: Keep the worktree by default.
- Distinctive: line 134
Option 3: Keep the worktree.
- Distinctive: line 135
Option 4: Delete the worktree after confirmation.
- Very specific: line 139
Before providing any wrap-up options, confirm validation evidence using verification-before-completion standards.
- Distinctive: line 140
Use PowerShell-compatible git / gh commands on a Windows host.
- Distinctive: line 141
When deleting a branch, worktree, or discarding changes, explicit confirmation is mandatory.
- Very specific: line 142
If the current environment lacks gh or remote permissions, do not pretend a PR was created successfully.
- Distinctive: line 147
Git not installed or no repository: Run git --version first to confirm Git is available, then git rev-parse --is-inside-work-tree to …
- Distinctive: line 148
Validation failed: Stop wrap-up, return to implementation or fixing.
- Distinctive: line 155
When completing the wrap-up, state at least:
- Distinctive: line 162
Use this fixed skeleton by default:
- Distinctive: line 184
If wrap-up is not truly completed due to validation failure, remote failure, or lack of user confirmation, do not use "completed".
“Common” is measured: kept by at least 6 in 10 of the 114 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Finishing a Development Branch
Overview
Use this skill for development wrap-up: confirm that results are genuinely usable first, provide structured options, and then execute merge, push, keep, or discard based on the user's choice.
Core Principle: Validate first, give options next, execute wrap-up last.
Use This Skill
- Feature implementation is complete.
- Key validations have passed.
- You need to decide whether to merge locally, create a PR, keep as-is, or discard.
- The current work may be in a worktree or an isolated branch.
Do Not Use
- Code is not finished or validations haven't run.
- The user only wants a normal commit, not branch-level wrap-up.
- You are still debugging or implementing a feature.
Input Contract
Required Inputs:
- Implementation is complete and validation results exist.
- The current branch state is identifiable.
Optional but highly recommended inputs:
- Base branch name.
- Whether currently in a worktree.
- Whether the user wants to push, create PR, keep, or discard.
- Whether
ghis available in the current environment.
Missing input handling:
- Validation evidence is stale or missing: Return to validation first; do not enter wrap-up.
- Base branch unclear: Ask the user first.
- Remote capabilities unclear: Check first or explain uncertainty; do not pretend a PR can be created.
Execution Protocol
1. Confirm Validation State First
If there is no fresh validation evidence, stop and run validation first. Do not directly ask "what's next?".
Confirm at least:
- Key tests have been re-run.
- Build or lint (if relevant) has passed.
- Current branch state is clear.
1.5. Knowledge Promotion Gate <!-- anchor: knowledge-promotion-gate -->
During wrap-up of medium or larger tasks, check if any persistent workarounds, rule discoveries, or recurring errors occurred during this branch. Examples:
- A non-obvious environment workaround was discovered during implementation.
- A project convention was clarified through user correction.
- A recurring error pattern was encountered.
If such knowledge exists, invoke self-improvement to capture it before proceeding with wrap-up.
Also, if memories are near the 20-entry limit or containing outdated entries, run a quick memory maintenance pass using self-improvement's resources/memory-maintenance.md before adding new entries.
2. Identify Base Branch and Current Branch
PowerShell example:
$currentBranch = git branch --show-current
$baseBranch = "main"If the base branch is unclear, ask the user first. Do not assume arbitrarily.
3. Provide Structured Options
Recommend providing only these 4 options:
- Merge locally back to the base branch.
- Push and create a Pull Request.
- Keep the current branch and workspace as-is.
- Discard current work.
In Trae, prioritize using the current environment's structured questioning tool to let the user choose, rather than asking an open-ended question.
4. Execute Based on Choice
Option 1: Merge Locally
Execute only after validation passes.
git checkout $baseBranch
git pull
git merge $currentBranchAfter merging, re-run minimal necessary validations; if they pass, consider deleting the feature branch.
Option 2: Push and Create PR
First, detect the remote configuration:
git remote -v- No remote configured: Report that no remote is set up. Offer to configure one using
chinese-git-workflow(for Gitee, GitLab, Coding) or standardgit remote add origin <url>for GitHub. Do not proceed with push. - Remote is GitHub (
github.com): Use standard GitHub flow:git push -u origin $currentBranch gh pr create --title "<title>" --body "<summary>" - Remote is Gitee, GitLab, Coding, CNB, or other: Push the branch, then guide the user to create a PR/MR through the platform's web UI. The
ghCLI is GitHub-specific and will not work on other platforms. Seechinese-git-workflowfor platform-specific remote configuration. - Multiple push URLs configured (mirror sync): Push once — Git will push to all configured URLs automatically.
If gh is unavailable when using GitHub:
- Explicitly state the PR was not created.
- Provide the completed steps and the next manual actions required.
Default to keeping the current worktree/branch. Do not automatically clean up the local workspace right after creating a PR.
Option 3: Keep As-Is
Output the current branch name, path, and validation status, then stop.
Option 4: Discard Current Work
Requires secondary confirmation. The confirmation text must explicitly state what will be deleted:
- Branch.
- Worktree (if exists).
- Unsaved local work.
Only execute the deletion after explicit user confirmation.
Relationship with Worktrees
If the current work is in a git worktree:
- Option 1: After a successful merge, optionally clean up the worktree.
- Option 2: Keep the worktree by default.
- Option 3: Keep the worktree.
- Option 4: Delete the worktree after confirmation.
Trae / Windows Conventions
- Before providing any wrap-up options, confirm validation evidence using
verification-before-completionstandards. - Use PowerShell-compatible git / gh commands on a Windows host.
- When deleting a branch, worktree, or discarding changes, explicit confirmation is mandatory.
- If the current environment lacks
ghor remote permissions, do not pretend a PR was created successfully. - For non-GitHub remotes (Gitee, GitLab, Coding, CNB), reference
chinese-git-workflowfor platform-specific PR/MR workflows.
Failure Handling
- Git not installed or no repository: Run
git --versionfirst to confirm Git is available, thengit rev-parse --is-inside-work-treeto confirm the current directory is a repository. If either fails, stop and offer to install Git, initialize one withgit init, or proceed with file-level operations only. - Validation failed: Stop wrap-up, return to implementation or fixing.
- Base branch unclear: Ask the user first.
- Remote push failed: Report the actual error; do not say "PR created".
- Deletion action is risky: Re-confirm the scope and consequences.
Output Contract
When completing the wrap-up, state at least:
- Current branch and base branch.
- Validations run.
- Which wrap-up option the user chose.
- Actual commands or actions executed.
- Whether the branch/worktree was kept.
Use this fixed skeleton by default:
分支收尾已完成。
**Current Branch:** `<current-branch>`
**Base Branch:** `<base-branch>`
**Wrap-up Method:** `Merge Locally` | `Create PR` | `Keep As-Is` | `Discard Work`
**Validation Status:**
- [Tests / lint / build / manual checks]
**Actions Executed:**
- [Commands or operations performed]
**Branch / Worktree Status:**
- [Kept / Deleted / Unmodified]
**Risks or Next Steps:**
- [If none, write `- None`]If wrap-up is not truly completed due to validation failure, remote failure, or lack of user confirmation, do not use "completed". Explicitly state the current stalled state and the next step.
Integration
using-git-worktrees: Adjacent — if the current work is in an isolated workspace.verification-before-completion: Upstream — validate before stating "ready to merge / ready to commit".git-commit: Upstream — if the branch has uncommitted work that needs final commits before wrap-up.chinese-git-workflow: Adjacent — use when the remote is Gitee, GitLab, Coding, CNB, or requires platform-specific PR/MR configuration.self-improvement: Internal — Knowledge Promotion Gate (section 1.5) invokes self-improvement during wrap-up.memory-kernel: Downstream — after self-improvement completes, write promoted knowledge to MCP Memory.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

