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.
Source: sickn33/agentic-awesome-skills → skills/smart-git-automation/SKILL.md
Also appears in: sickn33/agentic-awesome-skills/plugins/agentic-awesome-skills/skills/smart-git-automation/SKILL.md, sickn33/agentic-awesome-skills/plugins/agentic-awesome-skills-claude/skills/smart-git-automation/SKILL.md
1---2name: smart-git-automation3description: "Smart change detection, auto branch naming, and streamlined commit/PR workflow"4category: engineering-core5source_repo: sickn33/agentic-awesome-skills6source_path: "skills/smart-git-automation/SKILL.md"7source_url: https://github.com/sickn33/agentic-awesome-skills/blob/HEAD/skills/smart-git-automation/SKILL.md8metadata:9 source: https://skillmd.com/skills/sickn33/smart-git-automation10---111213## What I do14- Intelligently detect and group related changes15- Auto-generate descriptive branch names from changes16- Streamlined workflow: scan → branch → commit → push → PR with fewer prompts1718## When to Use19Use this when you want a faster, smarter git workflow that groups changes logically and reduces manual confirmation overhead.2021## Workflow Steps2223### 1. Smart Detection & Grouping24Run in parallel:25- `git status` - check what's changed26- `git diff --stat` - see file modification summary27- `git diff --name-only` - list changed files only28- `git diff --staged --stat` - see what's already staged2930Analyze changes to group them logically:31- Files in the same module/directory → likely related32- Files that were modified together in recent edits → likely related33- New files that complement each other → likely related3435Present grouped changes in a clear format, e.g.:36```37📁 Group 1: UI Components38 - src/components/Button.tsx (modified)39 - src/components/Button.test.tsx (modified)4041📁 Group 2: API Layer42 - src/api/client.ts (new)43 - src/api/types.ts (modified)44```4546### 2. Auto Branch Name Generation47Generate branch name from dominant change pattern:48- Use format: `<type>/<short-description>`49- Types: `feature`, `fix`, `refactor`, `docs`, `test`, `chore`50- Derive description from most significant changed file/feature51- Convert to kebab-case, max 50 chars52- Examples:53 - `feature/add-user-auth` (from auth-related files)54 - `fix/login-validation` (from validation changes)55 - `refactor/api-cleanup` (from API refactoring)5657Show the proposed branch name and ask for one-word confirmation (or type alternative).5859### 3. Streamlined Branch & Commit60- If not on main/master: check if current branch matches proposed name61 - If yes: stay on it62 - If no: ask to switch or create new63- Create branch only after validating the branch name, then use `git checkout -b "$branch_name"`64- Stage explicit pathspecs only: `git add -- path/to/file ...`65 - If file paths are generated, keep them NUL-delimited (`git diff -z --name-only`) and pass them as pathspec arguments.66 - Never concatenate untrusted filenames into a shell command and never run the placeholder text literally.67- Auto-generate commit message from changes:68 - First line: `<type>: <short description>` (max 72 chars)69 - Body: grouped file changes with brief descriptions70- Commit with generated message, show preview first71- Ask for one-word confirmation to proceed7273### 4. Push & Optional PR74- After commit, ask: "Push to remote? (yes/no/abort)"75- If yes: `git push -u origin <branch-name>`76- Then ask: "Create PR? (yes/no)"77- If yes:78 - Check remote: `git remote -v`79 - If fork: use fork's remote (e.g., `mskadu/repo-name`)80 - Auto-generate PR description from commit messages81 - Use `gh pr create` with:82 - Title from branch name83 - Body: summary of changes + file breakdown + follow-up notes8485## Key Rules86- Group related files automatically, but allow user to adjust87- Generate branch names from actual changes, don't ask user to name them88- Reduce confirmations: ask for one-word answers or single confirmation points89- Never commit secrets, credentials, or large binaries90- Check if GitHub repo exists before PR creation91- Skip PR step if user says "no" at any point92- If branch already exists with changes, offer to amend or add new commit9394## Limitations9596- Do not bypass repository-specific maintainer rules, branch policies, or required review gates.97- Confirm destructive or publishing actions explicitly; this skill should streamline routine Git flow, not remove accountability.9899---100101**Source:** [`sickn33/agentic-awesome-skills`](https://github.com/sickn33/agentic-awesome-skills) → `skills/smart-git-automation/SKILL.md`102103**Also appears in:** `sickn33/agentic-awesome-skills/plugins/agentic-awesome-skills/skills/smart-git-automation/SKILL.md`, `sickn33/agentic-awesome-skills/plugins/agentic-awesome-skills-claude/skills/smart-git-automation/SKILL.md`