npx claudepluginhub abhattacherjee/claude-code-skills --plugin git-flow# Git Flow Finish Branch
Complete current Git Flow branch: **$ARGUMENTS**
## Current Repository State
- Current branch: !`git branch --show-current`
- Branch type: !`git branch --show-current | grep -oE '^(feature|release|hotfix)' || echo "Not a Git Flow branch"`
- Git status: !`git status --porcelain`
- Unpushed commits: !`git log @{u}.. --oneline 2>/dev/null | wc -l | tr -d ' '`
- Latest tag: !`git describe --tags --abbrev=0 2>/dev/null || echo "No tags"`
## Task
Complete the current Git Flow branch by merging it to appropriate target branch(es).
### 1. Branch Type Detection
### .../finishCreates a pull request with comprehensive description following repo best practices, loading config, verifying git state, summarizing changes, gathering user input, pushing branch, and opening PR.
/finishInvokes jig:finish skill to finalize tasks when implementation is complete, all tests pass, and a decision is needed.
/finishRun the full completion pipeline — build, commit, simplify, commit, build, rebase
/finishFinish current branch. Verifies tests, reviews for EC memory storage, presents merge options.
/finishUse when implementation is complete and you need to merge, create a PR, or clean up — guides branch integration with 4 structured options
/finishFinish development work — push+PR, squash into trunk, keep, or discard
Complete current Git Flow branch: $ARGUMENTS
git branch --show-currentgit branch --show-current | grep -oE '^(feature|release|hotfix)' || echo "Not a Git Flow branch"git status --porcelaingit log @{u}.. --oneline 2>/dev/null | wc -l | tr -d ' 'git describe --tags --abbrev=0 2>/dev/null || echo "No tags"Complete the current Git Flow branch by merging it to appropriate target branch(es).
CURRENT_BRANCH=$(git branch --show-current)
if [[ $CURRENT_BRANCH == feature/* ]]; then
BRANCH_TYPE="feature"
MERGE_TO="develop"
CREATE_TAG="no"
elif [[ $CURRENT_BRANCH == release/* ]]; then
BRANCH_TYPE="release"
MERGE_TO="main develop"
CREATE_TAG="yes"
TAG_NAME="${CURRENT_BRANCH#release/}"
elif [[ $CURRENT_BRANCH == hotfix/* ]]; then
BRANCH_TYPE="hotfix"
MERGE_TO="main develop"
CREATE_TAG="yes"
TAG_NAME="${CURRENT_BRANCH#hotfix/}"
else
echo "Not on a Git Flow branch (feature/release/hotfix)"
exit 1
fi
# Find the open PR for this branch
PR_NUMBER=$(gh pr list --head "$CURRENT_BRANCH" --json number --jq '.[0].number')
# Squash merge — combines all commits into a single commit on develop
gh pr merge $PR_NUMBER --squash --delete-branch
git checkout develop && git pull origin develop
git push
git checkout develop
git pull origin develop
git merge --no-ff feature/$NAME -m "Merge feature/$NAME into develop
$(git log develop..feature/$NAME --oneline)
Co-Authored-By: Claude <noreply@anthropic.com>"
git push origin develop
# Use -D (force) because squash merge creates different SHA
git branch -D feature/$NAME 2>/dev/null || true
git push origin --delete feature/$NAME 2>/dev/null || true
VERSION="${CURRENT_BRANCH#release/}"
git push
# Merge to main
git checkout main
git pull origin main
git merge --no-ff release/$VERSION -m "Merge release/$VERSION into main
Co-Authored-By: Claude <noreply@anthropic.com>"
# Tag (unless --no-tag)
git tag -a $VERSION -m "Release $VERSION"
git push origin main --tags
# Merge back to develop
git checkout develop
git pull origin develop
git merge --no-ff release/$VERSION -m "Merge release/$VERSION back into develop
Co-Authored-By: Claude <noreply@anthropic.com>"
git push origin develop
# Cleanup (unless --no-delete)
git branch -d release/$VERSION
git push origin --delete release/$VERSION
After tagging and pushing, always create a GitHub release with user-friendly notes.
Check previous release format to match conventions:
gh release view $(git tag --sort=-v:refname | sed -n '2p') --json body --jq '.body' | head -20
Generate user-friendly release notes from the CHANGELOG. Read the [VERSION] section
from CHANGELOG.md, then rewrite each entry to be product/user-facing:
Create the release matching the format of previous releases:
gh release create $VERSION --title "$VERSION" --notes "<user-friendly notes>"
After merging back to develop, bump the version to the next patch and ensure [Unreleased] is ready for new entries:
Bump version — run ./scripts/bump-version.sh patch if the script exists, otherwise manually increment the patch version in the project's version file (package.json, plugin.json, etc.)
Ensure [Unreleased] header exists — check if CHANGELOG.md has an empty ## [Unreleased] section at the top (above the just-released version). If not, add one:
## [Unreleased]
## [x.y.z] - date
...
Commit on develop:
git add -A
git commit -m "chore(develop): bump version for next development cycle
Previous release: $VERSION
Co-Authored-By: Claude <noreply@anthropic.com>"
git push origin develop
Same as release finish but uses hotfix branch name. The tag is the hotfix version (already set on the branch). Also creates a GitHub release (step 4a) and bumps develop version (step 4b).
Not on Git Flow Branch: Guide user to correct branch. Uncommitted Changes: Ask to commit/stash. Unpushed Commits: Offer to push. Merge Conflicts: Show conflicting files and resolution steps.
--no-delete — Keep branch after merging--no-tag — Skip tag creation (release/hotfix only)/feature <name> — Start new feature branch/release <version> — Start new release branch/hotfix — Start new hotfix branch from main/flow-status — Check Git Flow statusgit-flow skill — Branching model reference, merge targets, and diagnostic script