skills/git-workflow/SKILL.md
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.
npx skillsauth add eumemic/dev-skills git-workflowInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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
testing
This skill should be used when the user asks to "test this feature", "verify this works", "run tests", "check if this is working", "test thoroughly", or mentions testing a specific feature or fix.
tools
Drive a GitHub `shovel-ready` issue queue end-to-end — pick highest-ROI, TDD, /ship, /retro, merge; when empty, audit closed work and unlabeled candidates to refill it; otherwise wait for new labels. Use when the user invokes `/shovel-ready`, asks to "work the shovel-ready queue", "drain shovel-ready", "drive issues to merge", "autopilot on labeled issues", "issue-label queue", or sets up an autonomous-development loop on a GitHub-labeled issue tracker. GitHub-specific (uses `gh` CLI); skip for GitLab/Jira.
development
Drive a code change from working tree to a green PR — runs project checks, /simplify, code-review subagent, commits, opens PR, monitors CI. Stops when CI is green; caller handles merge. Use when invoked as `/ship`, or when another skill (e.g., `/shovel-ready`, `/kaizen`, `/bughunt`) hands off a working tree of changes to be shipped. Project-agnostic; reads check commands from CLAUDE.md.
development
Reflect on a slice of the current session (a single iteration, the whole session, or a natural pause point) to identify durable, codifiable learnings about workflow OR dev infrastructure — and ship them only if they clear a quality bar. Most invocations produce nothing; that's the point. Use when the user asks to "run a retro", "do a retrospective", "reflect on the session", "what did you learn", "improve skills based on this session", "codify learnings"; when invoked from a loop driver (`/shovel-ready`, `/kaizen`, `/bughunt`) with `--scope=iteration`; or **proactively at pause points** when the agent is waiting on async work (CI, autodev runs, monitor events) and has cycles to think meta.