cleanup-cache
Clean system caches (npm, Homebrew, Yarn, browsers, Python/ML) to free disk space
Complete and merge current Git Flow branch (feature/release/hotfix) with proper cleanup and tagging
$ npx -y skills add davila7/claude-code-templates --agent claude-codeHow it fires
How this command gets triggered: by you, by Claude, or both.
/finishContext preview
What this command does when you run it.
Complete and merge current Git Flow branch (feature/release/hotfix) with proper cleanup and tagging
allowed-tools: Bash(git:*), Read, Edit argument-hint: [--no-delete] [--no-tag] description: Complete and merge current Git Flow branch (feature/release/hotfix) with proper cleanup and tagging
Complete current Git Flow branch: **$ARGUMENTS**
Complete the current Git Flow branch by merging it to appropriate target branch(es):
Detect the current branch type and determine merge strategy:
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"
# Increment patch version from current tag
CURRENT_TAG=$(git describe --tags --abbrev=0 origin/main 2>/dev/null)
TAG_NAME="${CURRENT_TAG%.*}.$((${CURRENT_TAG##*.} + 1))"
else
echo "❌ Not on a Git Flow branch (feature/release/hotfix)"
exit 1
fiBefore merging, validate these conditions:
**Critical Checks:**
🔍 Pre-Merge Validation ✓ Working directory clean ✓ All commits pushed to remote ✓ Running tests... ├─ Unit tests: 45/45 passed ├─ Integration tests: 12/12 passed └─ All tests passed ✓ ✓ Checking for merge conflicts with develop... └─ No conflicts detected ✓ ✓ Branch is up to date with remote ✓ Ready to merge!
For **feature/** branches:
# Ensure all commits are pushed git push # Switch to develop git checkout develop # Pull latest changes git pull origin develop # Merge feature branch (no fast-forward) git merge --no-ff feature/$NAME -m "Merge feature/$NAME into develop $(git log develop..feature/$NAME --oneline) 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>" # Push to remote git push origin develop # Delete local branch (unless --no-delete) git branch -d feature/$NAME # Delete remote branch (unless --no-delete) git push origin --delete feature/$NAME
**Success Response:**
✓ Pushed all commits to remote ✓ Switched to develop ✓ Pulled latest changes ✓ Merged feature/$NAME into develop ✓ Pushed to origin/develop ✓ Deleted local branch: feature/$NAME ✓ Deleted remote branch: origin/feature/$NAME 🌿 Feature Complete! Merged: feature/$NAME Target: develop Commits included: 5 Files changed: 12 🎉 Your feature is now in the develop branch! Next steps: - Feature will be included in next release - Other team members can pull from develop - You can start a new feature branch
For **release/** branches:
# Extract version from branch name
VERSION="${CURRENT_BRANCH#release/}"
# Ensure all commits are pushed
git push
# Merge to main first
git checkout main
git pull origin main
git merge --no-ff release/$VERSION -m "Merge release/$VERSION into main
Release notes:
$(cat CHANGELOG.md | sed -n "/## \[$VERSION\]/,/## \[/p" | head -n -1)
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>"
# Create tag on main (unless --no-tag)
git tag -a $VERSION -m "Release $VERSION
$(cat CHANGELOG.md | sed -n "/## \[$VERSION\]/,/## \[/p" | head -n -1)"
# Push main with tags
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
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>"
# Push develop
git push origin develop
# Delete branches (unless --no-delete)
git branch -d release/$VERSION
git push origin --delete release/$VERSION**Success Response:**
✓ Pushed all commits to remote ✓ Merged release/$VERSION into main ✓ Created tag: $VERSION ✓ Pushed main with tags ✓ Merged release/$VERSION into develop ✓ Pushed to origin/develop ✓ Deleted local branch: release/$VERSION ✓ Deleted remote branch: origin/release/$VERSION 🚀 Release Complete: $VERSION Merged to: main, develop Tag created: $VERSION Commits included: 15 Changes: - 5 features - 3 bug fixes - 2 performance improvements 🎉 Release $VERSION is now in production! Next steps: - Deploy to production: [deployment command] - Monitor production for issues - Announce release to team - Update documentation if needed Tag details: git show $VERSION
For **hotfix/** branches:
# Determine new version (patch bump)
CURRENT_VERSION=$(git describe --tags --abbrev=0 origin/main)
NEW_VERSION="${CURRENT_VERSION%.*}.$((${CURRENT_VERSION##*.} + 1))"
# Ensure all commits are pushed
git push
# Merge to main first
git checkout main
git pull origin main
git merge --no-ff hotfix/$NAME -m "Merge hotfix/$NAME into main
Critical fix for: $NAME
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>"
# Create tag on main (unless --no-tag)
git tag -a $NEW_VERSION -m "Hotfix $NEW_VERSION: $NAME
Critical production fix"
# Push main with tags
git push origin main --tags
# Merge back to develop
git checkout develop
git pull origin develop
git merge --no-ff hotfix/$NAME -m "Merge hotfix/$Ready-to-use configurations for Anthropic's Claude Code. A comprehensive collection of AI agents, custom commands, settings, hooks, external integrations (MCPs), and project templates to enhance your development workflow.
Repo: davila7/claude-code-templates
Clean system caches (npm, Homebrew, Yarn, browsers, Python/ML) to free disk space
Create an SEO-optimized blog article for a Claude Code component with AI-generated cover image