Reference Files
- workflow-phases.md - Step-by-step phase instructions
- commit-format.md - Commit message formatting rules
- branch-protection.md - Protected branch detection (Phase 0 + Phase 6)
- phase-5-protocol.md - Pre-push quality review checklist
- rebase-guide.md - History cleanup with
git reset --soft
- examples.md - Workflow examples (simple feature, bug fix, refactor, cleanup, PR)
Pre-loaded Context
- Branch:
!git branch --show-current
- Status:
!git status --short
- Diff summary:
!git diff --stat
- Staged:
!git diff --staged --stat
- Recent commits:
!git log --oneline -10
Git Workflow Skill
Analyzes repository changes, organizes them into atomic commits with well-formatted messages, manages branches, cleans up commit history, and helps create pull requests.
Workflow Overview
| Phase |
Goal |
Key Actions |
Reference |
| 0 |
Branch Management |
Block protected branches, suggest feature branch |
branch-protection.md |
| 1 |
Repo Analysis |
Check status, diffs, detect conflicts, check branch freshness |
workflow-phases.md |
| 2 |
Organize Commits |
Group related changes, create commit plan |
workflow-phases.md |
| 3 |
Create Commits |
Stage files, format messages, execute commits |
commit-format.md |
| 4 |
History Cleanup |
Squash/reword commits (optional, use git reset --soft) |
rebase-guide.md |
| 5 |
Quality Review |
Check message quality, offer tests (mandatory) |
phase-5-protocol.md |
| 6 |
Push |
Block protected branches, confirm, push with -u |
branch-protection.md |
| 7 |
Pull Request |
Generate PR title/description, create via gh |
workflow-phases.md |
Key rules:
- Never use
git rebase -i (requires interactive input) — use git reset --soft instead
- Always block pushes to protected branches (main/master/develop/production/staging)
- Commit messages: imperative mood, ≤72 chars, explain WHY not WHAT
Edge Case Quick Reference
| Situation |
Action |
| No changes |
Inform user, exit gracefully |
| Untracked files |
List, ask about inclusion, suggest .gitignore for secrets |
| Large changeset (10+ files) |
Suggest splitting into multiple PRs |
| Detached HEAD |
Alert user, offer to create branch |
| Merge conflicts |
STOP, show files, guide resolution |
| No remote |
Complete through Phase 5, skip push/PR |
| Protected branch |
BLOCK, require feature branch |
| Rebase in progress |
Alert, offer continue or abort |
| Symlinked files |
Detect in Phase 1, exclude from commit plan, inform user |
| Stale branch base |
Fetch origin, rebase onto origin/main if diverged |
| Bare git repo |
Not supported — exit with error message |
User Interaction Patterns
Use AskUserQuestion for: branch creation, commit plan approval, push confirmation, PR creation, force push warnings, protected branch warnings.
Use TaskCreate for: tracking multiple commits (3+), long workflows.
Use Bash for: all git and gh commands.
Key Workflow Patterns
- One logical change = one commit; don't mix unrelated changes
- Commits should build on each other (add new, migrate, remove old)
- Clean up messy history before pushing
- Include tests with the code they test
- Keep config changes separate unless tightly coupled
- Always branch per feature; never commit directly to main
When NOT to Use
- Simple single-file commits — direct
git add && git commit is faster
- Amending the last commit — use
git commit --amend directly
- Cherry-picking or reverting — use standard git workflows
- Resolving merge conflicts — user must resolve manually first
- Submodule operations — needs manual handling
For syncing your local repo, use vc-sync instead.
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1---2name: vc-ship3description: Automates git commit organization and history cleanup. Use when staging and organizing uncommitted changes into atomic commits, cleaning messy commit history, or formatting commit messages. Not for deciding how to integrate a completed branch.4---56## Reference Files78- [workflow-phases.md](references/workflow-phases.md) - Step-by-step phase instructions9- [commit-format.md](references/commit-format.md) - Commit message formatting rules10- [branch-protection.md](references/branch-protection.md) - Protected branch detection (Phase 0 + Phase 6)11- [phase-5-protocol.md](references/phase-5-protocol.md) - Pre-push quality review checklist12- [rebase-guide.md](references/rebase-guide.md) - History cleanup with `git reset --soft`13- [examples.md](references/examples.md) - Workflow examples (simple feature, bug fix, refactor, cleanup, PR)1415---1617## Pre-loaded Context1819- **Branch**: `!git branch --show-current`20- **Status**: `!git status --short`21- **Diff summary**: `!git diff --stat`22- **Staged**: `!git diff --staged --stat`23- **Recent commits**: `!git log --oneline -10`2425# Git Workflow Skill2627Analyzes repository changes, organizes them into atomic commits with well-formatted messages, manages branches, cleans up commit history, and helps create pull requests.2829## Workflow Overview3031| Phase | Goal | Key Actions | Reference |32| ----- | ----------------- | ------------------------------------------------------------- | ------------------------------------------------------- |33| 0 | Branch Management | Block protected branches, suggest feature branch | [branch-protection.md](references/branch-protection.md) |34| 1 | Repo Analysis | Check status, diffs, detect conflicts, check branch freshness | [workflow-phases.md](references/workflow-phases.md) |35| 2 | Organize Commits | Group related changes, create commit plan | [workflow-phases.md](references/workflow-phases.md) |36| 3 | Create Commits | Stage files, format messages, execute commits | [commit-format.md](references/commit-format.md) |37| 4 | History Cleanup | Squash/reword commits (optional, use `git reset --soft`) | [rebase-guide.md](references/rebase-guide.md) |38| 5 | Quality Review | Check message quality, offer tests (**mandatory**) | [phase-5-protocol.md](references/phase-5-protocol.md) |39| 6 | Push | Block protected branches, confirm, push with `-u` | [branch-protection.md](references/branch-protection.md) |40| 7 | Pull Request | Generate PR title/description, create via `gh` | [workflow-phases.md](references/workflow-phases.md) |4142**Key rules:**4344- Never use `git rebase -i` (requires interactive input) — use `git reset --soft` instead45- Always block pushes to protected branches (main/master/develop/production/staging)46- Commit messages: imperative mood, ≤72 chars, explain WHY not WHAT4748## Edge Case Quick Reference4950| Situation | Action |51| --------------------------- | --------------------------------------------------------- |52| No changes | Inform user, exit gracefully |53| Untracked files | List, ask about inclusion, suggest .gitignore for secrets |54| Large changeset (10+ files) | Suggest splitting into multiple PRs |55| Detached HEAD | Alert user, offer to create branch |56| Merge conflicts | STOP, show files, guide resolution |57| No remote | Complete through Phase 5, skip push/PR |58| Protected branch | BLOCK, require feature branch |59| Rebase in progress | Alert, offer continue or abort |60| Symlinked files | Detect in Phase 1, exclude from commit plan, inform user |61| Stale branch base | Fetch origin, rebase onto `origin/main` if diverged |62| Bare git repo | Not supported — exit with error message |6364## User Interaction Patterns6566Use **AskUserQuestion** for: branch creation, commit plan approval, push confirmation, PR creation, force push warnings, protected branch warnings.6768Use **TaskCreate** for: tracking multiple commits (3+), long workflows.6970Use **Bash** for: all git and gh commands.7172## Key Workflow Patterns7374- One logical change = one commit; don't mix unrelated changes75- Commits should build on each other (add new, migrate, remove old)76- Clean up messy history before pushing77- Include tests with the code they test78- Keep config changes separate unless tightly coupled79- Always branch per feature; never commit directly to main8081## When NOT to Use8283- **Simple single-file commits** — direct `git add && git commit` is faster84- **Amending the last commit** — use `git commit --amend` directly85- **Cherry-picking or reverting** — use standard git workflows86- **Resolving merge conflicts** — user must resolve manually first87- **Submodule operations** — needs manual handling8889For syncing your local repo, use `vc-sync` instead.9091---92> Converted and distributed by [TomeVault](https://tomevault.io/claim/philoserf) — claim your Tome and manage your conversions.93<!-- tomevault:4.0:skill_md:2026-04-11 -->