What I do
- Intelligently detect and group related changes
- Auto-generate descriptive branch names from changes
- Streamlined workflow: scan → branch → commit → push → PR with fewer prompts
When to Use
Use this when you want a faster, smarter git workflow that groups changes logically and reduces manual confirmation overhead.
Workflow Steps
1. Smart Detection & Grouping
Run in parallel:
git status - check what's changed
git diff --stat - see file modification summary
git diff --name-only - list changed files only
git diff --staged --stat - see what's already staged
Analyze changes to group them logically:
- Files in the same module/directory → likely related
- Files that were modified together in recent edits → likely related
- New files that complement each other → likely related
Present grouped changes in a clear format, e.g.:
📁 Group 1: UI Components
- src/components/Button.tsx (modified)
- src/components/Button.test.tsx (modified)
📁 Group 2: API Layer
- src/api/client.ts (new)
- src/api/types.ts (modified)
2. Auto Branch Name Generation
Generate branch name from dominant change pattern:
- Use format:
<type>/<short-description>
- Types:
feature, fix, refactor, docs, test, chore
- Derive description from most significant changed file/feature
- Convert to kebab-case, max 50 chars
- Examples:
feature/add-user-auth (from auth-related files)
fix/login-validation (from validation changes)
refactor/api-cleanup (from API refactoring)
Show the proposed branch name and ask for one-word confirmation (or type alternative).
3. Streamlined Branch & Commit
- If not on main/master: check if current branch matches proposed name
- If yes: stay on it
- If no: ask to switch or create new
- Create branch only after validating the branch name, then use
git checkout -b "$branch_name"
- Stage explicit pathspecs only:
git add -- path/to/file ...
- If file paths are generated, keep them NUL-delimited (
git diff -z --name-only) and pass them as pathspec arguments.
- Never concatenate untrusted filenames into a shell command and never run the placeholder text literally.
- Auto-generate commit message from changes:
- First line:
<type>: <short description> (max 72 chars)
- Body: grouped file changes with brief descriptions
- Commit with generated message, show preview first
- Ask for one-word confirmation to proceed
4. Push & Optional PR
- After commit, ask: "Push to remote? (yes/no/abort)"
- If yes:
git push -u origin <branch-name>
- Then ask: "Create PR? (yes/no)"
- If yes:
- Check remote:
git remote -v
- If fork: use fork's remote (e.g.,
mskadu/repo-name)
- Auto-generate PR description from commit messages
- Use
gh pr create with:
- Title from branch name
- Body: summary of changes + file breakdown + follow-up notes
Key Rules
- Group related files automatically, but allow user to adjust
- Generate branch names from actual changes, don't ask user to name them
- Reduce confirmations: ask for one-word answers or single confirmation points
- Never commit secrets, credentials, or large binaries
- Check if GitHub repo exists before PR creation
- Skip PR step if user says "no" at any point
- If branch already exists with changes, offer to amend or add new commit
Limitations
- Do not bypass repository-specific maintainer rules, branch policies, or required review gates.
- Confirm destructive or publishing actions explicitly; this skill should streamline routine Git flow, not remove accountability.
1---2name: smart-git-automation3description: "Smart change detection, auto branch naming, and streamlined commit/PR workflow"4version: 1.0.05author:6 name: "sickn33 / Antigravity Community"7 github: sickn338tags: [smart, git, automation, automation]9category: automation10platforms: [macos, linux, windows]11license: MIT12metadata:13 hermes:14 source: https://skillmd.com/skills/nous-hermeshub/smart-git-automation15 upstream: "antigravity-awesome-skills"16 risk: "critical"17 date_added: "2026-06-05"18 original_author: "Antigravity Community"19---2021## What I do22- Intelligently detect and group related changes23- Auto-generate descriptive branch names from changes24- Streamlined workflow: scan → branch → commit → push → PR with fewer prompts2526## When to Use27Use this when you want a faster, smarter git workflow that groups changes logically and reduces manual confirmation overhead.2829## Workflow Steps3031### 1. Smart Detection & Grouping32Run in parallel:33- `git status` - check what's changed34- `git diff --stat` - see file modification summary35- `git diff --name-only` - list changed files only36- `git diff --staged --stat` - see what's already staged3738Analyze changes to group them logically:39- Files in the same module/directory → likely related40- Files that were modified together in recent edits → likely related41- New files that complement each other → likely related4243Present grouped changes in a clear format, e.g.:44```45📁 Group 1: UI Components46 - src/components/Button.tsx (modified)47 - src/components/Button.test.tsx (modified)4849📁 Group 2: API Layer50 - src/api/client.ts (new)51 - src/api/types.ts (modified)52```5354### 2. Auto Branch Name Generation55Generate branch name from dominant change pattern:56- Use format: `<type>/<short-description>`57- Types: `feature`, `fix`, `refactor`, `docs`, `test`, `chore`58- Derive description from most significant changed file/feature59- Convert to kebab-case, max 50 chars60- Examples:61 - `feature/add-user-auth` (from auth-related files)62 - `fix/login-validation` (from validation changes)63 - `refactor/api-cleanup` (from API refactoring)6465Show the proposed branch name and ask for one-word confirmation (or type alternative).6667### 3. Streamlined Branch & Commit68- If not on main/master: check if current branch matches proposed name69 - If yes: stay on it70 - If no: ask to switch or create new71- Create branch only after validating the branch name, then use `git checkout -b "$branch_name"`72- Stage explicit pathspecs only: `git add -- path/to/file ...`73 - If file paths are generated, keep them NUL-delimited (`git diff -z --name-only`) and pass them as pathspec arguments.74 - Never concatenate untrusted filenames into a shell command and never run the placeholder text literally.75- Auto-generate commit message from changes:76 - First line: `<type>: <short description>` (max 72 chars)77 - Body: grouped file changes with brief descriptions78- Commit with generated message, show preview first79- Ask for one-word confirmation to proceed8081### 4. Push & Optional PR82- After commit, ask: "Push to remote? (yes/no/abort)"83- If yes: `git push -u origin <branch-name>`84- Then ask: "Create PR? (yes/no)"85- If yes:86 - Check remote: `git remote -v`87 - If fork: use fork's remote (e.g., `mskadu/repo-name`)88 - Auto-generate PR description from commit messages89 - Use `gh pr create` with:90 - Title from branch name91 - Body: summary of changes + file breakdown + follow-up notes9293## Key Rules94- Group related files automatically, but allow user to adjust95- Generate branch names from actual changes, don't ask user to name them96- Reduce confirmations: ask for one-word answers or single confirmation points97- Never commit secrets, credentials, or large binaries98- Check if GitHub repo exists before PR creation99- Skip PR step if user says "no" at any point100- If branch already exists with changes, offer to amend or add new commit101102## Limitations103104- Do not bypass repository-specific maintainer rules, branch policies, or required review gates.105- Confirm destructive or publishing actions explicitly; this skill should streamline routine Git flow, not remove accountability.