agentsclimarketplace

Smart git automation

Skill mskadu/opencode-agent-skills/skills/smart-git-automation

Curated OpenCode skills built from real use — refined through trial and error.

Install
npx -y skills add mskadu/opencode-agent-skills --skill smart-git-automation

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Smart change detection, auto branch naming, and streamlined commit/PR workflow

The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

3.1 KB, as published. Nobody here has run it

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 me

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: git checkout -b <branch-name>
  • Stage changes: git add <grouped-files>
  • 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

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.