From dev-skills
This skill should be used when the user asks to "commit", "push", "create a PR", "open a pull request", "monitor CI", "fix CI", "fix the build", "request review", "merge", "merge the PR", or mentions any git-based development workflow operations.
How this skill is triggered — by the user, by Claude, or both
Slash command
/dev-skills:git-workflowThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Orchestrate git-based development workflows: commit, push, PR creation, CI monitoring, code review, and merging.
Orchestrate git-based development workflows: commit, push, PR creation, CI monitoring, code review, and merging.
Before any git operation:
Never use --no-verify: Pre-commit hooks are guardians. Never bypass without explicit permission.
Never force push: Report divergent branches; never force push without explicit permission.
commit → push → pr-create → pr-monitor → pr-review → merge
Each step can be invoked independently or chained together based on user request.
Create clean, atomic commits with safety checks and debug code cleanup.
Process:
git status, git diff, git diff --cachedgit add path/to/related/filesMessage format: type: description (50 chars max)
feat: new featurefix: bug fixrefactor: code restructuringdocs: documentationtest: test changeschore: maintenanceHEREDOC for commits:
git commit -m "$(cat <<'EOF'
feat: add user authentication
- Add login/logout endpoints
- Implement session management
Co-Authored-By: Claude <[email protected]>
EOF
)"
For multiple logical changes, create separate commits.
Push commits to remote and update PR metadata if needed.
Process:
git push -u origin $(git branch --show-current)gh pr list --head $(git branch --show-current) --state openCreate a pull request from the current branch.
Prerequisites: Commits exist, branch pushed to remote.
Process:
git log $(git merge-base HEAD origin/HEAD)..HEAD --onelinegh pr create --title "Title here" --body "$(cat <<'EOF'
## Summary
- Key change 1
- Key change 2
## Test plan
- [ ] Test case 1
- [ ] Test case 2
Fixes #123
Generated with Claude
EOF
)"
Monitor CI status, fix failures, loop until green.
Process:
gh pr checks --json name,state,link--watch - excessive output)Request review if: Multiple files with significant logic, new features, security-sensitive code, complex algorithms.
Skip review if: Documentation-only, trivial fixes, test-only changes.
Request code review and handle review dialogue.
No preconditions - can be invoked anytime regardless of CI status.
Process:
gh pr view --json number,title,body,additions,deletions,changedFilesgh pr comment --body "$(cat <<'EOF'
@reviewer please review this PR.
**Key changes:**
- [Summary of main changes]
**Areas of concern:**
- [Specific areas needing review]
EOF
)"
Squash merge the PR.
Prerequisites: No uncommitted changes, PR exists and mergeable, CI passing.
Process:
Verify prerequisites:
git status # No uncommitted changes
gh pr checks # All passing
gh pr view --json mergeable --jq '.mergeable' # MERGEABLE
Squash merge:
gh pr merge --squash --delete-branch
On failure:
Parse user requests to identify which operations to perform:
"commit and push" → commit → push
"create a PR" → (commit if needed) → (push if needed) → pr-create
"commit, push, create PR, and merge when build passes" → commit → push → pr-create → pr-monitor (wait for green) → merge
"fix CI and merge" → pr-monitor (fix failures) → merge
Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub eumemic/claude-plugins --plugin dev-skills