Loading...
Loading...
Git Commit Workflow Module - Provides sync, analysis, commit, push and merge functions
npx skill4agent add valorvie/ai-dev-skills custom-skills-git-commitgit-commit| Module | File | Description |
|---|---|---|
| Shared Utilities | | Main branch detection (main/master), conflict handling, commit conventions |
| Sync | | Stash, Rebase/Merge, Stash Pop |
| Analyze | | Define baseline, check changes |
| Commit | | Normal/Final mode commit |
| Push | | Push to remote, handle divergence |
| Merge | | Multi-branch integration testing |
| PR | | Pull Request creation workflow |
| PR Analyze | | PR-specific change analysis and summary generation |
git-commit_utils.mdIF pr subcommand:
→ Read and execute `pr.md` (internally calls `pr-analyze.md`)
→ Exit
IF merge subcommand:
→ Read and execute `merge.md`
→ Exit
IF current branch is main branch (main/master):
IF --direct:
→ Skip sync, directly execute analysis and commit
ELSE:
→ Warning: "⚠️ Currently on main branch, it is recommended to switch to a development branch. To commit directly, use the --direct parameter."
→ Abort process
ELSE (development branch):
1. Read and execute `sync.md` — Environment sync
2. Read and execute `analyze.md` — Change analysis
3. Read and execute `commit.md` — Execute commit
4. IF --push:
→ Read and execute `push.md` — Push to remotegit-commit pr1. Read `_utils.md` — Obtain main branch name
2. Read and execute `pr.md` — PR main workflow
├─ Pre-checks (branch, gh CLI)
├─ Scope determination
├─ Read and execute `pr-analyze.md` — Change analysis and summary generation
├─ ⚠️ Check existing PR (must be executed before squash)
│ ├─ If MERGED/CLOSED → Continue creating new PR
│ └─ If OPEN → Ask user: Update existing PR / Create new branch + new PR / Abort
├─ Commit cleanup (unless --no-squash)
├─ Push
└─ Create PR (draft by default, formal with --direct)⚠️ Important: PR check must be executed before squash. If there is an OPEN PR for the branch, squash will overwrite all commits of that PR. Executing squash without user confirmation may cause irreversible issues.
1. Read and execute `analyze.md` — Change analysis
2. Read and execute `commit.md` — Execute commit
3. IF --push:
→ Read and execute `push.md` — Push to remote