From oh-my-claudecode
Enforce feature branch workflow and auto-create PRs on completion
How this skill is triggered — by the user, by Claude, or both
Slash command
/oh-my-claudecode:branch-guardThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Ensures all code changes happen on feature branches and completed work is automatically pushed and turned into a Pull Request.
Ensures all code changes happen on feature branches and completed work is automatically pushed and turned into a Pull Request.
This skill is silently activated for any workflow that modifies source code. It works alongside git-master (commit style) and frontend-ui-ux (design sensibility).
MANDATORY: Before making ANY source code changes, check the current branch:
CURRENT_BRANCH=$(git branch --show-current)
If on main or master:
# Derive branch name from task description
# Format: omc/<slug> (e.g., omc/add-user-auth, omc/fix-login-bug)
git checkout -b "omc/<task-slug>"
Branch naming rules:
omc/ (for discoverability)omc/add-user-authomc/fix-login-redirect-bugomc/refactor-database-layerbranchName fieldAnnounce to user:
"Created branch
omc/<slug>— all changes will be made here."
If already on a feature branch (not main/master):
git-master rules for atomic commits and style detectionMANDATORY: After Architect verification passes and before outputting the completion promise:
git push -u origin "$(git branch --show-current)"
# Get the default branch name
DEFAULT_BRANCH=$(git remote show origin 2>/dev/null | grep 'HEAD branch' | awk '{print $NF}')
DEFAULT_BRANCH=${DEFAULT_BRANCH:-main}
gh pr create \
--base "$DEFAULT_BRANCH" \
--title "<PR title derived from task>" \
--body "$(cat <<'EOF'
## Summary
<bullet points summarizing what was built/changed>
## Changes
<list of key files/components modified>
## Test Plan
<how to verify the changes work>
---
Generated by [oh-my-claudecode](https://github.com/anthropics/oh-my-claudecode) autopilot
EOF
)"
"PR created: . Branch
omc/<slug>is ready for review."
| Scenario | Action |
|---|---|
gh CLI not installed | Warn user: "Install gh CLI to enable auto-PR. Branch pushed to origin." |
gh not authenticated | Warn user: "Run gh auth login to enable auto-PR. Branch pushed to origin." |
| Push fails (no remote) | Warn user: "No remote configured. Changes committed on local branch omc/<slug>." |
| PR already exists | Skip PR creation, report existing PR URL |
| On a detached HEAD | Create branch from current commit, then proceed normally |
This skill integrates with the completion flow of every code-modifying workflow:
| Workflow | Branch Creation | PR Creation |
|---|---|---|
| Orchestrate | Phase 2B start | Phase 3 completion |
| Autopilot | Phase 0.5 (before execution) | Phase 4.5 (after validation) |
| Ralph | Loop start | After Architect verification |
| Ultrawork | Activation | After verification checklist |
| Ecomode | Activation | After verification |
| Ultrapilot | Before worker dispatch | After integration |
feat: add user authentication with JWTfix: resolve login redirect looprefactor: extract database connection poolnpx claudepluginhub bzimbelman/oh-my-claudecodeGuides collaborative design exploration before implementation: explores context, asks clarifying questions, proposes approaches, and writes a design doc for user approval.
Creates structured, bite-sized implementation plans from specs or requirements before writing code. Useful for breaking down multi-step tasks into testable steps with file structure and task boundaries.
Provides Slack GIF creation utilities with dimension/FPS/color constraints and Python PIL-based frame generation. Use for animated Slack emoji or message GIFs.