branch-finishing
Skill20 starsChanged 7 months agoMITView on GitHub
Apply when closing out a feature branch — pre-merge checklist, rebase, CI verification, cleanup, and post-merge steps.
- Commits and pushes
In this repository49 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .cursor/rules/brainstorming.mdcCursor rule
- .cursor/rules/branch-finishing.mdcCursor rule
- .cursor/rules/code-quality.mdcCursor rule
- .cursor/rules/db-schema.mdcCursor rule
- .cursor/rules/debugging.mdcCursor rule
- .cursor/rules/docker.mdcCursor rule
- .cursor/rules/domain-template.mdcCursor rule
- .cursor/rules/drawio.mdcCursor rule
- .cursor/rules/error-log.mdcCursor rule
- .cursor/rules/fastapi.mdcCursor rule
- .cursor/rules/git-conventions.mdcCursor rule
- .cursor/rules/github-cli.mdcCursor rule
- .cursor/rules/implementation-plan.mdcCursor rule
- .cursor/rules/langchain.mdcCursor rule
- .cursor/rules/python.mdcCursor rule
- .cursor/rules/react.mdcCursor rule
- .cursor/rules/review-deployment.mdcCursor rule
- .cursor/rules/security-review.mdcCursor rule
- .cursor/rules/self-extension-workflow.mdcCursor rule
- .cursor/rules/shell-scripting.mdcCursor rule
- .cursor/rules/svg-check.mdcCursor rule
- .cursor/rules/tdd.mdcCursor rule
- .cursor/rules/typescript.mdcCursor rule
- skill-everythingSkill
- brainstormingSkill
- code-qualitySkill
- db-schemaSkill
- debuggingSkill
- dockerSkill
- domain-templateSkill
- drawioSkill
- error-logSkill
- fastapiSkill
- git-conventionsSkill
- github-cliSkill
- implementation-planSkill
- langchainSkill
- pythonSkill
- reactSkill
- review-deploymentSkill
- security-reviewSkill
- self-extension-workflowSkill
- shell-scriptingSkill
- svg-checkSkill
- tddSkill
- <kebab-case-name>Skill
- typescriptSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. About 0 are common, 8 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 26
Rebase before merge: Always rebase onto the target branch immediately before requesting merge to catch regressions introduced since the …
- Distinctive: line 27
Resolve conflicts locally: Before pushing a rebase, resolve every conflict locally and run the full test suite.
- Distinctive: line 28
CI green before review: Ensure all CI checks pass on the latest push before requesting a human review.
- Distinctive: line 29
Self-review diff: Before opening a PR, run git diff main...HEAD and read every changed line.
- Very specific: line 33
Squash fixup commits: Before merge, squash or fixup any wip:, fixup!, or tmp: commits so the branch history is clean.
- Very specific: line 34
Issue closing keywords: Use Closes #NNN or Fixes #NNN in the PR body so the linked issue auto-closes on merge.
- Very specific: line 35
Changelog update: After any user-visible change, add an entry to CHANGELOG.md (or the project's equivalent) before marking the PR ready for …
- Distinctive: line 36
Version bump: If the project uses semantic versioning, bump the version in the appropriate manifest file as part of the branch before …
- Distinctive: line 40
Draft until CI passes: Keep the PR in draft state until all CI checks are green and the self-review is complete.
- Very specific: line 41
Remove draft status explicitly: Use gh pr ready <number> to convert from draft.
- Very specific: line 45
Delete remote branch after merge: After a successful merge, delete the remote branch with git push origin --delete <branch> or enable …
- Very specific: line 46
Delete local branch after merge: After confirming the remote merge, delete the local tracking branch with git branch -d <branch> to keep …
- Distinctive: line 47
Post-merge verification: After merge, pull main locally and run the test suite once to confirm the integrated state is green.
- Distinctive: line 51
Prefer rebase over merge commits: Avoid merge commits on feature branches.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Sub-Skill: Branch Finishing
Purpose: Ensures every feature branch is cleanly rebased, reviewed, and merged without introducing regressions or leaving stale local state behind.
Rules
Pre-Merge Preparation
- Rebase before merge. Always rebase onto the target branch immediately before requesting merge to catch regressions introduced since the branch was cut. Reference: ERR-2026-024
- Resolve conflicts locally. Before pushing a rebase, resolve every conflict locally and run the full test suite; never push a branch with unresolved markers.
- CI green before review. Ensure all CI checks pass on the latest push before requesting a human review; do not ask reviewers to look at a red branch.
- Self-review diff. Before opening a PR, run
git diff main...HEADand read every changed line; catch debug prints, commented-out code, and accidental file inclusions yourself first.
Commit Hygiene
- Squash fixup commits. Before merge, squash or fixup any
wip:,fixup!, ortmp:commits so the branch history is clean; usegit rebase -ito consolidate. - Issue closing keywords. Use
Closes #NNNorFixes #NNNin the PR body so the linked issue auto-closes on merge; never leave issues open manually after a successful merge. - Changelog update. After any user-visible change, add an entry to
CHANGELOG.md(or the project's equivalent) before marking the PR ready for review. - Version bump. If the project uses semantic versioning, bump the version in the appropriate manifest file as part of the branch before merge, not as a follow-up commit.
Draft → Ready Transition
- Draft until CI passes. Keep the PR in draft state until all CI checks are green and the self-review is complete; convert to ready-for-review only when the branch is genuinely merge-ready.
- Remove draft status explicitly. Use
gh pr ready <number>to convert from draft; do not rely on reviewers noticing a draft PR that was silently updated.
Post-Merge Cleanup
- Delete remote branch after merge. After a successful merge, delete the remote branch with
git push origin --delete <branch>or enable auto-delete in repository settings; stale remote branches pollute the branch list. - Delete local branch after merge. After confirming the remote merge, delete the local tracking branch with
git branch -d <branch>to keep the local workspace clean. - Post-merge verification. After merge, pull
mainlocally and run the test suite once to confirm the integrated state is green; do not assume CI on the PR branch is sufficient.
Conflict Resolution
- Prefer rebase over merge commits. Avoid merge commits on feature branches; use
git rebaseto maintain a linear history unless the team explicitly requires merge commits.
See also
skills/git-conventions/SKILL.mdskills/review-deployment/SKILL.md
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.

