SKILL.md
/release — Automated Release Flow
Ship sharp. Ship clean. Ship now.
Automates the full release cycle: version bump, changelog generation, git tag, push, and GitHub release creation. No more manual copy-paste release rituals.
Usage
/release patch # Bump patch (1.2.3 → 1.2.4), tag, push, release
/release minor # Bump minor (1.2.3 → 1.3.0)
/release major # Bump major (1.2.3 → 2.0.0)
/release patch --alpha # Pre-release (1.2.3 → 1.2.4-alpha.1)
/release patch --dry-run # Show what would happen, don't do it
/release patch --no-push # Tag locally, skip push + GH release
/release status # Show current version + unreleased changes
Step 0: Preflight
Checks
date "+🕐 %H:%M %Z (%A %d %B %Y)" && BRANCH=$(git branch --show-current)
if [ "$BRANCH" != "main" ]; then
echo "⚠️ On branch '$BRANCH' — releases should be from main"
echo "Continue anyway? [y/N]"
# WAIT for user confirmation
fi
# Must be clean working tree
if [ -n "$(git status --porcelain | grep -v '^?? ψ/')" ]; then
echo "❌ Uncommitted changes (excluding ψ/ vault files):"
git status --short | grep -v '^?? ψ/'
echo ""
echo "Commit or stash first."
exit 1
fi
# Must be up to date with remote
git fetch origin main --quiet 2>/dev/null
LOCAL=$(git rev-parse HEAD)
REMOTE=$(git rev-parse origin/main 2>/dev/null)
if [ "$LOCAL" != "$REMOTE" ]; then
echo "⚠️ Local is not in sync with origin/main"
echo " Local: $LOCAL"
echo " Remote: $REMOTE"
echo "Pull first? [Y/n]"
fi
Step 1: Detect Current Version
# Try package.json first
if [ -f package.json ]; then
CURRENT=$(python3 -c "import json; print(json.load(open('package.json'))['version'])")
VERSION_FILE="package.json"
# Try Cargo.toml
elif [ -f Cargo.toml ]; then
CURRENT=$(grep '^version' Cargo.toml | head -1 | sed 's/.*"\(.*\)".*/\1/')
VERSION_FILE="Cargo.toml"
# Try VERSION file
elif [ -f VERSION ]; then
CURRENT=$(cat VERSION)
VERSION_FILE="VERSION"
else
echo "❌ Can't find version. Supported: package.json, Cargo.toml, VERSION"
exit 1
fi
echo "📦 Current version: v$CURRENT ($VERSION_FILE)"
