git-workflow
Git Workflow
Unified git workflow skill. Detects Graphite (gt) or plain Git, prefers Graphite when available.
First step in any git operation: Run scripts/git-workflow status to detect the environment.
Quick Reference
| Situation | Action |
|---|---|
| Need repo state / tool detection | git-workflow status |
| Ready to commit staged changes | git-workflow commit --message "feat: ..." |
| Large diff needs decomposition | Read references/splitting-changes.md, then git-workflow split |
| View or manage branch stack | git-workflow stack |
| Need isolated workspace | git-workflow worktree --branch feat/name |
| Stale local branches | git-workflow clean |
| Graphite command reference | references/graphite-guide.md |
| Commit/branch conventions | references/git-best-practices.md |
CLI Reference
| Command | Description |
|---|---|
git-workflow status |
Detect gt/git, report branch, dirty files, stack state |
git-workflow commit |
Guided commit (conventional format, gt create or git commit) |
git-workflow split |
Analyze diff, suggest split points, guide decomposition |
git-workflow stack |
Show stack state, create/restack/sync branches |
git-workflow worktree |
Create isolated worktree with dep install + test baseline |
git-workflow clean |
Remove merged/gone branches and associated worktrees |
Workflow Integration
| Workflow | Usage |
|---|---|
| Feature development | status → work → commit → stack (if stacking) |
| Large change decomposition | status → read splitting-changes.md → split |
| Parallel agent work | worktree → work in isolation → finish |
| Post-merge cleanup | clean to remove stale branches |
| PR creation | Use github-pr skill after committing/pushing |
Safety Guardrails
- Never
git push --forceto main/master - Never
git add .orgit add -A(stage specific files) - Never skip hooks with
--no-verify - Never
git reset --hardwithout explicit user instruction - Always verify staged files before committing
Reference Files
| Reference | Purpose |
|---|---|
| references/graphite-guide.md | Graphite commands, stacking patterns, pitfalls |
| references/git-best-practices.md | Commit format, branch naming, safety rules |
| references/splitting-changes.md | Strategies for decomposing large diffs |
More from hjewkes/agent-skills
self-improve
Use when a session produced reusable insights, when the user says "learn from this", "remember this", or "improve yourself", or after completing a complex task where patterns were discovered
65md-render
Use when asked to render, preview, or view a markdown file in the browser. Triggers on "render markdown", "preview this", "show me this document", "open in browser".
21code-review
Unified code review system — dispatches the right review agents for the situation. Use when reviewing code for quality, bugs, compliance, or before merging.
17skills-management
Use when creating, finding, installing, reviewing, or managing Claude Code skills — covers skill authoring, discovery, conventions, and lifecycle management
14github-pr
GitHub PR workflow — creating PRs, posting automated review comments, managing PR feedback cycles. Use when code is reviewed and ready for GitHub.
14buildkite
Buildkite CI/CD integration. Use when the user needs to check build status, trigger builds, read build logs, debug failures, manage pipelines, or any Buildkite workflow. Triggers include "buildkite", "build", "pipeline", "CI", "deploy", "build log", "build failed".
14