Skill git-commit
scriptsMenghasilkan pesan commit konvensional dari diff dan mengeksekusi git commit.
- Bintang GitHub
- 8
- File
- 4
- Commit terakhir
- 28 Okt 2026
- Lisensi
- MIT
- Tool yang diizinkan
- —
Apa fungsi skill git-commit?
git-commit adalah agent skill. Menghasilkan pesan commit konvensional dari diff dan mengeksekusi git commit.
Ringkasan dibuat dari SKILL.md skill ini.
Tentang skill git-commit
Otomatisasi pembuatan pesan commit yang terstandarisasi dan eksekusi git commit adalah fungsi utama dari skill ini bagi developer yang bekerja di lingkungan berbasis terminal. Saat sebuah agent perlu melakukan staging perubahan atau menyelesaikan modifikasi kode, ia akan memuat tool ini untuk menganalisis diff yang sudah di-stage maupun yang belum. Tool ini menghasilkan pesan conventional commit mengikuti spesifikasi conventionalcommits.org, memastikan setiap entri menyertakan tipe, scope opsional, dan deskripsi imperatif.
Proses ini mengandalkan pembacaan git status dan git diff untuk memastikan pesan mencerminkan perubahan kode yang sebenarnya secara akurat, bukan sekadar asumsi. Ini mencakup mekanisme pre-commit linting yang secara otomatis mendeteksi dan menjalankan linter spesifik proyek seperti npm, ruff, flake8, atau golangci-lint untuk memblokir commit yang gagal dalam pemeriksaan kualitas. Tool ini dirancang khusus untuk commit pengembangan standar dan tidak boleh digunakan untuk menghasilkan release commit atau mengelola workflow branch-finish.
Apa yang bisa dilakukan agent dengannya
- 1Generate conventional commit messagesAI agent dapat menulis pesan commit yang terstruktur berdasarkan perubahan spesifik yang ditemukan dalam diff kode.
- 2Handle breaking changes correctlyDeveloper dapat menggunakan tool ini untuk memformat breaking changes secara otomatis dengan tanda seru dan footer yang diperlukan.
- 3Organize mixed changes into commitsAgent dapat mengidentifikasi kapan sebuah diff berisi hal-hal yang tidak terkait dan menyarankan untuk membaginya ke dalam commit terpisah.
Ditulis dari SKILL.md milik skill tersebut. Setiap use case diverifikasi dengan kutipan darinya.
Cara install skill git-commit
Setiap perintah menyalin folder skill ke direktori skills client. Restart client atau mulai sesi baru untuk memuatnya.Install skill git-commit di Plugin
/plugin marketplace add mgiovani/cc-arsenal /plugin install cc-arsenal@cc-arsenal-marketplace
Install skill git-commit di Claude Code
~/.claude/skills/git-commit/SKILL.md
$ npx degit mgiovani/cc-arsenal/skills/git-commit ~/.claude/skills/git-commitInstall skill git-commit di Claude Code (project)
.claude/skills/git-commit/SKILL.md
$ npx degit mgiovani/cc-arsenal/skills/git-commit .claude/skills/git-commitInstall skill git-commit di Codex
~/.agents/skills/git-commit/SKILL.md
$ npx degit mgiovani/cc-arsenal/skills/git-commit ~/.agents/skills/git-commitInstall skill git-commit di Gemini CLI
~/.gemini/skills/git-commit/SKILL.md
$ npx degit mgiovani/cc-arsenal/skills/git-commit ~/.gemini/skills/git-commitInstall skill git-commit di Claude.ai
npx degit mgiovani/cc-arsenal/skills/git-commit git-commit && zip -r git-commit.zip git-commit # claude.ai → Customize → Skills → + → Create skill → Upload a skill → git-commit.zip
SKILL.md
Lihat di GitHubGit Commit
Generate a conventional commit message and create the commit.
Quality Guidelines
Base the message only on what the diff actually shows, not assumptions:
- Read
git statusandgit diff --staged(orgit diffif nothing is staged yet) before writing anything. - Check which files/modules changed before setting scope.
- Look for removed exports, changed signatures, deleted functions to catch breaking changes.
- If the purpose of a change is unclear, ask the user rather than guess.
Pre-commit Linting
In Claude Code, a PreToolUse hook runs before every git commit: it detects the project's
linter (Node's npm/bun/pnpm/yarn run lint, Python's ruff/flake8, make lint, rubocop,
golangci-lint) and blocks the commit if it fails. No linter configured means the commit
proceeds unblocked. Outside Claude Code (no hook support), run the project's lint command
yourself before committing. Never bypass a failing lint with --no-verify: fix the errors
and re-run the commit instead.
Workflow
- Run
git statusandgit diff --stagedto see what actually changed. - If the diff mixes unrelated concerns (e.g. a feature plus an unrelated fix plus docs),
split into separate commits by staging each group with
git add <files>and committing them one at a time. Otherwise, one commit is enough, don't force a split. - For each commit, pick the type:
feat: new featurefix: bug fixdocs: documentation onlystyle: formatting, no code meaning changerefactor: neither fixes a bug nor adds a featureperf: performance improvementtest: adding or correcting testsbuild: build system or dependency changesci: CI configuration/scriptschore: everything else that doesn't touch src or testsrevert: reverts a previous commit
- Format as
type(scope): description, scope optional, description imperative mood ("add" not "added"), max ~50 characters. Skip the body for a typo fix or a single dependency bump; add a wrapped body (why, not how) once the change alters behavior or touches multiple files. For breaking changes, append!after the scope and add aBREAKING CHANGE: ...footer.
Example formats
feat(auth): add OAuth2 login support
fix(api): resolve null pointer in user endpoint
docs: update installation instructions
chore(deps): bump lodash to 4.17.21
feat(shopping-cart)!: remove deprecated calculate method
BREAKING CHANGE: calculate has been removed, use computeTotal instead
Ask for confirmation before committing if the changes are complex or span multiple concerns; otherwise just commit.
Berkas dalam skill ini
4Pertanyaan seputar skill git-commit
Bagaimana cara install skill git-commit di Claude Code?
Jalankan npx degit mgiovani/cc-arsenal/skills/git-commit ~/.claude/skills/git-commit. Claude Code memuat skill dari ~/.claude/skills (semua proyek) atau .claude/skills (satu proyek) dan menggunakan skill saat deskripsinya cocok dengan tugas.
Client mana saja yang bisa menggunakan skill git-commit?
Client apa pun yang membaca format Agent Skills: Claude Code, Codex, Gemini CLI, dan claude.ai (unggah sebagai ZIP). Script dalam skill hanya berjalan di client yang mengizinkan eksekusi kode.
Apa yang terjadi jika proyek memiliki linter yang terkonfigurasi?
Sebuah PreToolUse hook akan berjalan sebelum commit untuk mendeteksi linter proyek dan akan memblokir commit jika proses linting gagal.
Bagaimana saya harus menangani diff yang berisi banyak perubahan yang tidak terkait?
Anda harus membagi perubahan tersebut menjadi commit terpisah dengan melakukan staging pada setiap grup perubahan secara individual menggunakan git add <files> dan melakukan commit satu per satu.
Apa format untuk commit breaking change?
Untuk breaking changes, Anda harus menambahkan tanda seru setelah scope dan menyertakan footer 'BREAKING CHANGE: ...'.