Langsung ke konten
Skillpedia
Pemrograman umum48k ยท #5814

smart-git-automation

Fungsinya

Alat ini membantu Anda mengelola perubahan kode dengan lebih cerdas. Alat ini mengelompokkan file yang saling terkait, menyarankan nama untuk branch (versi kode baru), dan mengotomatiskan sebagian proses menyimpan serta mengirim perubahan Anda.

Kapan dipakai

  • โœ“Ketika Anda punya banyak perubahan kecil dan ingin mengelompokkannya.
  • โœ“Ketika membuat fitur baru dan membutuhkan nama yang jelas untuk versi kode tersebut.
  • โœ“Untuk mempercepat proses menyimpan dan mengirim kode Anda untuk ditinjau.

Link skill

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/smart-git-automation/SKILL.md

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/smart-git-automation/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit โ†’

Contoh permintaan ke AI

โ€œSaya ingin menyimpan perubahan kode saya.โ€

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Alat ini menganalisis file mana saja yang sudah Anda ubah, lalu mengelompokkannya berdasarkan kemiripan. Setelah itu, alat membuatkan nama deskriptif untuk versi kode baru Anda dan membantu menyimpan serta mengirim perubahan tersebut dengan langkah manual yang lebih sedikit.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.

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.
Pertanyaan umum

Apa itu 'changes' dan 'branch' di Git?

Changes adalah modifikasi yang Anda buat pada file proyek. Branch adalah salinan paralel dari proyek tempat Anda bisa mengerjakan fitur atau perbaikan baru tanpa memengaruhi versi utama.

Mengapa file yang terkait perlu dikelompokkan?

Mengelompokkan file yang terkait memudahkan Anda memahami bagian kode mana yang saling berhubungan, dan membantu membuat nama branch yang lebih akurat serta pesan commit yang lebih jelas.

Apakah alat ini akan menyimpan kode saya secara otomatis?

Alat ini mengotomatiskan dan menyarankan langkah-langkah, tetapi alat akan selalu meminta konfirmasi Anda sebelum melakukan tindakan penting seperti menyimpan (commit) atau mengirim (push) kode.

Detail

Deskripsi asli dari pembuat

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

repo: sickn33/agentic-awesome-skills

Popularitas

Bintang GitHub
48k
Peringkat
#5814
Lisensi
MIT
Diperbarui
15/10/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • โ€ฆ

Skill lain dari repositori ini

Skill serupa